| 9 | * [http://goungoun.dip.jp/app/fswiki/wiki.cgi/devnotebook?page=Linux%A5%B3%A5%DE%A5%F3%A5%C9%A5%E1%A5%E2 Linuxコマンドメモ - goungoun技術系雑記帳] |
| 10 | > * img と img-backup 下のフォルダ構成をdiff |
| 11 | > {{{ |
| 12 | > diff <(find img -type d -print) <(cd img-backup; find img -type d -print) |
| 13 | > }}} |
| 14 | > * via [http://www.connect-i.co.jp/tipsblog/?cat=5 TIPS » linux] |
| 15 | > * bash:パスとコマンド名を取得 |
| 16 | > {{{ |
| 17 | > #!/bin/bash |
| 18 | > |
| 19 | > HOGE="/aaa/bbb/ccc.c" |
| 20 | > |
| 21 | > echo ${HOGE} |
| 22 | > echo ${HOGE%/*} |
| 23 | > echo ${HOGE##*/} |
| 24 | > }}} |
| 25 | > {{{ |
| 26 | > /aaa/bbb/ccc.c |
| 27 | > /aaa/bbb |
| 28 | > ccc.c |
| 29 | > }}} |
| 30 | > * sudo sh -c "hogehoge" |
| 31 | > {{{ |
| 32 | > $ sudo sh -c "cat > hoge" |
| 33 | > }}} |