20 Super-Helpful Bash Commands 20個超實用巴什命令

by Ken Murray on November 10, 2008 肯穆雷 2008年11月10日

Linux操作系統

This isn’t really a tutorial, more like a list of some of the bash commands that I use the most and a very brief description of what I use them for.這是不是一個真正的補習,更像是一個清單的一些慶祝命令,我用的是最和一個非常簡短的說明,我使用它們的。

ifconfig

Used to find out your IP address.用來尋找你的IP地址。 (look at wlan0, the line beginning with ‘inet addr’) (看看wlan0 ,該行開始' Inet電子地址' )

[kmurray@radon ~]$ /sbin/ifconfig [ kmurray @氡〜 ] $ / sbin / ifconfig
lo Link encap:Local Loopback羅連封裝:本地環回
inet addr:127.0.0.1 Mask:255.0.0.0 Inet電子地址: 127.0.0.1面膜: 255.0.0.0
inet6 addr: ::1/128 Scope:Host inet6地址: : : 128分之1範圍:主機
UP LOOPBACK RUNNING MTU:16436 Metric:1向上迴路運行的MTU : 16436公制: 1
RX packets:19266 errors:0 dropped:0 overruns:0 frame:0接收的數據包: 19266錯誤: 0下跌: 0超支: 0畫面: 0
TX packets:19266 errors:0 dropped:0 overruns:0 carrier:0德克薩斯州的數據包: 19266錯誤: 0下跌: 0超支: 0承運人: 0
collisions:0 txqueuelen:0碰撞: 0 txqueuelen : 0
RX bytes:963988 (941.3 KiB) TX bytes:963988 (941.3 KiB)接收字節: 963988 ( 941.3 KiB )德克薩斯州字節: 963988 ( 941.3 KiB )

wlan0 Link encap:Ethernet HWaddr 00:1A:73:0F:0E:FD wlan0鏈路封裝:以太網HWaddr 0時零一分答: 73:0傳真: 0E :消化不良
inet addr:192.168.1.139 Bcast:192.168.1.255 Mask:255.255.255.0 Inet電子地址: 192.168.1.139 Bcast : 192.168.1.255遮罩: 255.255.255.0
inet6 addr: fe80::21a:73ff:fe0f:efd/64 Scope:Link inet6地址: fe80 : : 51 : 73ff : fe0f : efd/64範圍:鏈接
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1廣播向上運行組播的MTU : 1500公制: 1
RX packets:8712 errors:0 dropped:0 overruns:0 frame:0接收的數據包: 8712錯誤: 0下跌: 0超支: 0畫面: 0
TX packets:8944 errors:0 dropped:0 overruns:0 carrier:0德克薩斯州的數據包: 8944錯誤: 0下跌: 0超支: 0承運人: 0
collisions:0 txqueuelen:1000碰撞: 0 txqueuelen : 1000
RX bytes:8002586 (7.6 MiB) TX bytes:3113446 (2.9 MiB)接收字節: 8002586 ( 7.6貨款)德克薩斯州字節: 3113446 ( 2.9黑冰)

route -n航線正

Used to find the IP address of your default gateway.用來尋找的IP地址,你的默認網關。 (look for the line with a G in the Flags column} (尋找符合一個G的標誌欄)

[kmurray@radon ~]$ /sbin/route -n [ kmurray @氡〜 ] $ / sbin /航線正
Kernel IP routing table核心IP路由表
Destination Gateway Genmask Flags Metric Ref Use Iface目的地網關Genmask旗參使用公制Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0 192.168.1.0 0.0.0.0 255.255.255.0 ü 0 0 0 wlan0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0 0.0.0.0 192.168.1.1 0.0.0.0基於UG 0 0 0 wlan0

ip知識產權

I use this one similarly to ifconfig and route.我用這一個類似ifconfig和route 。

[kmurray@radon ~]$ /sbin/ip route [ kmurray @氡〜 ] $ / sbin / IP路由
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.139 192.168.1.0/24開發wlan0原內核源範圍聯繫192.168.1.139
default via 192.168.1.1 dev wlan0 proto static默認通過192.168.1.1開發wlan0原靜

[kmurray@radon ~]$ /sbin/ip addr [ kmurray @氡〜 ] $ / sbin / IP協議地址
1: lo: 1 :樂: mtu 16436 qdisc noqueue state UNKNOWN奔馳16436 qdisc noqueue狀態未知
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00聯繫/回環00:00:00:00:00:00脫氧00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo Inet電子127.0.0.1 / 8範圍東道國樂
inet6 ::1/128 scope host inet6 : :一百二十八分之一範圍東道國
valid_lft forever preferred_lft forever valid_lft永遠永遠preferred_lft
2: eth0: 2 : eth0這個: mtu 1500 qdisc noop state DOWN qlen 1000奔馳1500 qdisc noop狀態向下qlen 1000
link/ether 00:16:d4:ec:25:4b brd ff:ff:ff:ff:ff:ff聯繫/醚零點16 : D4類:歐共體: 25:4 b脫氧頁:頁:頁:頁:頁:頁
3: wlan0: 3 : wlan0 : mtu 1500 qdisc pfifo_fast state UP qlen 1000奔馳1500 qdisc pfifo_fast狀態向上qlen 1000
link/ether 00:1a:73:0f:0e:fd brd ff:ff:ff:ff:ff:ff聯繫/醚0時01分在: 73:0傳真: 0e :峽灣脫氧頁:頁:頁:頁:頁:頁
inet 192.168.1.139/24 brd 192.168.1.255 scope global wlan0 Inet電子192.168.1.139/24脫氧192.168.1.255全球範圍wlan0
inet6 fe80::21a:73ff:fe0f:efd/64 scope link inet6 fe80 : : 51 : 73ff : fe0f : efd/64範圍鏈接
valid_lft forever preferred_lft forever valid_lft永遠永遠preferred_lft

