sam002:lsコマンド
カレントディレクトリのファイルやディレクトリを表示するコマンド
オプションなし |
unix> ls ./ ../ aaa/ aaa.txt eee/ zzz.txt unix> |
-1オプション(1ファイル1行で表示) |
unix> ls -1 ./ ../ aaa/ aaa.txt eee/ zzz.txt |
-lオプション(詳細な情報を表示) |
unix> ls -l total 48 drwxr-s--- 4 testuser rhythm 512 Sep 12 13:13 ./ drwxr-s--- 3 testuser rhythm 1024 Sep 12 13:12 ../ drwxr-s--- 2 testuser rhythm 512 Sep 12 13:12 aaa/ -rw-rw-r-- 1 testuser rhythm 10 Sep 12 13:13 aaa.txt drwxr-s--- 2 testuser rhythm 512 Sep 12 13:12 eee/ -rw-rw-r-- 1 testuser rhythm 40 Sep 12 13:13 zzz.txt |
-ltオプション(詳細な情報をタイムスタンプ順に表示) |
unix> ls -lt total 48 drwxr-s--- 4 gtsstd43 rhythm 512 Sep 12 13:13 ./ -rw-rw-r-- 1 gtsstd43 rhythm 40 Sep 12 13:13 zzz.txt -rw-rw-r-- 1 gtsstd43 rhythm 10 Sep 12 13:13 aaa.txt drwxr-s--- 2 gtsstd43 rhythm 512 Sep 12 13:12 eee/ drwxr-s--- 2 gtsstd43 rhythm 512 Sep 12 13:12 aaa/ drwxr-s--- 3 gtsstd43 rhythm 1024 Sep 12 13:12 ../ |
-ltrオプション(詳細な情報をタイムスタンプの逆順に表示。最新のものが一番下にくるようにする) |
unix> ls -ltr total 48 drwxr-s--- 3 gtsstd43 rhythm 1024 Sep 12 13:12 ../ drwxr-s--- 2 gtsstd43 rhythm 512 Sep 12 13:12 aaa/ drwxr-s--- 2 gtsstd43 rhythm 512 Sep 12 13:12 eee/ -rw-rw-r-- 1 gtsstd43 rhythm 10 Sep 12 13:13 aaa.txt -rw-rw-r-- 1 gtsstd43 rhythm 40 Sep 12 13:13 zzz.txt drwxr-s--- 4 gtsstd43 rhythm 512 Sep 12 13:13 ./ |