Linux命令

applesingle(1), binhex(1), macbinary(1) - encode and decode files
arch(1) - print architecture type or run selected architecture of a universal binary
ascii85(n) - ascii85-encode/decode binary data
atos(1) - convert numeric addresses to symbols of binary images or processes
base64(n) - base64-encode/decode binary data
bin(n) - Encoding “bin”
binary(ntcl) - Insert and extract fields from binary strings
bind(ntcl) - Arrange for X events to invoke Tcl scripts
bindtags(ntcl) - Determine which bindings apply to a window, and order of evaluation
binhex.pl(1) - use Convert::BinHex to encode files as BinHex
builtin(1), !(1), %(1), .(1), :(1), @(1), {(1), }(1), alias(1), alloc(1), bg(1), bind(1), bindkey(1), break(1), breaksw(1), builtins(1), case(1), cd(1), chdir(1), command(1), complete(1), continue(1), default(1), dirs(1), do(1), done(1), echo(1), echotc(1), elif(1), else(1), end(1), endif(1), endsw(1), esac(1), eval(1), exec(1), exit(1), export(1), false(1), fc(1), fg(1), filetest(1), fi(1), for(1), foreach(1), getopts(1), glob(1), goto(1), hash(1), hashstat(1), history(1), hup(1), if(1), jobid(1), jobs(1), kill(1), limit(1), local(1), log(1), login(1), logout(1), ls-F(1), nice(1), nohup(1), notify(1), onintr(1), popd(1), printenv(1), pushd(1), pwd(1), read(1), readonly(1), rehash(1), repeat(1), return(1), sched(1), set(1), setenv(1), settc(1), setty(1), setvar(1), shift(1), source(1), stop(1), suspend(1), switch(1), telltc(1), test(1), then(1), time(1), times(1), trap(1), true(1), type(1), ulimit(1), umask(1), unalias(1), uncomplete(1), unhash(1), unlimit(1), unset(1), unsetenv(1), until(1), wait(1), where(1), which(1), while(1) - shell built-in commands
combinatorics(n), math::combinatorics(n) - Combinatorial functions in the Tcl Math Library
ctkbind(8) - SmartCard pairing tool
debinhex.pl(1) - use Convert::BinHex to decode BinHex files
dnsextd(8) - BIND Extension Daemon " Name Description for whatis database
idlj(1) - The IDL-to-Java Compiler (RMI-IIOP version) idlj generates Java bindings from a given IDL file
install(1) - install binaries
iwidgets_combobox(n), iwidgets::combobox(n) - Create and manipulate combination box widgets
khim(n) - Provides key bindings for entering international characters on a keyboard that does not support them
net-snmp-config(1) - returns information about installed net-snmp libraries and binaries
ntext(n) - Alternative Bindings for the Text Widget
ntextBindings(n) - Alternative Bindings for the Text Widget
parl(1) - Binary PAR Loader
schemagen(1) - Java™ Architecture for XML Binding Schema Generator Specification Version: 2.0 Reference Implementation (RI) Version: 2.0 ea3 l
slapo-pbind(5) - proxy bind overlay to slapd
sort(1) - sort or merge records (lines) of text and binary files
tcldom(n), ::dom::DOMImplementation(n) - Tcl language binding for the W3C Document Object Model
term_bind(n), term::receive::bind(n) - Keyboard dispatch from terminals
tk_menuBar(ntcl), tk_bindForTraversal(ntcl) - Obsolete support for menu bars
uudecode(1), uuencode(1) - encode/decode a binary file
uuencode(n) - UU-encode/decode binary data
xjc(1) - Java XML Binding Compiler
yencode(n) - Y-encode/decode binary data
GetFileInfo(1), /usr/bin/GetFileInfo(1) - get attributes of files and directories (DEPRECATED)
SetFile(1), /usr/bin/SetFile(1) - set attributes of files and directories (DEPRECATED)
SplitForks(1), /usr/bin/SplitForks(1) - Divide a two-fork HFS file into AppleDouble format resource and data files. (DEPRECATED)
git-bisect(1) - Use binary search to find the commit that introduced a bug
redo_prebinding(1) - redo the prebinding of an executable or dynamic library
strings(1) - find the printable strings in a object, or other binary, file

NETSTAT(1) BSD General Commands Manual NETSTAT(1)

NAME
netstat – show network status

SYNOPSIS
netstat [-AaLlnW] [-f address_family | -p protocol]
netstat [-gilns] [-v] [-f address_family] [-I interface]
netstat -i | -I interface [-w wait] [-c queue] [-abdgqRtS]
netstat -s [-s] [-f address_family | -p protocol] [-w wait]
netstat -i | -I interface -s [-f address_family | -p protocol]
netstat -m [-m]
netstat -r [-Aaln] [-f address_family]
netstat -rs [-s]

