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

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

    $ find . -name "test*" -exec du -sh {} \;
    4.0K    ./test1
    0       ./test2
    0       ./test3
    0       ./test4
    $
    

    Scripter World reference

提交回复
热议问题