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

前端 未结 15 556
无人及你
无人及你 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:41

    find . -name '*.ear' -exec ls -lh {} \;
    

    just the h extra from jer.drab.org's reply. saves time converting to MB mentally ;)

提交回复
热议问题