DESCRIPTION
The netstat command symbolically displays the contents of various net-
work-related data structures. There are a number of output formats,
depending on the options for the information presented. The first form
of the command displays a list of active sockets for each protocol. The
second form presents the contents of one of the other network data struc-
tures according to the option selected. Using the third form, with a wait
interval specified, netstat will continuously display the information
regarding packet traffic on the configured network interfaces. The
fourth form displays statistics for the specified protocol or address
family. If a wait interval is specified, the protocol information over
the last interval seconds will be displayed. The fifth form displays
per-interface statistics for the specified protocol or address family.
The sixth form displays mbuf(9) statistics. The seventh form displays
routing table for the specified address family. The eighth form displays
routing statistics.

 The options have the following meaning:

 -A    With the default display, show the address of any protocol control
       blocks associated with sockets and the flow hash; used for debug-
       ging.

 -a    With the default display, show the state of all sockets; normally
       sockets used by server processes are not shown. With the routing
       table display (option -r, as described below), show protocol-cloned
       routes (routes generated by a RTF_PRCLONING parent route); normally
       these routes are not shown.

 -b    With the interface display (option -i, as described below), show
       the number of bytes in and out.

 -c queue
       With the queue statistics (option -q, as described below), show
       only those for the specified queue.

 -d    With either interface display (option -i or an interval, as
       described below), show the number of dropped packets.

 -f address_family
       Limit statistics or address control block reports to those of the
       specified address family.  The following address families are rec-
       ognized: inet, for AF_INET, inet6, for AF_INET6 and unix, for
       AF_UNIX.

 -g    Show information related to multicast (group address) membership.
       If the -s option is also present, show extended interface group
       management statistics.  If the -v option is specified, show link-
       layer memberships; they are suppressed by default.  Source lists
       for each group will also be printed.  Specifiying -v twice will
       print the control plane timers for each interface and the source
       list counters for each group.  If the -i is specified, only that
       interface will be shown.  If the -f is specified, only information
       for the address family will be displayed.

 -I interface
       Show information about the specified interface; used with a wait
       interval as described below.  If the -s option is present, show
       per-interface protocol statistics on the interface for the speci-
       fied address_family or protocol, or for all protocol families.

 -i    Show the state of interfaces which have been auto-configured
       (interfaces statically configured into a system, but not located at
       boot time are not shown).  If the -a options is also present, mul-
       ticast addresses currently in use are shown for each Ethernet
       interface and for each IP interface address.  Multicast addresses
       are shown on separate lines following the interface address with
       which they are associated.  If the -s option is present, show per-
       interface statistics on all interfaces for the specified
       address_family or protocol, or for all protocol families.

 -L    Show the size of the various listen queues.  The first count shows
       the number of unaccepted connections.  The second count shows the
       amount of unaccepted incomplete connections.  The third count is
       the maximum number of queued connections.

 -l    Print full IPv6 address.

 -m    Show statistics recorded by the memory management routines (the
       network stack manages a private pool of memory buffers). More
       detailed information about the buffers, which includes their cache
       related statistics, can be obtained by using -mm or -m -m option.

 -n    Show network addresses as numbers (normally netstat interprets
       addresses and attempts to display them symbolically).  This option
       may be used with any of the display formats.

 -p protocol
       Show statistics about protocol, which is either a well-known name
       for a protocol or an alias for it.  Some protocol names and aliases
       are listed in the file /etc/protocols.  The special protocol name
       ``bdg'' is used to show bridging statistics.  A null response typi-
       cally means that there are no interesting numbers to report.  The
       program will complain if protocol is unknown or if there is no sta-
       tistics routine for it.

 -q    Show network interface send queue statistics.  By default all
       queues are displayed, unless specified with -c.  This option
       requires specifying an interface with -I option.  More detailed
       information about the queues, which includes their queueing algo-
       rithm related statistics, can be obtained by using -qq or -q -q
       option.

 -r    Show the routing tables.  Use with -a to show protocol-cloned
       routes.  When -s is also present, show routing statistics instead.
       When -l is also present, netstat assumes more columns are there and
       the maximum transmission unit.  More detailed information about the
       route metrics are displayed with -ll for TCP round trip times -lll
       for all metrics.  Use the -z flags to display only entries with
       non-zero RTT values.  (``mtu'') are also displayed.

 -R    Show reachability information.  Use with -i to show link-layer
       reachability information for a given interface.

 -s    Show per-protocol statistics.  If this option is repeated, counters
       with a value of zero are suppressed.  For security reasons, root
       privileges are required to read TCP statistics and in the absence
       of such privileges all TCP counters will be reported as zero.

 -S    Show interface link status and interface state information about
       the specified interface.  This option requires specifying an inter-
       face with -I option.

 -v    Increase verbosity level.

 -W    In certain displays, avoid truncating addresses even if this causes
       some fields to overflow.

 -w wait
       Show network interface or protocol statistics at intervals of wait
       seconds.

 -x    Show extended link-layer reachability information in addition to
       that shown by the -R flag.

