华南俳烁实业有限公司

考試首頁 | 考試用書 | 培訓(xùn)課程 | 模擬考場 | 考試論壇  
  當(dāng)前位置:操作系統(tǒng) > Linux > 文章內(nèi)容
  

linux系統(tǒng)入門學(xué)習(xí)(71)

 [ 2016年7月7日 ] 【

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"命令會列出文件夾里的所有內(nè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中,文件以“.”開頭的就是隱藏文件,并且每個文件,文件夾,設(shè)備或者命令都是以文件對待。ls -l 命令輸出:

  1. d (代表了是目錄).
  2. rwxr-xr-x 是文件或者目錄對所屬用戶,同一組用戶和其它用戶的權(quán)限。
  3. 上面例子中第一個ravisaive 代表了文件文件屬于用戶ravisaive
  4. 上面例子中的第二個ravisaive代表了文件文件屬于用戶組ravisaive
  5. 4096 代表了文件大小為4096字節(jié).
  6. May 8 01:06 代表了文件最后一次修改的日期和時間.
  7. 最后面的就是文件/文件夾的名字
本文糾錯】【告訴好友】【打印此文】【返回頂部
將考試網(wǎng)添加到收藏夾 | 每次上網(wǎng)自動訪問考試網(wǎng) | 復(fù)制本頁地址,傳給QQ/MSN上的好友 | 申請鏈接 | 意見留言 TOP
關(guān)于本站  網(wǎng)站聲明  廣告服務(wù)  聯(lián)系方式  站內(nèi)導(dǎo)航  考試論壇
Copyright © 2007-2013 中華考試網(wǎng)(Examw.com) All Rights Reserved
固始县| 禄劝| 上栗县| 丘北县| 虎林市| 海城市| 获嘉县| 辉县市| 彰化县| 闽侯县| 门头沟区| 文山县| 上栗县| 敦煌市| 陵川县| 济宁市| 富蕴县| 江山市| 仪陇县| 贡觉县| 绥德县| 依兰县| 辽宁省| 定州市| 延吉市| 井冈山市| 望城县| 安图县| 平定县| 绿春县| 双流县| 河曲县| 阿尔山市| 华坪县| 沛县| 桃园市| 娄底市| 葵青区| 沙河市| 磐石市| 青阳县|