LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Shell script to remove backup ~ files (https://www.linuxquestions.org/questions/linux-general-1/shell-script-to-remove-backup-%7E-files-333209/)

hallamigo 06-13-2005 04:45 PM

Shell script to remove backup ~ files
 
Not sure if this would be a combination of grep and rm, but I'd like to be able to run a script that scans all files in a directory and any directory under it to remove backup files.

ie. index.html~ or filename.txt~ - anything with a ~ as the last character ...

Any help on this shell script would be much appreciated.

Thanks.

dub.wav 06-13-2005 05:00 PM

find . -name '*~' -exec rm {} \;

hallamigo 06-13-2005 08:32 PM

Great, that works perfectly - thanks!

lanka 09-13-2010 03:47 PM

remove bakups
 
Hi there, i used tht ssh but seems nothing happen, where the error?


All times are GMT -5. The time now is 08:55 AM.