全文検索:
- ipコマンド/IPエイリアス追加
- condaryとしてIPが追加される。 <code> # ip addr add 192.168.100.5/24 brd 192.168.100.255 dev eth0 </code> ===== IP削除 ===== <code> # ip addr del 192.168.100.5/24 brd 192.168.100.255 dev eth0 </code> ===== IP確認 ===== <code> # ip -4 a 1: lo: <LOOPBACK,UP,LOW
- traceroute
- ute flateight.com traceroute to flateight.com (59.106.13.38), 64 hops max, 40 byte packets 1 218.227... 247.126) 16.920 ms 17.880 ms 16.116 ms 3 219.107.255.254 (219.107.255.254) 19.165 ms 18.637 ms 18.326 ms 4 133.205.1.1 (133.205.1.1) 18.896 ms 18.610 ms 19.348 ms 5 210.173.176.63 (210.173.176.63)
- tar
- 04 etc/amd.map -rw-rw-r-- root/antivir 3623 11 10 07:38 2004 etc/antivir.conf -rw-r--r-- root/whee... etc/auth.conf -rw-rw-r-- root/antivir 3730 11 10 07:31 2004 etc/avguard.conf -rw-r--r-- root/whee... 6:28 2004 etc/crontab -rw-r--r-- root/wheel 108 5 26 06:28 2004 etc/csh.cshrc -rw-r--r-- root/... .gz ./hoge </code> ==== tar でディレクトリ丸ごとコピー ==== 10.10.10.10の/mnt/ を 10.10.10.20の/mnt/ に丸ごとコピー <code>
- dig
- yahoo.co.jp. 300 IN A 210.80.242.236 yahoo.co.jp. 300 IN A 210.80.243.14 yahoo.co.jp. 300 IN A 210.81.3.241 yahoo.co.jp. 300 IN A 210.81.150.5 yahoo.co.jp. 900 IN
- ifconfig
- ether 00:80:ad:71:82:d6 media: 10baseT/UTP status: active supported media: autoselect 10base5/AUI 10base2/BNC 10baseT/UTP <full-duplex> 10baseT/UTP # ifconfig de0 172.17.1.99 netmask 0xffffff00 bro
- netstat
- eign Address (state) tcp4 0 0 105.233.75.202.e.50205 itpro.nikkeibp.c.http ESTABLISHED tcp4 0 0 105.233.75.202.e.http ThinkPad.4170 TIME_WAIT tcp4 0 0 105.233.75.202.e.http ThinkPad.4169 TIME_WAIT tcp4 0 0 105.233.75.202.e.http ThinkPad.4168 TIME_W
- 01 sed 指定した行を表示
- ====== 01 sed 指定した行を表示 ====== ===== 100行目を表示 ===== sed -n 100p testfile ===== 100-110行目を表示する ===== sed -n 110,110p testfile {{tag>sed }}
- unzip
- --- ---- ---- ---- 4 05-09-14 11:10 a.txt 4 05-09-14 11:10 b.txt 4 05-09-14 11:10 c.txt -------- ------- 12 ... -rw-rw-r-- 2.3 unx 4 tx stor 9-May-14 11:10 a.txt -rw-rw-r-- 2.3 unx 4 tx stor 9-May
- viエディタ
- の指定ができ、コマンドを実行するのにタイプ量を大幅に減らすことができます。 <code> ▼例 10L 10文字分カーソルを右に移動 3d 3単語前に移動 9dd 9行削除する 8yy 8行コピーする 5H ... を文字列Bに置換| |:::|:::|(全ての行で、合致するパターン全てを置換) | |:::|:10,50s/文字列A/文字列B/g|文字列Aを文字列Bに置換| |:::|:::|(10行目から50行目までの間で、合致するパターン全てを置換) | |:::|:10,$s/文字列A/文字列B/g|文字列
- whois
- Corporation m. [Administrative Contact] HA14103JP n. [Technical Contact] KM43416JP p. [... /11/17 [Last Update] 2017/04/20 10:09:53 (JST) </code> ===== 管理者情報を確認 ===== [Admin... ct]をwhoisで確認すると、管理者情報も確認できます。 <code> # whois HA14103JP [Querying whois.nic.ad.jp] [whois.nic.ad.jp] [... Information: a. [JPNIC Handle] HA14103JP c. [Last, First] Akiyoshi, Hisa
- find
- matsui -exec rm -rf {} \; </code> ■./以下でファイルサイズが10M以上のものを表示。 <code console> $ find ./ -size +10000k -exec ls -ahl {} \; -rwxr--r-- 1 matsui matsui ... JP.zip -rwxr--r-- 1 matsui matsui 3.3G 7 3 10:09 ./TEST/Fedora-9-i386-DVD.iso -rwxr--r-- 1 ma... 上のファイルを検索 <code console> $ find /var/log/ -size +1000k -exec ls -ahl {} \; </code> {{tag>Unixコマンド ファ
- gzip
- dmail.8.9.3.tar.gz -rw-r--r-- 1 yamada user 1068290 Feb 23 21:57 sendmail.8.9.3.tar ... sendmail.8.9.3.tarの圧縮後のサイズは1068290バイト </code> === ファイルを圧縮し、内容を表示 === <code con... compressed uncompr. ratio uncompressed_name 1068290 3768320 71.6% sendmail.8.9.3.tar ... dmail.8.9.3.tar.gz -rw-r--r-- 1 yamada user 1063119 Feb 23 21:57 sendmail.8.9.3.tar.gz $ gzip -
- route
- == Linuxコマンド例 ==== <code console> route add -net 10.200.0.0/16 gw 192.168.10.1 route delete -net 10.200.0.0/16 gw 192.168.10.1 </code> <code console> # route -n Kernel IP routing table Destination
- dump
- DUMP: Date of this level 0 dump: Sat May 21 21:10:05 2005 DUMP: Date of last level 0 dump: the e... umping (Pass IV) [regular files] DUMP: DUMP: 461079 tape blocks DUMP: finished in 114 seconds, t... KBytes/sec DUMP: level 0 dump on Sat May 21 21:10:05 2005 DUMP: DUMP IS DONE root@vaio# ls -l /
- zip
- --- ---- ---- ---- 4 05-09-14 11:10 a.txt 4 05-09-14 11:10 b.txt 4 05-09-14 11:10 c.txt -------- ------- 12