I want to delete all directories under my home dir but this strange doubt popped in. Will it delete my home dir as well by any chance ? Currently i am using the below oneliner.
find /home/chidori/ -maxdepth 1 -type d -mtime +5 -exec rm -rf {} \;
I was browsing through this forum and i came across this Shell script to delete directories older than n days . The last comment says that it will delete the path mentioned in the command line as well and it urges one to use -mindepth 1
as well.
I would like to if thats true My requirement is to delete the files under /home/chidori/ and not my home dir ( /home/chidori/) itself?