Find

From DevOps Notebook
Revision as of 10:03, 27 February 2020 by MilosZ (talk | contribs)

Find largest files in given location

find /home/tecmint/Downloads/ -type f -exec du -Sh {} + | sort -rh | head -n 5

Delete files older then X hours

find <location> -name <file_pattern> -type f -mmin +360 -delete