I need some help with the find command. I'd like to querry pdf files with date and file size in a specific range of date. I have to sum the file size what I get the end of the process.
find / -newermt "2018-01-20" \! -newermt "2018-03-01" -type f -iname '*.pdf' -print0 | xargs -0 du -h >> txt.txt
The first case I get the size and the filename.
find / -type f -iname '*.pdf' -printf "\n%AD %AT %p" -newermt "2018-01-20" \! -newermt "2018-03-01" >> txt.txt
In here I get the date and the filename. I'm beginner in CentOS, so I'd like to ask some help or advice. Thank you!
Comments, suggestions, compliments, etc
4 posts • Page 1 of 1