Last Update 2014/03/11
ディレクトリ情報を表示
ls オプション1 パス1
※ オプションなどは個人的に重要と考えられるものを記述しており、記載の無いものは、manページや関連書籍などを参照願います。
※ 実行例の記述は、不要と考えられる部分の削除などの修正を行ったものを掲載しています。
※ 実行例の実行環境はFreeBSD 9.1です。
※ 実行例の記述は、不要と考えられる部分の削除などの修正を行ったものを掲載しています。
※ 実行例の実行環境はFreeBSD 9.1です。
(例) オプション、ディレクトリ指定なし
$ ls
実行結果
$ ls
test.sh test.txt test2.txt
$ ls -l
実行結果
$ ls -l
total 12
-rwxr-xr-x 1 testuser2 testgroup2 6 Nov 25 21:43 test.sh
-rw-r--r-- 1 testuser2 testgroup1 5 Nov 25 21:44 test.txt
-rw-r--r-- 1 testuser1 testgroup1 10 Nov 25 21:45 test2.txt
$ ls -a
実行結果
$ ls -a
. .. test.sh test.txt test2.txt
$ ls -m
実行結果
$ ls -m
test.sh, test.txt, test2.txt
実行結果
$ ls -il
total 12
188987 -rwxr-xr-x 1 testuser2 testgroup2 6 Nov 25 21:43 test.sh
188989 -rw-r--r-- 1 testuser2 testgroup1 5 Nov 25 21:44 test.txt
188891 -rw-r--r-- 1 testuser1 testgroup1 10 Nov 25 21:45 test2.txt
実行結果
$ ls -ln
total 12
-rwxr-xr-x 1 1005 1005 6 Nov 25 21:43 test.sh
-rw-r--r-- 1 1005 1004 5 Nov 25 21:44 test.txt
-rw-r--r-- 1 1004 1004 10 Nov 25 21:45 test2.txt
実行結果
# ls -Rl
total 4
drwxr-xr-x 3 testuser1 testgroup1 512 Dec 23 09:38 testdir1
./testdir1:
total 4
drwxr-xr-x 3 testuser1 testgroup1 512 Dec 23 09:38 testdir2
./testdir1/testdir2:
total 4
drwxr-xr-x 2 testuser1 testgroup1 512 Dec 23 09:38 testdir3
./testdir1/testdir2/testdir3:
total 0