ping

Used to test network connectivity.用於測試網絡連接。

[kmurray@radon ~]$ ping 192.168.1.1 [ kmurray @氡〜 ] $平192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.平192.168.1.1 ( 192.168.1.1 ) 56 ( 84 )字節的數據。
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=1.23 ms 64字節從192.168.1.1 : icmp_seq = 1的TTL = 64時= 1.23毫秒
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=1.17 ms 64字節從192.168.1.1 : icmp_seq = 2的TTL = 64時= 1.17毫秒
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=1.14 ms 64字節從192.168.1.1 : icmp_seq = 3的TTL = 64時= 1.14毫秒
64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=1.19 ms 64字節從192.168.1.1 : icmp_seq = 4間隔時間= 64 = 1.19毫秒
^C ^ ç
— 192.168.1.1 ping statistics — -1 92.168.1.1平統計數字-
4 packets transmitted, 4 received, 0% packet loss, time 3268ms第4包轉發, 4收到, 0 %丟包,時間3268ms
rtt min/avg/max/mdev = 1.149/1.190/1.238/0.032 ms內河碼頭民/平均/最大/ mdev = 1.149/1.190/1.238/0.032毫秒

traceroute跟踪路由

Another network connectivity tool.另一個網絡連接的工具。 This one tells you how many routers you have to go through in order to connect to a particular host.這是告訴你有多少路由器你就必須一直以連接到特定主機。

[kmurray@radon ~]$ traceroute simplehelp.net [ kmurray @氡〜 ] $跟踪路由simplehelp.net
traceroute to simplehelp.net (74.52.95.42), 30 hops max, 60 byte packets跟踪路由到simplehelp.net ( 74.52.95.42 ) , 30啤酒花最大, 60字節的數據包
1 192.168.1.1 (192.168.1.1) 1.121 ms 2.010 ms 2.218 ms 1 192.168.1.1 ( 192.168.1.1 ) 1.121毫秒2.010毫秒2.218毫秒
2 24.68.178.1 (24.68.178.1) 25.950 ms * *第2 24.68.178.1 ( 24.68.178.1 ) 25.950毫秒* *
3 * * * 3 * * *
4 * * * 4 * * *
5 rc2bb-pos0-1-5-0.vc.shawcable.net (66.163.77.185) 39.178 ms 128.371 ms 50.787 ms第5 rc2bb - pos0 - 1 - 5 - 0.vc.shawcable.net ( 66.163.77.185 ) 39.178毫秒128.371毫秒50.787毫秒
6 rc2sj-pos6-0-0.cl.shawcable.net (66.163.77.70) 119.703 ms 76.364 ms 88.337 ms 6日rc2sj - pos6 - 0 - 0.cl.shawcable.net ( 66.163.77.70 ) 119.703毫秒76.364毫秒88.337毫秒
7 rc2sj-ge2-0-0.cl.shawcable.net (66.163.67.10) 110.862 ms 55.853 ms * 7日rc2sj - ge2 - 0 - 0.cl.shawcable.net ( 66.163.67.10 ) 110.862毫秒55.853毫秒*
8 * rx0sj-comcast.cl.shawcable.net (66.163.67.110) 61.930 ms 109.439 ms 8 * rx0sj - comcast.cl.shawcable.net ( 66.163.67.110 ) 61.930毫秒109.439毫秒
9 pos-0-8-0-0-cr01.losangeles.ca.ibone.comcast.net (68.86.85.82) 79.587 ms 102.306 ms 81.225 ms第9郵報- 0 - 8 - 0 - 0 - cr01.losangeles.ca.ibone.comcast.net ( 68.86.85.82 ) 79.587毫秒102.306毫秒81.225毫秒
10 pos-0-9-0-0-cr01.dallas.tx.ibone.comcast.net (68.86.85.142) 120.064 ms 125.584 ms 118.207 ms 10個位置- 0 - 9 - 0 - 0 - cr01.dallas.tx.ibone.comcast.net ( 68.86.85.142 )一百二十○點〇六四毫秒125.584毫秒118.207毫秒
11 68.86.88.50 (68.86.88.50) 107.133 ms 109.350 ms 113.994 ms 11日68.86.88.50 ( 68.86.88.50 ) 107.133毫秒109.350毫秒113.994毫秒
12 te9-1.dsr02.dllstx3.theplanet.com (70.87.253.22) 87.928 ms 87.949 ms te9-1.dsr01.dllstx3.theplanet.com (70.87.253.6) 89.500 ms 12日te9 - 1.dsr02.dllstx3.theplanet.com ( 70.87.253.22 ) 87.928毫秒87.949毫秒te9 - 1.dsr01.dllstx3.theplanet.com ( 70.87.253.6 ) 89.500毫秒
13 76.fd.5746.static.theplanet.com (70.87.253.118) 99.789 ms 97.329 ms 100.789 ms 13 76.fd.5746.static.theplanet.com ( 70.87.253.118 ) 99.789毫秒97.329毫秒100.789毫秒
14 po1.car03.dllstx6.theplanet.com (12.96.160.5) 91.323 ms 91.788 ms po2.car03.dllstx6.theplanet.com (12.96.160.37) 89.571 ms 14 po1.car03.dllstx6.theplanet.com ( 12.96.160.5 ) 91.323毫秒91.788毫秒po2.car03.dllstx6.theplanet.com ( 12.96.160.37 ) 89.571毫秒
15 2a.5f.344a.static.theplanet.com (74.52.95.42) 92.695 ms 92.601 ms 91.871 ms 15 2a.5f.344a.static.theplanet.com ( 74.52.95.42 ) 92.695毫秒92.601毫秒91.871毫秒

host主人

