▼すべてを開く。
▲すべてを閉じる。
$ ls -lR .: 合計 28 drwxr-xr-x 2 masa users 4096 8月 6 01:17 Desktop -r-x--x--- 1 masa users 512 8月 6 01:44 command drwxr-xr-x 2 masa users 4096 8月 6 02:09 dir1 drwxr-xr-x 3 masa users 4096 8月 6 02:11 dir2 -rw-r--r-- 2 masa users 128 8月 6 01:25 file1.txt -rw-r--r-- 1 masa users 256 8月 6 01:34 file2.txt -rw-r--r-- 2 masa users 128 8月 6 01:25 hlinkfile.txt lrwxrwxrwx 1 masa users 9 8月 6 01:37 slinkfile.txt -> file2.txt ./Desktop: 合計 4 -rw-r--r-- 1 masa users 3311 8月 6 01:17 starthere.desktop ./dir1: 合計 4 -rw-r--r-- 1 masa users 128 8月 6 02:09 file11.txt ./dir2: 合計 8 drwxr-xr-x 2 masa users 4096 8月 6 02:09 dir21 -rw-r--r-- 1 masa users 256 8月 6 02:11 file21.txt ./dir2/dir21: 合計 0
lsコマンドで-lRオプションを指定して実行すると、ディレクトリの内容とサブディレクトリがあれば、再帰的に詳細にリスト表示する。
lsコマンドのオプション | |
-l | 詳細な情報を表示する |
-R | 再帰的にディレクトリを表示する |
$ ls -R .: Desktop dir1 file1.txt hlinkfile.txt command dir2 file2.txt slinkfile.txt ./Desktop: starthere.desktop ./dir1: file11.txt ./dir2: dir21 file21.txt ./dir2/dir21:
lsコマンドで-Rオプションを指定して実行すると、ディレクトリの内容とサブディレクトリ(子ディレクトリ)があれば、再帰的にリスト表示する。
lsコマンドのオプション | |
-R | 再帰的にディレクトリを表示する |