lsコマンド
スポンサードリンク
【説明】
ディレクトリの中身をリスト表示する際に使用します。
指 定 したFILEについての情報をリスト表示する(デフォルトはカレントディレクトリ)。-cftuSUX や --sort のオプション指定がなければ、アルファベット順にソートして表
示します。出力は標準出力に対して行われます。
【構文】
ls [オプション] [ファイル]
例 カレントディレクトリの中身を詳細出力します。
[root@localhost ~]# ls -l
合計 88
lrwxrwxrwx 1 root root 8 6月 17 08:09 aaa.txt -> test.txt
-rw-r--r-- 1 root root 848 6月 11 19:30 anaconda-ks.cfg
-rw-r--r-- 1 root root 57804 6月 11 19:30 install.log
-rw-r--r-- 1 root root 3496 6月 11 19:30 install.log.syslog
-rw-r--r-- 1 test test 20 6月 17 07:59 test.txt |
例 カレントディレクトリの中身を隠しファイルも含めサイズ順にソートし1行1ファイル形式で出力します。
[root@localhost ~]# ls -laS1
合計 152
-rw-r--r-- 1 root root 57804 6月 11 19:30 install.log
-rw------- 1 root root 6756 6月 18 09:24 .bash_history
drwxr-x--- 2 root root 4096 6月 17 08:09 .
drwxr-xr-x 23 root root 4096 6月 17 07:34 ..
-rw-r--r-- 1 root root 3496 6月 11 19:30 install.log.syslog
-rw-r--r-- 1 root root 848 6月 11 19:30 anaconda-ks.cfg
-rw-r--r-- 1 root root 191 2月 22 2005 .bash_profile
-rw-r--r-- 1 root root 176 2月 22 2005 .bashrc
-rw-r--r-- 1 root root 102 2月 22 2005 .tcshrc
-rw-r--r-- 1 root root 100 2月 22 2005 .cshrc
-rw-r--r-- 1 root root 24 2月 22 2005 .bash_logout
-rw-r--r-- 1 test test 20 6月 17 07:59 test.txt
lrwxrwxrwx 1 root root 8 6月 17 08:09 aaa.txt -> test.txt |
|
|