我想輸出如下面的例子所示。獲取與其絕對路徑hirarchically文件列表
[email protected]:~/.atom# du -sh */* | awk '{print $2}'
blob-store/BLOB
blob-store/INVKEYS
blob-store/MAP
compile-cache/less
compile-cache/root
compile-cache/style-manager
packages/README.md
storage/application.json
[email protected]:~/.atom#
但是,ls並沒有給出它的任何選項/參數的輸出。 'ls -R
'給出路徑,然後其內容不是具有其絕對路徑的文件名。
我在編寫腳本時經常需要這個,有人可以幫助我嗎?感謝提前堆。
可能的重複[如何列出文件的絕對路徑在Linux?](http://stackoverflow.com/questions/246215/how-can-i-list-files-with-their-absolute -path-in-linux) – putonspectacles
請參閱http://stackoverflow.com/questions/246215/how-can-i-list-files-with-their-absolute-path-in-linux – putonspectacles