Used to look up the IP address of a fully qualified domain name.用仰視的IP地址完全合格的域名。

[kmurray@radon ~]$ host simplehelp.net [ kmurray @氡〜 ] $東道國simplehelp.net
simplehelp.net has address 74.52.95.42 simplehelp.net已解決74.52.95.42
simplehelp.net mail is handled by 10 aspmx.l.google.com. simplehelp.net郵件是由10個aspmx.l.google.com 。

dig

A more advanced DNS query tool.更先進的DNS查詢工具。

[kmurray@radon ~]$ dig simplehelp.net a [ kmurray @氡〜 ] $挖simplehelp.net 1

; <<>> DiG 9.5.0-P2 <<>> simplehelp.net a ; “ ” “ ”挖9.5.0 -的P2 “ ” “ ” simplehelp.net 1
;; global options: printcmd ; ;全球選擇: printcmd
;; Got answer: ; ;獲得答案:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25242 ; ; -> “ ”頭“ ” -操作碼:查詢,狀態:N O ERROR,編號:2 5 242
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ; ;旗幟:二維路嶺;查詢: 1 ,回答: 1 ,權威性: 0 ,附加: 0

;; QUESTION SECTION: ; ;問題區段:
;simplehelp.net. ; simplehelp.net 。 IN A

;; ANSWER SECTION: ; ;答題科:
simplehelp.net. simplehelp.net 。 86238 IN A 74.52.95.42 86238中74.52.95.42

;; Query time: 1 msec ; ;查詢時間: 1毫秒
;; SERVER: 192.168.1.1#53(192.168.1.1) ; ;服務器: 192.168.1.1 # 53 ( 192.168.1.1 )
;; WHEN: Fri Oct 31 20:21:49 2008 ; ;時間:週五10月31日20時21分49秒2008年
;; MSG SIZE rcvd: 48 ; ;味精大小rcvd : 48

This shows that the IP address of the server where simplehelp.net resides is 74.52.95.42.這表明, IP地址的服務器simplehelp.net居住的是74.52.95.42 。

[kmurray@radon ~]$ dig simplehelp.net mx [ kmurray @氡〜 ] $挖simplehelp.net的MX

; <<>> DiG 9.5.0-P2 <<>> simplehelp.net mx ; “ ” “ ”挖9.5.0 -的P2 “ ” “ ” simplehelp.net的MX
;; global options: printcmd ; ;全球選擇: printcmd
;; Got answer: ; ;獲得答案:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17277 ; ; -> “ ”頭“ ” -操作碼:查詢,狀態:N O ERROR,編號:1 7 277
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 2 ; ;旗幟:二維路嶺;查詢: 1 ,回答: 1 ,權威性: 0 ,附加: 2

;; QUESTION SECTION: ; ;問題區段:
;simplehelp.net. ; simplehelp.net 。 IN MX中的MX

;; ANSWER SECTION: ; ;答題科:
simplehelp.net. simplehelp.net 。 86317 IN MX 10 aspmx.l.google.com. 86317中的MX 10個aspmx.l.google.com 。

;; ADDITIONAL SECTION: ; ;附加區段:
aspmx.l.google.com. aspmx.l.google.com 。 180 IN A 209.85.199.27 180中209.85.199.27
aspmx.l.google.com. aspmx.l.google.com 。 180 IN A 209.85.199.114 180中的209.85.199.114

;; Query time: 40 msec ; ;查詢時間: 40毫秒
;; SERVER: 192.168.1.1#53(192.168.1.1) ; ;服務器: 192.168.1.1 # 53 ( 192.168.1.1 )
;; WHEN: Fri Oct 31 20:21:51 2008 ; ;時間:週五10月31日20時21分51秒2008年
;; MSG SIZE rcvd: 98 ; ;味精大小rcvd : 98

This shows that mail for simplehelp.net is managed by aspmx.l.google.com and that aspmx.l.google.com has two IP addresses, 209.85.199.27 and 209.85.199.114.這表明,電子郵件simplehelp.net是由aspmx.l.google.com和aspmx.l.google.com有兩個IP地址, 209.85.199.27和209.85.199.114 。

[kmurray@radon ~]$ dig simplehelp.net ns [ kmurray @氡〜 ] $挖simplehelp.net納秒

; <<>> DiG 9.5.0-P2 <<>> simplehelp.net ns ; “ ” “ ”挖9.5.0 -的P2 “ ” “ ” simplehelp.net納秒
;; global options: printcmd ; ;全球選擇: printcmd
;; Got answer: ; ;獲得答案:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62957 ; ; -> “ ”頭“ ” -操作碼:查詢,狀態:N O ERROR,編號:6 2 957
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 8 ; ;旗幟:二維路嶺;查詢: 1 ,回答: 2 ,權威性: 0 ,附加: 8

;; QUESTION SECTION: ; ;問題區段:
;simplehelp.net. ; simplehelp.net 。 IN NS在生理鹽水

;; ANSWER SECTION: ; ;答題科:
simplehelp.net. simplehelp.net 。 70617 IN NS ns1.theplanet.com. 70617的生理鹽水ns1.theplanet.com 。
simplehelp.net. simplehelp.net 。 70617 IN NS ns2.theplanet.com. 70617的生理鹽水ns2.theplanet.com 。

;; ADDITIONAL SECTION: ; ;附加區段:
ns1.theplanet.com. ns1.theplanet.com 。 172785 IN A 70.86.61.133 172785中70.86.61.133
ns2.theplanet.com. ns2.theplanet.com 。 172785 IN A 70.86.61.135 172785中70.86.61.135
ns1.theplanet.com. ns1.theplanet.com 。 172785 IN A 70.86.61.134 172785中70.86.61.134
ns2.theplanet.com. ns2.theplanet.com 。 172785 IN A 70.87.7.73 172785中70.87.7.73
ns1.theplanet.com. ns1.theplanet.com 。 172785 IN A 70.87.7.71 172785中70.87.7.71
ns1.theplanet.com. ns1.theplanet.com 。 172785 IN A 70.87.7.70 172785中70.87.7.70
ns2.theplanet.com. ns2.theplanet.com 。 172785 IN A 70.86.61.136 172785中70.86.61.136
ns2.theplanet.com. ns2.theplanet.com 。 172785 IN A 70.87.7.72 172785中70.87.7.72

