Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Ease shell operations using a spreadsheet' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Ease shell operations using a spreadsheet
Authored by: juanfal on Feb 02, '08 11:26:47AM
you all should be more careful. The command is

find . -name "*~" -delete
if you forget the first parameter '.' you can delete all of your files in your disk without any warning. I hate this command!!

[ Reply to This | # ]
Ease shell operations using a spreadsheet
Authored by: alys on Feb 04, '08 02:19:15PM
find . -name "*~" -delete
if you forget the first parameter '.' you can delete all of your files in your disk
That's not true. If you forget the first parameter, the command simply does not work - it does no damage at all.

If you want to be sure that you are deleting the correct files using find, don't use the delete option, use rm as in the original example, but add the -i flag:
find . -name *~ -exec rm -i {} \;
Or use the excellent spreadsheet idea, but still with rm -i

[ Reply to This | # ]