▼すべてを開く。
▲すべてを閉じる。
$ ls -la 合計 460 drwx------ 20 masa users 4096 3月 27 14:55 . drwxr-xr-x 4 root root 4096 5月 30 2005 .. -rw------- 1 masa users 644 3月 27 14:54 .ICEauthority drwx------ 3 masa users 4096 10月 9 18:42 .Trash -rw------- 1 masa users 265 3月 27 14:54 .Xauthority -rw------- 1 masa users 9687 3月 25 00:43 .bash_history -rw-r--r-- 1 masa users 24 9月 18 2003 .bash_logout -rw-r--r-- 1 masa users 191 9月 18 2003 .bash_profile -rw-r--r-- 1 masa users 124 9月 18 2003 .bashrc -rw-r--r-- 1 masa users 5542 9月 17 2003 .canna -rw-r--r-- 1 masa users 237 5月 22 2003 .emacs drwxr-xr-x 3 masa users 4096 2月 10 17:50 .emacs.d -rw------- 1 masa users 16 5月 11 2005 .esd_auth -rw-r--r-- 1 masa users 51 3月 27 14:55 .fonts.cache-1 ・・・・・・・・・・・・ 以 下 略 ・・・・・・・・・・・・
lsコマンドで-laオプションを指定して実行すると、隠しファイル、ディレクトリを含めてすべてのファイルとディレクトリを詳細に表示する。通常、「.」で始まるファイル名、ディレクトリ名は表示されない。
lsコマンドのオプション | |
-l | 詳細な情報を表示する |
-a | すべてのファイル、ディレクトリを表示する |
$ ls -a . .esd_auth .kde .rhn-applet.cache .. .fonts.cache-1 .mailcap .rhn-applet.conf .ICEauthority .gconf .metacity .sversionrc .Xauthority .gconfd .mime.types .xemacs .bash_history .gnome .mozilla .xsession-errors .bash_logout .gnome-desktop .nautilus evolution .bash_profile .gnome2 .openoffice lfile2 .bashrc .gnome2_private .openoffice-install-log mbox .canna .gtkrc .openoffice-lock sfile1 .emacs .gtkrc-1.2-gnome2 .recently-used work
lsコマンドで-aオプションを指定して実行すると、隠しファイルを含めてすべてのファイルを表示する。通常、「.」で始まるファイル名、ディレクトリ名は表示されない。
Red Hat Linuxでは、文字の色によりファイルとディレクトリなどの区別がつくようになっている。
lsコマンドのオプション | |
-a | すべてのファイル、ディレクトリを表示する |