;; Query time: 33 msec ; ;查詢時間: 33毫秒
;; SERVER: 192.168.1.1#53(192.168.1.1) ; ;服務器: 192.168.1.1 # 53 ( 192.168.1.1 )
;; WHEN: Fri Oct 31 20:21:55 2008 ; ;時間:週五10月31日20時21分55秒2008年
;; MSG SIZE rcvd: 209 ; ;味精大小rcvd : 209

This shows that DNS for simplehelp.net is handled by ns1.theplanet.com and ns2.theplanet.com.這表明, DNS進行simplehelp.net是由ns1.theplanet.com和ns2.theplanet.com 。 It also shows that these nameservers have multiple IP addresses.它還表明,這些服務器有多個IP地址。

iwlist

Get information from a wireless interface.獲取信息的無線接口。 (this one needs to be run as root) (這是需要運行根)

[root@radon ~]# iwlist wlan0 scan [根@氡〜 ] # iwlist wlan0掃描
wlan0 Scan completed : wlan0掃描完成:
Cell 01 - Address: 00:10:18:90:20:DB細胞01 -地址: 0 0:10:18:90:20:數據庫
ESSID:”Coffee” ESSID : “咖啡”
Mode:Master模式:碩士
Channel:6通道: 6
Frequency:2.437 GHz (Channel 6)頻率: 2.437千兆赫(頻道6 )
Quality=96/100 Signal level:-37 dBm Noise level=-70 dBm質量= 100分之96信號級別: -37 dBm的噪聲水平=- 70 dBm的
Encryption key:off加密密鑰:關閉
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s比特率: 1 Mb / s的2 Mb / s的; 5.5 Mb / s的11 Mb / s的6 Mb / s的
9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s第9 Mb / s的12 Mb / s的; 18 Mb / s的; 24 Mb / s的; 36 Mb / s的
48 Mb/s; 54 Mb/s 48 Mb / s的; 54 Mb / s的
Extra:tsf=0000017f91cc818a特:支助機制= 0000017f91cc818a
Extra: Last beacon: 19ms ago特:最後的燈塔: 19ms前
Cell 02 - Address: 00:11:50:6E:BC:3A細胞02 -地址: 0 0:11:50:6電子郵件:公元前: 3 A條
ESSID:”Belkin Traveler” ESSID : “貝爾旅行者”
Mode:Master模式:碩士
Channel:1通道: 1
Frequency:2.412 GHz (Channel 1)頻率: 2.412千兆赫(頻道1 )
Quality=88/100 Signal level:-44 dBm Noise level=-70 dBm質量=百分之八十八信號級別: -44 dBm的噪聲水平=- 70 dBm的
Encryption key:off加密密鑰:關閉
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s比特率: 1 Mb / s的2 Mb / s的; 5.5 Mb / s的11 Mb / s的6 Mb / s的
12 Mb/s; 24 Mb/s; 36 Mb/s; 9 Mb/s; 18 Mb/s 12 Mb / s的; 24 Mb / s的; 36 Mb / s的9 Mb / s的; 18 Mb / s的
48 Mb/s; 54 Mb/s 48 Mb / s的; 54 Mb / s的
Extra:tsf=0000017f13571181特:支助機制= 0000017f13571181
Extra: Last beacon: 601ms ago特:最後的燈塔: 601ms前
Cell 03 - Address: 00:17:9A:9C:14:28細胞03 -地址: 0點一十七分0 9秒答: 9 C條: 1 4:28
ESSID:”Abby” ESSID : “艾比”
Mode:Master模式:碩士
Channel:6通道: 6
Frequency:2.437 GHz (Channel 6)頻率: 2.437千兆赫(頻道6 )
Quality=50/100 Signal level:-79 dBm Noise level=-70 dBm質量= 50/100信號級別: -79 dBm的噪聲水平=- 70 dBm的
Encryption key:off加密密鑰:關閉
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s比特率: 1 Mb / s的2 Mb / s的; 5.5 Mb / s的11 Mb / s的6 Mb / s的
9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s第9 Mb / s的12 Mb / s的; 18 Mb / s的; 24 Mb / s的; 36 Mb / s的
48 Mb/s; 54 Mb/s 48 Mb / s的; 54 Mb / s的
Extra:tsf=00000000cbe364d6特:支助機制= 00000000cbe364d6
Extra: Last beacon: 272ms ago特:最後的燈塔: 272ms前
Cell 04 - Address: 00:18:D1:A8:E8:1A細胞04 -地址: 0 0:18: D 1類:答8 : E 8: 1 A款
ESSID:”Gigaset815″ ESSID : “ Gigaset815 ”
Mode:Master模式:碩士
Channel:4頻道: 4
Frequency:2.427 GHz (Channel 4)頻率: 2.427千兆赫( 4頻道)
Quality=45/100 Signal level:-83 dBm Noise level=-70 dBm質量= 100分之45信號級別: -83 dBm的噪聲水平=- 70 dBm的
Encryption key:on加密密鑰:關於
IE: WPA Version 1即:第1版的WPA
Group Cipher : TKIP組密碼: TKIP
Pairwise Ciphers (1) : TKIP配對密碼( 1 ) : TKIP
Authentication Suites (1) : PSK驗證套房( 1 ) :雲芝多醣
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 22 Mb/s比特率: 1 Mb / s的2 Mb / s的; 5.5 Mb / s的11 Mb / s的22 Mb / s的
6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s第6 Mb / s的9 Mb / s的12 Mb / s的; 18 Mb / s的; 24 Mb / s的
36 Mb/s; 48 Mb/s; 54 Mb/s 36 Mb / s的48 Mb / s的; 54 Mb / s的
Extra:tsf=0000015633a50e12特:支助機制= 0000015633a50e12
Extra: Last beacon: 571ms ago特:最後的燈塔: 571ms前

