megacolorboy

Back

Published on April 10th, 2021

Unix

Find directories older than a specific date and sorted by size

Wanted to see which directories were created on an older date along with their sizes? Try this:Hope you found this tip useful!

1 minute read

Wanted to see which directories were created on an older date along with their sizes? Try this:


find . -type d -maxdepth 1 ! -newermt "2021-04-10" -exec du -sh {} \; | sort -h >> oldprojectsizes.txt

Hope you found this tip useful!