Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道du *.txt例如给了我当前目录中的所有 .txt 文件,但是我可以以某种方式修改命令以不仅查看根目录而且查看其中的所有其他目录以查找所有 .txt 文件?
du *.txt
你的意思是这样的:
find . -name "*.txt" -exec du -skh {} \;?
find . -name "*.txt" -exec du -skh {} \;
您可以将 find 命令与 du 命令结合使用以获取结果:
find . -name \*.txt | du