This shows that my computer currently sees four different wireless networks in the area along with their names, channels, signal strength, and whether or not they are encrypted or open.這表明,目前我的電腦看到四種不同的無線網絡在該地區連同他們的名字,渠道,信號強度,以及它們是否有加密或開放。

iwconfig

Like ifconfig, but for information about your wireless settings. ifconfig一樣,但對信息的無線設置。

[kmurray@radon ~]$ /sbin/iwconfig [ kmurray @氡〜 ] $ / sbin / iwconfig
lo no wireless extensions.羅沒有無線擴展。
eth0 no wireless extensions. eth0這個沒有無線擴展。
wlan0 IEEE 802.11bg ESSID:”Coffee” wlan0的IEEE 802.11bg ESSID : “咖啡”
Mode:Managed Frequency:2.437 GHz Access Point: 00:10:18:90:20:DB模式:管理頻率: 2.437千兆赫無線接入點: 00:10:18:90:20 :數據庫
Bit Rate=54 Mb/s Tx-Power=27 dBm碼率= 54 Mb / s的發射功率= 27 dBm的
Retry min limit:7 RTS thr:off Fragment thr=2352 B試敏限制: 7即時戰略線程:線程關閉片段= 2352乙
Link Quality=96/100 Signal level:-37 dBm Noise level=-70 dBm鏈路質量=百分之九十六信號級別: -37 dBm的噪聲水平=- 70 dBm的
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0接收無效nwid : 0接收無效隱窩: 0接收無效的片段: 0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0發送過多的嘗試: 0無效的雜項: 0漏診燈塔: 0

This shows that I’m currently connected to a wireless network called Coffee at 54 Mb/s and the signal strength is very good at 96%.這表明,目前我連接到一個無線網絡所謂的咖啡在54 Mb / s和信號強度非常好,至96 % 。

free自由的

How much memory and swap space is used/free.多少內存和交換空間是用來/免費的。

[kmurray@radon ~]$ free -m [ kmurray @氡〜 ] $免費米
total used free shared buffers cached共免費使用共享緩衝區緩存
Mem: 2017 1659 357 0 42 1078記憶: 2017年1659 357 0 42 1078
-/+ buffers/cache: 538 1478 -/ +緩衝器/高速緩存: 5 381 478
Swap: 1983 0 1983互換: 1983年0 1983年

mount芒特

Without any parameters, used to display mounted filesystems.沒有任何參數,用來顯示安裝文件。

[kmurray@radon ~]$ mount [ kmurray @氡〜 ] $貼裝
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw,noatime) / dev/mapper/VolGroup00-LogVol00上/類型ext3 (權限, noatime )
proc on /proc type proc (rw)關於處理/處理輸入處理(讀寫)
sysfs on /sys type sysfs (rw)關於sysfs /系統類型sysfs (讀寫)
devpts on /dev/pts type devpts (rw,gid=5,mode=620) devpts上的/ dev /分型devpts (權限,代表處= 5 ,模式= 620 )
/dev/sda2 on /boot type ext3 (rw,noatime) / dev/sda2上/啟動類型ext3 (權限, noatime )
tmpfs on /dev/shm type tmpfs (rw) tmpfs上的/ dev / shm類型tmpfs (讀寫)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)無/進程/系統/財政司司長/ binfmt_misc類型binfmt_misc (讀寫)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) sunrpc的是/ var / lib / NFS的/ rpc_pipefs類型rpc_pipefs (讀寫)
fusectl on /sys/fs/fuse/connections type fusectl (rw) fusectl上/系統/財政司司長/保險絲/連接型fusectl (讀寫)
gvfs-fuse-daemon on /home/kmurray/.gvfs type fuse.gvfs-fuse-daemon(rw,nosuid,nodev,user=kmurray) gvfs ,保險絲,守護在/家庭/ kmurray / .gvfs類型fuse.gvfs ,保險絲,守護進程(權限, nosuid , nodev ,用戶= kmurray )
/dev/sda1 on /media/disk type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096) / dev/sda1上/媒體/磁盤式fuseblk (權限, nosuid , nodev , allow_other , blksize = 4096 )

The interesting lines above are the ones indicating /dev/mapper/VolGroup00-LogVol00 on /, /dev/sda2 on /boot, and /dev/sda1 on /media/disk.有趣線以上的那些說明/ dev/mapper/VolGroup00-LogVol00上/ , / dev/sda2上/啟動和/ dev/sda1上/媒體/磁盤。

df自由度

Show disk space usage.查看磁盤空間的使用。

[kmurray@radon ~]$ df -h [ kmurray @氡〜 ] $自由度小時
Filesystem Size Used Avail Use% Mounted on文件大小使用使用利用安裝在%
/dev/sda2 190M 19M 162M 11% /boot / dev/sda2 190M分鐘162M 11 % /開機
tmpfs 1009M 1.1M 1008M 1% /dev/shm tmpfs 1009M 110 1008M 1 %的/ dev / shm
gvfs-fuse-daemon 60G 44G 16G 74% /home/kmurray/.gvfs gvfs ,保險絲,守護60克44G 16G 74 % /家庭/ kmurray / .gvfs
/dev/sda1 31G 29G 2.5G 93% /media/disk / dev/sda1 31G 29G款的2.5G 93 % /媒體/磁盤

