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


Click here to return to the 'A Better Solution' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A Better Solution
Authored by: forman on Oct 03, '05 10:20:06PM

When I was a system administrator, one of the golden rules I learned was to never combine "-rf" and "*" under any circumstance. If one was going to invoke the "-rf" hammer, they should specify the entire path without globs.

Michael.



[ Reply to This | # ]
A Better Solution
Authored by: Anonymous on Oct 04, '05 03:22:25PM

You didn't say how.

1. move files for deletion to /tmp/junk
2. check contents of /tmp/junk
3. check pruned location(s)
4. rm -rf /tmp/junk

Yeah?



[ Reply to This | # ]
Prevent rm disasters
Authored by: macg4dave on Oct 04, '05 10:14:28PM

If you are using the tcsh why not use

"alias rm 'sudo rm -dRfi'" & for folders "alias rmdir 'sudo rm -dfr'"

just pop that in your .tcshrc file and it will ask for a password & show you what you are trashing



[ Reply to This | # ]
A Better Solution
Authored by: macgruder on Oct 05, '05 11:16:59AM

Good point. But that's the whole point of the hint. You bypass putting rm and * together.



[ Reply to This | # ]