I am using the following Command to delete Directory with contents. But this command is deleting inside files only not directories. is there any change need in my command?
find -type f -mtime +3 -exec rm -r {} \;
Thanks
I am using the following Command to delete Directory with contents. But this command is deleting inside files only not directories. is there any change need in my command?
find -type f -mtime +3 -exec rm -r {} \;
Thanks
To delete the directory itself and all of the files and sub-directories:
rm -f -R directoryname
I got solution for this one i need to change my command like this
I got solution for this one i need to change my command like this
find -type d -mtime +3 -exec rm -r {} \;
Or
find -mtime +3 -exec rm -r {} \;
Thanks