This shows that /dev/sda1 is almost full at 93%.這表明, / dev/sda1幾乎是全部在93 % 。 Time to delete some files or upgrade the disk.時間刪除一些文件或升級的磁盤。

du

Show disk space usage in a directory.查看磁盤空間的使用目錄中。

[kmurray@radon ~]$ du -hc Documents/N95/tutorials/ [ kmurray @氡〜 ] $迪慧聰Documents/N95/tutorials /
380K Documents/N95/tutorials/done/bluetooth gps 410 Documents/N95/tutorials/done/bluetooth全球定位系統
480K Documents/N95/tutorials/done/putty fonts 480K Documents/N95/tutorials/done/putty字體
1.4M Documents/N95/tutorials/done/gparted 140萬Documents/N95/tutorials/done/gparted
1.1M Documents/N95/tutorials/done/remote filesystem gnome 110 Documents/N95/tutorials/done/remote文件金言
1.4M Documents/N95/tutorials/done/gnome keyboard shortcuts 140萬Documents/N95/tutorials/done/gnome鍵盤快捷鍵
2.1M Documents/N95/tutorials/done/download helper 210萬Documents/N95/tutorials/done/download幫手
992K Documents/N95/tutorials/done/mconnection 992K Documents/N95/tutorials/done/mconnection
1008K Documents/N95/tutorials/done/snap links 1008K Documents/N95/tutorials/done/snap鏈接
5.0M Documents/N95/tutorials/done/watermark gimp 5.0M Documents/N95/tutorials/done/watermark瘸子
1.2M Documents/N95/tutorials/done/gnome disk usage 120 Documents/N95/tutorials/done/gnome磁盤使用率
208K Documents/N95/tutorials/done/enhanced calculator 208K Documents/N95/tutorials/done/enhanced計算器
544K Documents/N95/tutorials/done/putty/orig 544K Documents/N95/tutorials/done/putty/orig
964K Documents/N95/tutorials/done/putty 964K Documents/N95/tutorials/done/putty
848K Documents/N95/tutorials/done/wifi ap 848K Documents/N95/tutorials/done/wifi電
1.4M Documents/N95/tutorials/done/imap gmail 140萬Documents/N95/tutorials/done/imap的Gmail
872K Documents/N95/tutorials/done/unsigned apps 872K Documents/N95/tutorials/done/unsigned應用
884K Documents/N95/tutorials/done/taskman 884K Documents/N95/tutorials/done/taskman
1.1M Documents/N95/tutorials/done/downthemall 110 Documents/N95/tutorials/done/downthemall
916K Documents/N95/tutorials/done/tethering bt 916K Documents/N95/tutorials/done/tethering勝
432K Documents/N95/tutorials/done/install apps wifi http 432K Documents/N95/tutorials/done/install無線應用協議
924K Documents/N95/tutorials/done/tethering usb 924K Documents/N95/tutorials/done/tethering USB接口
320K Documents/N95/tutorials/done/install stuff via bluetooth 320K Documents/N95/tutorials/done/install的東西通過藍牙
416K Documents/N95/tutorials/done/smb4s60 416K Documents/N95/tutorials/done/smb4s60
1.1M Documents/N95/tutorials/done/download statusbar 110 Documents/N95/tutorials/done/download狀態
308K Documents/N95/tutorials/done/install stuff via usb 308K Documents/N95/tutorials/done/install的東西通過USB
828K Documents/N95/tutorials/done/nokia step counter 828K Documents/N95/tutorials/done/nokia步
4.3M Documents/N95/tutorials/todo 4.3M Documents/N95/tutorials/todo
52M Documents/N95/tutorials/ 52 Documents/N95/tutorials /
52M total共有52

This shows that my N95 tutorials directory is using a total of 52M and the breakdown of each directory’s size.這表明,我國N95型教程目錄是使用共52分和每個目錄的大小。

head

Display the first few lines of a file.顯示前幾行的文件。

[kmurray@radon ~]$ head /var/log/yum.log [ kmurray @氡〜 ] $頭部到/ var /日誌/ yum.log
Jun 13 22:30:33 Installed: bash-completion-20060301-10.noarch 6月13日22時三十分三十三秒安裝:慶祝完成- 20060301 - 10.noarch
Jun 13 22:31:31 Installed: yum-downloadonly-1.1.13-2.fc9.noarch 6月13日22時31分31秒安裝:蔭downloadonly - 1.1.13 - 2.fc9.noarch
Jun 14 06:20:11 Installed: swfdec-0.6.6-1.fc9.i386 6月14日6時20分11秒安裝: swfdec - 0.6.6 - 1.fc9.i386
Jun 14 06:20:13 Installed: swfdec-gtk-0.6.6-1.fc9.i386 6月14日6點20分十三秒安裝: swfdec ,基於GTK - 0.6.6 - 1.fc9.i386
Jun 14 06:20:14 Installed: swfdec-mozilla-0.6.0-1.fc9.i386 6月14日六時20分14秒安裝: swfdec - Mozilla的0.6.0 - 1.fc9.i386
Jun 14 06:34:41 Updated: libxml2-2.6.32-2.fc9.i386 6月14日6時34分41秒更新: libxml2 - 2.6.32 - 2.fc9.i386
Jun 14 06:34:41 Updated: dbus-glib-0.74-8.fc9.i386 6月14日6時34分41秒更新: dbus -巧舌如簧- 0.74 - 8.fc9.i386
Jun 14 06:34:42 Updated: libselinux-2.0.64-2.fc9.i386 6月14日6時34分四十二秒更新: libselinux - 2.0.64 - 2.fc9.i386
Jun 14 06:34:43 Updated: e2fsprogs-libs-1.40.8-3.fc9.i386 6月14日6時34分43秒更新: e2fsprogs -庫- 1.40.8 - 3.fc9.i386
Jun 14 06:34:43 Updated: audit-libs-1.7.4-1.fc9.i386 6月14日6時34分43秒更新:審計庫- 1.7.4 - 1.fc9.i386

