ls在系統中常用的選項與用法

                      ls在系統中常用的選項與用法     

                       

                          ls User Commands

                            (用戶 命令)

          ls - list directory contents

                (列出目錄的內容)  

          ls [OPTION]... [FILE]...

              (選項)    (文件) 

~]# ls -a  --all   do not ignore entries starting with .  (.是當前目錄..是上級目錄)

           (打開當前目錄下所有包含.開頭的文件或者目錄)

wKiom1eZ_JbyPd51AAAcbyB_9BM149.png


~]# ls -A  --almost-all    do not list implied . and ..

          (打開的當前目錄下不列出.和..的文件或者目錄)

wKioL1eZ_UHTxuNmAABK3m53GHs728.png


~]# ls -d   list directories themselves, not their contents

          (打開一個目錄的列表顯示目錄本身,而不顯示內容)

wKioL1ebVlHyNeA0AADE8YqEegA284.png



~]# ls -i  --inode  print the index number of each file 

          (打開當前目錄下的文件或者目錄的索引號)

wKiom1eZ_a2BC4_0AAA9FCyFHGs791.png 


~]# ls -l  use a long listing format

          (打開當前文件或者目錄以長列表格式;顯示額外的信息)

wKiom1eZ_jKiAY8hAABoTg1sEKo677.png


~]# ls -m  fill width with a comma separated list of entries

          (打開當前所在目錄下以逗號分隔的條目列表) 

wKioL1eZ_omwu3EXAAAb-ibVg5A109.png  

 

~]# ls -r  --reverse    reverse order while sorting 

          (打開當前所在文件或者目錄;生成時間或者創建時間最早的排第一個 的方式列出格式)

wKioL1eZ_2aTpd-AAABF5KNH7VQ373.png


~]# ls -R  --recursive    list subdirectories recursively

           (打開當前目錄或者文件下;遞歸地列出子目錄)

wKioL1eaABWSjGi3AABPU28T078207.png  


~]# ls -s  --size    print the allocated size of each file, in blocks 

           (顯示每個文件或者目錄所分配的塊大小)  

wKioL1eaAGrBcoc1AAA0dzQr5JA205.png 


~]# ls -S  sort by file size 

           (按照文件大小排序) 

wKiom1eaAQOhVXXUAABzqTyC61g417.png


~]# ls -t  sort by modification time 

          (按照修改時間排序) 

wKiom1eaAU-yPAcLAAASkF4n5uE441.png  

      

~]# ls -u  with -lt: sort by, and show, access time with -l:

                     show access time and sort by name otherwise:

                     sortby access time

           (配合-t選項;例如~]# ls -ut  按照訪問和修改時間重新排序格式)

wKioL1eaAbiwNxqNAAAnjS7Pkhs689.png


~]# ls -U   do not sort; list entries in directory order

           (不排序,按照文件或者目錄存放順序顯示)

wKioL1eaAhmRz5g9AAArKxNL-go971.png 


~]# ls -v   natural sort of (version) numbers within text

           (按照文本中的版本號自然排序)

wKioL1eaAlTCKU8iAAAV4Qa-0Jg017.png


~]# ls -x   list entries by lines instead of by columns

           (按行而不是列表的進行排序)

wKioL1eaApTRtJBNAAAWUIiqlLE593.png 


~]# ls -X   sort alphabetically by entry extension

           (按字母順序進行列表排序)

wKioL1eaAuCjBGWaAAAhOvmZ6TM787.png 


~]# ls -1   list one file per line

           (列出每行一個文件的方式進行排序)

wKioL1eaAxmyN8kGAAAeRlw9ndA352.png


~]# ls -Z   Display security context so it fits on most  dis-

            plays.  Displays only mode, user, group, security

            context and file name.  

            (上下顯示用戶、組、安全、文件或者目錄信息)

wKioL1eaA5bQop_9AAByLtwQ-Ik482.png



                                                                    新手上路,請照顧j_0057.gifj_0057.gif


                                                                    作者:小馬哥(xiaomag)


















發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章