How do I get the find command to print out the file size with the file name?

前端 未结 15 576
无人及你
无人及你 2020-12-07 11:01

If I issue the find command as follows:

$ find . -name *.ear

It prints out:

./dir1/dir2/earFile1.ear
./dir1/dir2/earFile2.         


        
15条回答
  •  南笙
    南笙 (楼主)
    2020-12-07 11:43

    find . -name '*.ear' -exec du -h {} \;
    

    This gives you the filesize only, instead of all the unnecessary stuff.

提交回复
热议问题