By default, head displays the first 10 lines. head -20 /var/log/yum.log would show the first 20 lines.默認情況下,頭部顯示前10行。 頭-20到/ var /日誌/ yum.log將顯示的前20行。 You can use any arbitrary number.您可以使用任意號碼。

tail尾巴

Display the last few lines of a file.顯示最後幾行的文件。

[kmurray@radon ~]$ tail /var/log/yum.log [ kmurray @氡〜 ] $尾巴是/ var /日誌/ yum.log
Oct 30 23:19:56 Updated: 6:kdebase-libs-4.1.2-5.fc9.i386 10月30日23點19分56秒更新: 6 : kdebase -庫- 4.1.2 - 5.fc9.i386
Oct 30 23:19:57 Updated: 6:kdemultimedia-libs-4.1.2-2.fc9.i386 10月30日23時19分57秒更新: 6 : kdemultimedia ,庫- 4.1.2 - 2.fc9.i386
Oct 30 23:19:57 Updated: ksysguardd-4.1.2-6.fc9.i386 10月30日23時19分57秒更新: ksysguardd - 4.1.2 - 6.fc9.i386
Oct 30 23:19:58 Updated: phonon-backend-xine-4.1.2-5.fc9.i386 10月30日23時19分58秒更新:聲,後端- xine - 4.1.2 - 5.fc9.i386
Oct 30 23:20:08 Updated: kdebase-runtime-4.1.2-5.fc9.i386 10月30日23時20分○八秒更新: kdebase ,運行- 4.1.2 - 5.fc9.i386
Oct 30 23:20:11 Updated: kdebase-workspace-libs-4.1.2-6.fc9.i386 10月30日23點二十〇分11秒更新: kdebase -工作,庫- 4.1.2 - 6.fc9.i386
Oct 30 23:20:21 Updated: kdebase-workspace-4.1.2-6.fc9.i386 10月30日23點20分21秒更新: kdebase ,工作- 4.1.2 - 6.fc9.i386
Oct 30 23:20:27 Updated: 6:kdebase-4.1.2-5.fc9.i386 10月30日23點20分二十七秒更新: 6 : kdebase - 4.1.2 - 5.fc9.i386
Oct 30 23:20:39 Installed: kdebase-runtime-libs-4.1.2-5.fc9.i386 10月30日23時20分三十九秒安裝: kdebase ,運行時,庫- 4.1.2 - 5.fc9.i386
Oct 30 23:20:42 Updated: 6:kdemultimedia-4.1.2-2.fc9.i386 10月30日23時20分42秒更新: 6 : kdemultimedia - 4.1.2 - 2.fc9.i386

By default, tail displays the last 10 lines. tail -30 /var/log/yum.log would show the last 30 lines.默認情況下,尾部顯示在過去的10線。 尾巴-30到/ var /日誌/ yum.log將顯示在過去30線。 You can use any arbitrary number.您可以使用任意號碼。

grep

Search for a specific string within a file.搜尋特定字串內的一個文件。 (use zgrep to search a gzipped file) (使用zgrep搜尋gzip壓縮文件)

[kmurray@radon ~]$ grep firefox /var/log/yum.log [ kmurray @氡〜 ] $ grep瀏覽器是/ var /日誌/ yum.log
Jun 19 16:19:33 Updated: firefox-3.0-1.fc9.i386 6月19日16點19分33秒更新: Firefox的3.0 1.fc9.i386
Jul 24 04:48:06 Updated: firefox-3.0.1-1.fc9.i386 7月24日4時48分06秒更新: Firefox的3.0.1 - 1.fc9.i386
Oct 18 03:13:52 Updated: firefox-3.0.2-1.fc9.i386 10月18 3時13分52秒更新: Firefox的3.0.2 - 1.fc9.i386

This shows that “firefox” is listed three times in this file.這表明, “火狐”的上市三次在此文件中。

type類型

Determine which directory a command is in.確定哪些目錄命令是個

[kmurray@radon ~]$ type ping [ kmurray @氡〜 ] $鍵入ping
ping is hashed (/bin/ping)平是哈希( /斌/平)

Ahh, so ping lives in /bin.稀釋,使生活在平/本。

locate找到

Locate any arbitrary file on the filesystem.找到任意文件的文件。

[kmurray@radon ~]$ locate *.rpm [ kmurray @氡〜 ] $找到*.轉速
/home/kmurray/Download/VirtualBox-2.0.2_36488_fedora9-1.i386.rpm / home/kmurray/Download/VirtualBox-2.0.2_36488_fedora9-1.i386.rpm
/home/kmurray/Download/VirtualBox-2.0.4_38406_fedora9-1.i386.rpm / home/kmurray/Download/VirtualBox-2.0.4_38406_fedora9-1.i386.rpm
/home/kmurray/Download/skype-2.0.0.72-fc5.i586.rpm / home/kmurray/Download/skype-2.0.0.72-fc5.i586.rpm
/home/kmurray/Download/synaptics-0.14.6-8.fc9.i386.rpm / home/kmurray/Download/synaptics-0.14.6-8.fc9.i386.rpm

I have four rpm files on this computer, all of them in /home/kmurray/Download.我有4個轉檔案在這台電腦上,它們都在/ home / kmurray /下載。

file文件

Determine what type a file is.確定哪些類型文件。

[kmurray@radon ~]$ file /bin/ping [ kmurray @氡〜 ] $文件/斌/平
/bin/ping: setuid ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped /斌/平: setuid埃爾夫32位元可執行LSB標準,英特爾80386 ,版本1 ( SYSV ) ,動態鏈接(使用共享庫) ,為GNU / Linux的2.6.9 ,剝奪