OUTPUT
The default display, for active sockets, shows the local and remote
addresses, send and receive queue sizes (in bytes), protocol, and the
internal state of the protocol. Address formats are of the form
host.port'' ornetwork.port’’ if a socket’s address specifies a net-
work but no specific host address. If known, the host and network
addresses are displayed symbolically according to the databases
/etc/hosts and /etc/networks, respectively. If a symbolic name for an
address is unknown, or if the -n option is specified, the address is
printed numerically, according to the address family. For more informa-
tion regarding the Internet dot format'', refer to inet(3)). Unspeci- fied, orwildcard’’, addresses and ports appear as ``*’’.

 Internet domain socket states:

 CLOSED:  The socket is not in use.

 LISTEN:  The socket is listening for incoming connections.  Unconnected
 listening sockets like these are only displayed when using the -a option.

 SYN_SENT:  The socket is actively trying to establish a connection to a
 remote peer.

 SYN_RCVD:  The socket has passively received a connection request from a
 remote peer.

 ESTABLISHED:  The socket has an established connection between a local
 application and a remote peer.

 CLOSE_WAIT:  The socket connection has been closed by the remote peer,
 and the system is waiting for the local application to close its half of
 the connection.

 LAST_ACK:  The socket connection has been closed by the remote peer, the
 local application has closed its half of the connection, and the system
 is waiting for the remote peer to acknowledge the close.

 FIN_WAIT_1:  The socket connection has been closed by the local
 application, the remote peer has not yet acknowledged the close, and the
 system is waiting for it to close its half of the connection.

 FIN_WAIT_2:  The socket connection has been closed by the local
 application, the remote peer has acknowledged the close, and the system
 is waiting for it to close its half of the connection.

 CLOSING:  The socket connection has been closed by the local application
 and the remote peer simultaneously, and the remote peer has not yet
 acknowledged the close attempt of the local application.

 TIME_WAIT:  The socket connection has been closed by the local
 application, the remote peer has closed its half of the connection, and
 the system is waiting to be sure that the remote peer received the last
 acknowledgement.

 The interface display provides a table of cumulative statistics regarding
 packets transferred, errors, and collisions.  The network addresses of
 the interface and the maximum transmission unit (``mtu'') are also dis-
 played.

 The routing table display indicates the available routes and their sta-
 tus.  Each route consists of a destination host or network and a gateway
 to use in forwarding packets.  The flags field shows a collection of
 information about the route stored as binary choices.  The individual
 flags are discussed in more detail in the route(8) and route(4) manual
 pages.  The mapping between letters and flags is:

 1       RTF_PROTO1       Protocol specific routing flag #1
 2       RTF_PROTO2       Protocol specific routing flag #2
 3       RTF_PROTO3       Protocol specific routing flag #3
 B       RTF_BLACKHOLE    Just discard packets (during updates)
 b       RTF_BROADCAST    The route represents a broadcast address
 C       RTF_CLONING      Generate new routes on use
 c       RTF_PRCLONING    Protocol-specified generate new routes on use
 D       RTF_DYNAMIC      Created dynamically (by redirect)
 G       RTF_GATEWAY      Destination requires forwarding by intermediary
 H       RTF_HOST         Host entry (net otherwise)
 I       RTF_IFSCOPE      Route is associated with an interface scope
 i       RTF_IFREF        Route is holding a reference to the interface
 L       RTF_LLINFO       Valid protocol to link address translation
 M       RTF_MODIFIED     Modified dynamically (by redirect)
 m       RTF_MULTICAST    The route represents a multicast address
 R       RTF_REJECT       Host or net unreachable
 r       RTF_ROUTER       Host is a default router
 S       RTF_STATIC       Manually added
 U       RTF_UP           Route usable
 W       RTF_WASCLONED    Route was generated as a result of cloning
 X       RTF_XRESOLVE     External daemon translates proto to link address
 Y       RTF_PROXY        Proxying; cloned routes will not be scoped

 Direct routes are created for each interface attached to the local host;
 the gateway field for such entries shows the address of the outgoing
 interface.  The refcnt field gives the current number of active uses of
 the route.  Connection oriented protocols normally hold on to a single
 route for the duration of a connection while connectionless protocols
 obtain a route while sending to the same destination.  The use field pro-
 vides a count of the number of packets sent using that route.  The inter-
 face entry indicates the network interface utilized for the route.  A
 route which is marked with the RTF_IFSCOPE flag is instantiated for the
 corresponding interface.  A cloning route which is marked with the
 RTF_PROXY flag will not generate new routes that are associated with its
 interface scope.

 When netstat is invoked with the -w option and a wait interval argument,
 it displays a running count of statistics related to network interfaces
 or protocols.  An obsolete version of this option used a numeric parame-
 ter with no option, and is currently supported for backward compatibil-
 ity.  By default, this display summarizes information for all interfaces.
 Information for a specific interface may be displayed with the -I option.

