find: patternA or patternB
2008年08月02日 (linux)
command
# find / -name "*bashrc" -or -name "*bash_profile" #1 # find / -name "*bashrc" -or -name "*bash_profile" | grep -v root #2 1./以下の"*bashrc"もしくは"*bash_profile"に一致したものを検索. 2.1+grepパイプ,文字列rootの出力行を除外.
note
cf. % man find % man grep % grep --help | grep invert invert : 〜を逆さまにする,ひっくり返す
PR
mount usb flash memory
2008年08月02日 (linux)
command
# mount -t msdos /dev/sdb1 /mnt # mount # umount /mnt # unmount
note
USBフラッシュメモリーはsdb*, sda*に認識される. cf. % man mount % man umount
/etc/passwd format
2008年08月02日 (linux)
例:
httpd:x:501:httpd:/usr/local/httpd:/bin/bash
各フィールドは:で区切る.
- ログイン名
- パスワード,シャドウパスワードの場合はx
- ユーザID
- グループID,グループIDとグループ名の対応は/etc/groupに
- Gecosフィールド,ユーザの一般情報など
- ホームディレクトリ
- ログインシェル
/etc/group format
2008年08月02日 (linux)
例:
httpd:x:502:
各フィールドは:で区切る.
- グループID
- パスワード,シャドウパスワードの場合はx
- グループID
- グループリスト
/etc/shadow format
2008年08月02日 (linux)
例:
httpd::0:0:99999:7:::
各フィールドは:で区切る.
- ユーザ名
- 暗号化されたパスワード
- パスワードの最終更新日
- 変更可能最短期間
- 変更可能最長期間
- 警告日
- ログインしないと無効になる日数
- アカウント失効までの日数
- フラグ(未使用)