2017-06-06 26 views
0

我目前正在學習Bash shell並遇到指令ls -F。我知道它的功能是將指標附加到項目列表中,以便區分不同的文件類型。我知道/被追加到目錄,並且*被追加到可執行文件。但是我已經檢查了ls命令的手冊頁,但找不到關於indicator => @ |的任何信息。使用'ls -F'時不同指標的含義

有人能告訴我他們代表什麼嗎?如果能夠告訴我需要的時候在哪裏找到這種信息會更好。

+0

Stack Overflow是用於編程和發展問題的站點。這個問題似乎與題目無關,因爲它不涉及編程或開發。請參閱幫助中心的[我可以詢問哪些主題](http://stackoverflow.com/help/on-topic)。也許[超級用戶](http://superuser.com/)或[Unix&Linux堆棧交換](http://unix.stackexchange.com/)會是一個更好的地方。另請參閱[我在哪裏發佈有關Dev Ops的問題?](http://meta.stackexchange.com/q/134306) – jww

回答

1

嘗試info ls 「列出哪些信息」 下:

‘-F’ 
‘--classify’ 
‘--indicator-style=classify’ 
Append a character to each file name indicating the file type. 
    Also, for regular files that are executable, append ‘*’. The file 
    type indicators are ‘/’ for directories, ‘@’ for symbolic links, 
    ‘|’ for FIFOs, ‘=’ for sockets, ‘>’ for doors, and nothing for 
    regular files. Do not follow symbolic links listed on the command 
    line unless the ‘--dereference-command-line’ (‘-H’), 
    ‘--dereference’ (‘-L’), or 
    ‘--dereference-command-line-symlink-to-dir’ options are specified. 
+0

非常感謝您的回答。正是我需要的。將盡快接受答案。順便說一句。我只是想知道是否有其他方法可以找出相同的信息。我想知道多種方式來完成任務並沒有什麼壞處 – Thor

+1

'info'頁面比'man'頁面更詳細。除此之外,那裏有很多書。一個很好的桌面參考是「Linux in a Nutshell」:http://shop.oreilly.com/product/9780596154493.do – Jack

+1

非GNU手冊頁比GNU手冊頁*和*信息更好,用於其他目的比查找GNU特定的選項。使用https://man.freebsd.org/查看其他系統的手冊頁中的內容。 –

相關問題