Tag Archives: find

Change files back to 644 and folders back to 755 with chmod

If you want to get rid of the nasty 777 on all files/folders see: find /path/to/base/dir -type d -print0 | xargs -0 chmod 755 find /path/to/base/dir -type f -print0 | xargs -0 chmod 644

Posted in CentOS, Linux | Tagged , , , | Leave a comment

remove files older than X days

find example to remove files older than 5 days: find /path/to/files* -mtime +5 -type f -exec rm {} \; Note that this command will not work when it finds too many files. It will yield an error like: bash: /usr/bin/find: … Continue reading

Posted in CentOS, Linux | Tagged , , , | Leave a comment