Quote:
Originally Posted by Scallywag I'll give it a try. I appreciate it.... | I've tried the code you sent me and found that it takes a long time to run through the file system directories.
I've create a bash script as follows:
# Cleanup bash script
find /home/username/Business -iname '*.*~' -type f -exec mv '{}' /home/username/.Trash \;
find /home/username/HTML -iname '*.*~' -type f -exec mv '{}' /home/username/.Trash \;
find /home/username/Documents -iname '*.*~' -type f -exec mv '{}' /home/username/.Trash \;
find /var/www -iname '*.*~' -type f -exec mv '{}' /home/username/.Trash \;
echo "All files cleaned up."
It works very well. I changes it so it moves the files instead of copying them. I, also, copied it to the /usr/local/bin directory so its available globally. |