- lspci
- PCI buses の情報とそれらにくっついているデバイス情報を表示
- openssl
- e.g. openssl s_client -connect ip-addr -state (443port のチェック)
- snmpwalk
- MIB(management information base)デーブルの情報を取得
- last
- ログイン履歴 (/var/log/wtmp) を表示
- lastb
- bad ログイン履歴(/var/log/btmp)を表示
- w
- 現在のログインユーザの情報(var/log/utmp を表示)
$ ls -lu
$ ls -l
$ ls -lc
- ls *(@)
- 属性指定 e.g. (X), (/), (r|w|x), (U), (u[usr_name]),(^):否定(zshのみ)
- sed -e '/pattern/d'
- delete lines in which pattern appers, and show the other lines
- perl -p -e "s/xxx/yyy/g" filename
- sed -e 's/pattern/replacement/g'
- sed -e '行番号s/パターン1/パターン2/'
- sed -e '開始行,終了行s/パターン1/パターン2/'
- 1 : 1行目のみ
- 1,10 : 1~10行目
- 2,$ : 2~最終行
- 1,/^l/ : 1行目~l で始まる行まで
- /^l/ : l で始まる行だけ
- ! : 否定
- pstree
- display tree of processes ( -ap option often used )
- tree
- display directories and files tree from current directory
- vmstat
- vertual memory stats (-d でdisk status), information about processe, memory, paging, block, IO, traps, disk, cpu
- renice n_priority -p n_process
- nice値の変更 (-20~19: high <- low) (ps l でみれるNIと表示される )
- sort sample.txt | unqi -c
$ cat f1 f2 | sort | uniq -d
$ cat f1 f2 | sort | uniq
$ cat f1 f2 | sort | uniq -u
- cdrecord -v -dev=(/dev/xxx(dmesg で調べる)) -speed=2 -data (yyy.iso) (-dummy (for test))
- showmount
- show mount information for NFS server
- usermod
- user info の変更 (-u, -g: userid, groupid respectively)
- usermod -G wheel user_name
- paste -d deliminator file_1 file_2 ...
- split -l 500 -d file_name prefix_name
- ファイルを-l 行ごとにnumeric suffixで分割
- od -c filename
- dump files in ocatal and other format
- od -vAn -N4 -tu4 < /dev/urandom
- fc-list
- list available fonts for applications
- rename hoge hogehoge hoge*
- free
- cat /proc/meminfo の簡易版.メモリとスワップのみ表示
- ulimit
- プロセス数、オープンファイル数、コアダンプのサイズの上限を見たり、設定したり
- stty
- termial line settingsの変更と確認
- ld
- gcc, g++, ccの最後にオブジェクトファイル、アーカイブデータのリンクに使われる
- strace
- system call and signal trace
- rm *~filename
- filename 以外のファイルを削除する(~以降は補完が効かない)(zsh)
- rm *~*.cc
- *.cc 以外のすべてのファイルを削除する(zsh)
- cpulimit -p xxx -l 50
- process xxxのcpu使用率を50%にする(プロセスごと)
- sh hoge.sh 2>&1 | tee fname.out
$ ffmpeg -ss 1 -vframes 1 -i in.flv -f image2 out.jpg
$ ffmpeg -ss 10 -vframes 50 -i 4233-1r.rm -f image2 %d.jpeg
$ ffmpeg -i filename -f image2 %d.jpeg
- ipcs
- provides information on the ipc facilities
- kill -17(SIGCHLD) zp_id
- zombieプロセスの終了
- だめならば、親を終了させる
- initが親になるので、waitを定期的に実行しているinitがゾンビプロセスを刈り取る
- fdisk -l /dev/xxx
- partition table をリスト表示, ファイルシステムのタイプが分かる
- crash
- kernel coredump の解析, 動作中カーネルの解析 (live system)
- nm
- list symbols from object files
- chroot newroot [command, ...]
- newroot をroot にして、プログラムを実行, 一種のjail
- jail newroot host-name ip-addr ...
- ldd
- print shared library dependencies
$ whereis ls
- ibus-setup
- ubuntsuでIMEのセットアップ画面を機動. dashboardから検索でも可
$ aspell --lang=en -c filename.tex
$ watch -n 5 "ls ./ | tail"