find trouble
Hi,
I have the following mount structure, /dev/hdc9 ext3 / /dev/hdc6 vfat /home/chandru/data I have two files as below, /home/chandru/tmpfile~ /home/chandru/data/abc/techo~ from /home/chandru, when I execute, find . -name *~ -exec rm {} \; the file "techo~" is not removed, but "tmpfile~" is removed. However, when I run the same command from the same directory for a second time, "techo~" is removed. What should I do remove both files simultaneously?? Basically, I want to remove all backup files created by emacs under "/home/chandru". |
Try this syntax
find . -name *~ -exec rm '{}' \; NOTE the single quotes. |
I'm sorry!
That did not help!! |
Double quotes around *~, I think.
I.e. find . -name "*~" -exec rm {} \; John |
Thanks!
That worked out. But y do I need the double quotes when there are no spaces in the file names? |
I think it's the wild-card (*). That expands to a list and how that will be handled depends on your shell.
John |
Thanks for the explanation
|
All times are GMT -5. The time now is 05:05 AM. |