ls命令是列出目錄內(nèi)容(List Directory Contents)的意思。運(yùn)行它就是列出文件夾里的內(nèi)容,可能是文件也可能是文件夾。
?
1
2
3
4
5
6
7
|
root@tecmint:~ # ls
Android-Games Music
Pictures Public
Desktop Tecmint.com
Documents TecMint-Sync
Downloads Templates
|
“l(fā)s -l”命令以詳情模式(long listing fashion)列出文件夾的內(nèi)容。
?
1
2
3
4
5
6
7
8
9
10
11
|
root@tecmint:~ # ls -l
total 40588
drwxrwxr-x 2 ravisaive ravisaive 4096 May 8 01:06 Android Games
drwxr-xr-x 2 ravisaive ravisaive 4096 May 15 10:50 Desktop
drwxr-xr-x 2 ravisaive ravisaive 4096 May 16 16:45 Documents
drwxr-xr-x 6 ravisaive ravisaive 4096 May 16 14:34 Downloads
drwxr-xr-x 2 ravisaive ravisaive 4096 Apr 30 20:50 Music
drwxr-xr-x 2 ravisaive ravisaive 4096 May 9 17:54 Pictures
drwxrwxr-x 5 ravisaive ravisaive 4096 May 3 18:44 Tecmint.com
drwxr-xr-x 2 ravisaive ravisaive 4096 Apr 30 20:50 Templates
|
"ls -a"命令會(huì)列出文件夾里的所有內(nèi)容,包括以"."開(kāi)頭的隱藏文件。
?
1
2
3
4
5
6
7
8
9
10
11
12
|
root@tecmint:~ # ls -a
. .gnupg .dbus .goutputstream-PI5VVW .mission-control
.adobe deja-dup .grsync .mozilla .themes
.gstreamer-0.10 .mtpaint .thumbnails .gtk-bookmarks .thunderbird
.HotShots .mysql_history .htaccess .apport-ignore.xml .ICEauthority
.profile .bash_history .icons .bash_logout .fbmessenger
.jedit .pulse .bashrc .liferea_1.8 .pulse-cookie
.Xauthority .gconf . local .Xauthority.HGHVWW .cache
.gftp .macromedia .remmina .cinnamon .gimp-2.8
. ssh .xsession-errors .compiz .gnome teamviewer_linux.deb
.xsession-errors.old .config .gnome2 .zoncolor
|
注意:在Linux中,文件以“.”開(kāi)頭的就是隱藏文件,并且每個(gè)文件,文件夾,設(shè)備或者命令都是以文件對(duì)待。ls -l 命令輸出:
2015職稱(chēng)計(jì)算機(jī)考試書(shū)PowerPoint2007中 .. 定價(jià):¥45 優(yōu)惠價(jià):¥42 更多書(shū)籍 | |
2015年全國(guó)職稱(chēng)計(jì)算機(jī)考試教材(2007模 .. 定價(jià):¥225 優(yōu)惠價(jià):¥213 更多書(shū)籍 |