下記は、/etc/passwd の一部である。
root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin: daemon:x:2:2:daemon:/sbin: adm:x:3:4:adm:/var/adm:
これを加工して、ログイン名とホームディレクトリのみ表示するには、以下のどれを実行すればよいか?
- cut -f1,6 /etc/passwd
- cut -f 1,6 /etc/passwd
- /etc/passwd > cut -f1,6 -d:
- cut -d: -f1,6 /etc/passwd
- cut -d: -f 1,6 < /etc/passwd
|
解答
|