2014-10-29 42 views

回答

1

使用find命令:

find /home/foo -name 'test.doc' 

或爲不區分大小寫的搜索:

find /home/foo -iname 'test.doc' 

這將輸出的文件名,包括相對路徑。如果你想要一些更詳細的信息,如ls -l test.doc輸出,你可以這樣做:

find /home/foo -iname 'test.doc' -exec ls -lh {} \; 

或者只是管它xargs

find /home/foo -iname 'test.doc' | xargs ls -lh 
+1

或者只是'找到-ls'。 – tripleee 2014-10-29 18:34:54

+0

@tripleee我覺得很愚蠢,我甚至都不知道'find -ls'。謝謝。 – ptierno 2014-10-29 18:38:52

相關問題