ping is a binary file. 是一個二進制文件。

[kmurray@radon ~]$ file Mythbusters.S02E04.flv [ kmurray @氡〜 ] $文件Mythbusters.S02E04.flv
Mythbusters.flv: Macromedia Flash Video Mythbusters.flv : Macromedia Flash的視頻

Mythbusters.S02E04.flv is a video. Mythbusters.S02E04.flv是一個視頻。

[kmurray@radon ~]$ file /var/log/yum.log [ kmurray @氡〜 ] $文件是/ var /日誌/ yum.log
/var/log/yum.log: ASCII text是/ var /日誌/ yum.log : ASCII文本

/var/log/yum.log is a plain text file. 是/ var /日誌/ yum.log是一個純文本文件。

history歷史

Shows what commands you have been running on the command line.顯示命令你一直運行於命令行。

[kmurray@radon ~]$ history [ kmurray @氡〜 ] $歷史

991 du -hc Documents/N95/tutorials/ 991杜慧聰Documents/N95/tutorials /
992 ls /var/log/messages 992最小二乘到/ var /日誌/訊息
993 tail /var/log/messages 993尾到/ var /日誌/訊息
994 ls 994最小二乘
995 ls /var/log/ 995最小二乘到/ var /日誌/
996 ls -lh /var/log/ 996掃描儀LS -激素是/ var /日誌/
997 tail /var/log/yum.log 997尾到/ var /日誌/ yum.log
998 head /var/log/yum.log 998頭到/ var /日誌/ yum.log
999 grep firefox /var/log/yum.log 999 grep瀏覽到/ var /日誌/ yum.log
1000 sudo su - 1000須藤秀-
1001 cd src/ 1001年裁談會源/
1002 ls 1002年最小二乘
1003 tar -xvzf TrueCrypt\ 6.1\ Source.tar.gz 1003焦油xvzf TrueCrypt \ 6.1 \ Source.tar.gz
1004 cd truecrypt-6.1-source/ 1004年裁談會truecrypt - 6.1 -源/
1005 ls 1005年最小二乘
1006 less Readme.txt 1006年少Readme.txt
1007 make 1007年作
1008 less Readme.txt 1008年少Readme.txt
1009 make 1009使
1010 make 1010使
1011 cd 1011年裁談會
1012 cd .VirtualBox/VDI/ 1012裁談會.VirtualBox /德國施/
1013 ls 1013年最小二乘
1014 cat RawUSBsdb.vdi 1014年貓RawUSBsdb.vdi
1015 mv RawUSBsdb.vdi RawUSBsdb1G.vdi 1015電位RawUSBsdb.vdi RawUSBsdb1G.vdi
1016 cp RawUSBsdb1G.vdi RawUSBsdb2G.vdi 1016年蛋白RawUSBsdb1G.vdi RawUSBsdb2G.vdi
1017 vim RawUSBsdb2G.vdi 1017答卷RawUSBsdb2G.vdi
1018 rm RawUSBsdb2G.vdi 1018年視頻RawUSBsdb2G.vdi
1019 pwd 1019密碼
1020 VBoxManage internalcommands createrawvmdk -filename /home/kmurray/.VirtualBox 10時20分VBoxManage internalcommands createrawvmdk ,文件名/家庭/ kmurray / .VirtualBox
1021 cat RawUSBsdb2G.vdi 1021貓RawUSBsdb2G.vdi
1022 cd 1022光盤

In order to discover which commands I use most so I could write this list, I used a combination of five different commands all piped together:為了發現這些命令我使用最多,所以我可以寫這個清單,我用相結合的五個不同的命令,所有的管道一起:

history | awk {’print $2′} | sort | uniq | less 歷史| awk ( '打印200 ' ) |分類| uniq |少

awk {’print $2′} causes only the second column of the output to be displayed, sort puts everything in alphabetical order, uniq cuts out all the duplicates, and less causes the output to be displayed one screen at a time. awk ( '打印200 ' )原因只有第二列的輸出顯示排序使一切按字母順序排列, uniq削減所有的重複而較少的原因輸出到顯示屏幕上一個時間。

If you have any favourite bash commands that you would like to share, please tell us about them in the comments below.如果您有任何喜愛的慶祝命令,你想與大家分享,請告訴我們他們的意見如下。

Related Posts: 相關文章:
  • An introduction to the OS X Terminal介紹了OS X的終端
  • How to add commands to the OS X “right-click” menu如何添加命令到OS X的“滑鼠右鍵”菜單
  • How to run Dashboard Widgets on your OS X Desktop如何運行Dashboard構件上的OS X桌面
  • How to play NES (Nintendo) Games on your Windows Mobile Smartphone如何發揮未做特殊定義的(任天堂)遊戲在您的Windows Mobile智能手機
  • How to add bookmarking functionality to the OpenOffice.org suite of tools如何添加書籤功能, OpenOffice.org的工具包
  • Get Simple Help tutorials just like this one in your email inbox every day - for free!獲取簡單的幫助教程就這樣一個在您的電子郵件收件匣每一天-是免費的! Just enter your email address below:只要輸入您的電子郵件地址如下:

    You can always opt out of this email subscription at any time.您可以隨時退出這個郵件訂閱在任何時候。


    Bookmark and Share 書籤和共享

    { 0 comments… 0評論... add one now現在添加一個 }

    Leave a Comment發表您的評論

    You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> 您可以使用這些HTML標記和屬性: href="" title="">的<a <abbr title=""> <acronym title="">的<b> <blockquote cite=""> <cite>的<code> <del datetime="">的<em> <i> <q cite=""> <strike>的<strong>