Quote:
Originally Posted by troop
Code:
find ~ -type d -mtime +30 -exec rm -r {};
Find and delete every directory in your home directory that have not been modified in the last 30 days.
Code:
find ~ -type d -mtime +30 -print;
to print such directories
|
Thanks for the replies. How can I just -print the directories and not what's inside them. The above command was looking for directories 30 days old inside my parent directories. I know this might sound confusing.
ex:
/MainDir
Dir1
Dir2
Dir3
If im in "MainDir", I only want to print "Dir1", not the directories that are inside it.
Thanks.