On Wednesday 01 June 2005 15:52, Nick W wrote:
>because I'm lazy, how would one write a script to recursively rm files ending
>in '~' starting at any given dir?
How about:
$ cat remove-tilde-files.sh
#!/bin/bash
if [ $# -ne 1 ]
then
echo "Usage: $0 directory"
exit 1
fi
if [ ! -d "$1" ]
then
echo "No such directory: $1"
fi
find $1 -name *~ -exec rm -vf {} \;
_______________________________________________
clug-talk mailing list
[email protected]
http://clug.ca/mailman/listinfo/clug-talk_clug.ca
Mailing List Guidelines (http://clug.ca/ml_guidelines.php)
**Please remove these lines when replying