mac find command printf 1

mac find command printf

find . -type f -exec stat -f "%z %N" {} \;

Here is what the above code is Doing:
1. find all files in the current directory
2. for each file, execute the stat command
3. the stat command will print the file size and the file name
4. the -f option to stat will print the file size in bytes

Similar Posts