I am learning Linux on **broken link removed**, there is a question, how can I make find command to show size of files also? Do I need to use -exec ls -l or xargs etc?
The size is displayed in bytes. Use -h switch in ls to show human readable format. Like ls -lh
find . -name "*.txt" -exec ls -lh {} \;
About -exec and xargs... look at it this way...
-exec will perform given command on every found object separately
xargs gets all results as one big chunk (like a txt file, only from RAM)
The size is displayed in bytes. Use -h switch in ls to show human readable format. Like ls -lh
find . -name "*.txt" -exec ls -lh {} \;
About -exec and xargs... look at it this way...
-exec will perform given command on every found object separately
xargs gets all results as one big chunk (like a txt file, only from RAM)