华南俳烁实业有限公司

考試首頁(yè) | 考試用書(shū) | 培訓(xùn)課程 | 模擬考場(chǎng) | 考試論壇  
  當(dāng)前位置:Linux認(rèn)證 > 綜合輔導(dǎo) > 文章內(nèi)容
  

對(duì)Linux新手非常有用的20個(gè)命令:ls命令

 [ 2016年5月30日 ] 【

ls命令

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 命令輸出:

  1. d (代表了是目錄).
  2. rwxr-xr-x 是文件或者目錄對(duì)所屬用戶(hù),同一組用戶(hù)和其它用戶(hù)的權(quán)限。
  3. 上面例子中第一個(gè)ravisaive 代表了文件文件屬于用戶(hù)ravisaive
  4. 上面例子中的第二個(gè)ravisaive代表了文件文件屬于用戶(hù)組ravisaive
  5. 4096 代表了文件大小為4096字節(jié).
  6. May 8 01:06 代表了文件最后一次修改的日期和時(shí)間.
  7. 最后面的就是文件/文件夾的名字
本文糾錯(cuò)】【告訴好友】【打印此文】【返回頂部
將考試網(wǎng)添加到收藏夾 | 每次上網(wǎng)自動(dòng)訪(fǎng)問(wèn)考試網(wǎng) | 復(fù)制本頁(yè)地址,傳給QQ/MSN上的好友 | 申請(qǐng)鏈接 | 意見(jiàn)留言 TOP
關(guān)于本站  網(wǎng)站聲明  廣告服務(wù)  聯(lián)系方式  站內(nèi)導(dǎo)航  考試論壇
Copyright © 2007-2013 中華考試網(wǎng)(Examw.com) All Rights Reserved
万荣县| 将乐县| 五寨县| 东丰县| 科尔| 平利县| 阳西县| 沂南县| 壶关县| 县级市| 灵璧县| 定日县| 罗城| 铜陵市| 内黄县| 兴海县| 临邑县| 鱼台县| 丹寨县| 普格县| 富蕴县| 翁牛特旗| 赣榆县| 亳州市| 玉山县| 平陆县| 广平县| 汉沽区| 申扎县| 德兴市| 东港市| 阿图什市| 东莞市| 阳泉市| 微山县| 甘肃省| 平顺县| 崇义县| 横峰县| 资阳市| 昆明市|