Linux大学Linux学部Linux基礎学科講師のLinuxコマンド職人うさです。

本日のコマンドは「ls」です。

■説明
カレントディレクトリ、ファイルの情報を表示する。

■構文
ls【オプション】【ディレクトリ、ファイル名】

■オプション
-a   隠しファイルも表示する。
-l   ファイルを詳細に一覧表示する。
-t   タイムスタンプ順(日時順)に表示する。
-F   名前の最後にファイルタイプをつける。
-s   ファイル名の横にkバイト単位でファイルサイズを付加して表示する。
-r   降順で表示する。

■実行例
[root@test01 ~]# ls
Desktop install.log test.txt

[root@test01 ~]# ls -l
合計
drwxr-xr-x 2 root root 4096 12月 13 23:18 Desktop
-rw-r--r-- 1 root root 69852 12月 13 03:08 install.log
-rw-r--r-- 1 root root 6429 12月 13 03:08 test.txt