SEE ALSO
nfsstat(1), ps(1), inet(4), unix(4), hosts(5), networks(5), protocols(5),
route(8), services(5), iostat(8),

HISTORY
The netstat command appeared in 4.2BSD.

 IPv6 support was added by WIDE/KAME project.

BUGS
The notion of errors is ill-defined.

Darwin June 15, 2001 Darwin

1. 使用date命令显示当前日期。 2. 使用 who命令显示当前所有登录用户的信息,试依次打开多个终端,再查看输出结果的变化。 3. 查看当前linux服务器的主机名的命令。(hostname) 4. 使用clear命令,清除屏幕信息。 5. 添加一个组账号,名称为group1,打开图形界面观察执行后的结果。 6. 查询文件group中group1的记录,改变group1组的GID 为666, 再查看文件group中group1的记录。 7. 以自己的姓名全拼创建一个用户,指定UID为555, 加上用户的备注信息(姓名全称、所在院系等),初始组为group1,有效组为root,打开图形界面观察执行后的结果。 8. 为以自己姓名命名的账户设置密码,并查看passwd文件和shadow文件的最后一行。 9. 使用命令给自己的姓名账户密码冻结,用passwd查看账户相关信息,最后给账户解冻。 10. 进入以自己姓名命名的用户主目录,显示当前的路径,退出当前目录,返回根目录。 11. 复制文件/etc/passwd到用户主目录,文件名不变,打开图形界面Nautilus的窗口观察执行后的结果。 12. 统计文件/etc/passwd文件的字节数和行数。 13. 创建普通文件/home/abc1,创建普通文件/home/abc2。 14. 将/etc/passwd的内容追加到文件abc1中,将/etc/group的内容追加到文件abc2中。(利用附加输出重定向命令)。 15. 修改文件abc1的属性为:属主具有一切权限,同组用户和其他用户具有可读可写的权限。(使用数字模式) 16. 修改abc2的属性为:给其他用户增加可执行的权限。(使用功能模式) 17. 以长文件形式显示文件abc1的详细信息。 18. 进入/home目录,将文件abc1和abc2打包成文件ab.tar,放在以自己姓名命名的用户主目录下(比如/home/liqun),打开图形界面Nautilus的窗口观察执行后的结果。 19. 创建Readme.txt文本文件,内容为你的姓名全拼、学号等信息,保存关闭后用命令查看Readme.txt文件的内容,并在每一行前加行号。 20. 在root目录下创建新文件夹mydir1,其绝对路径为“/root/testdir/mydir1”(假设testdir目录事先并不存在)。 21. 在root目录下创建新文件夹dir1,将其移动到 /root/testdir/mydir1目录下。在root目录下创建新文件夹dir2,将其移动到 /root/testdir目录下,并将其改名为mydir2。打开图形界面Nautilus的窗口,观察以上这些步骤执行后的结果。 22. 分别删除/testdir目录下的mydir1和mydir2目录。(注意rm命令不加-r选项,系统会提示mydir1是个目录不能删除。)(尝试重复步骤20和步骤21,重建上述目录,执行步骤22,比较增加-f选项的区别)。 23. 建立文件/etc/group的符号链接文件/root/a.b,打开图形界面Nautilus的窗口观察a.b文件的特征。 24. 进入根目录的tmp目录下,建立test1和test2两个文件夹,在test1中建立文件a.log, b.log,用ls命令查看所创建的文件a.log,b.log。再把a.log 硬连接到test2目录,文件同名。把b.log 软链接到test2目录下,文件同名。用ls命令查看test2文件夹下所创建的文件,并打开图形界面Nautilus的窗口观察文件夹test2下a.log文件和b.log文件的特征。 25. 由超级用户切换为以自己姓名命名的普通用户身份,并使用普通用户的环境变量,再切换回超级用户身份。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值