|
|
|
"What about on a personal system?"
Like garumph said -- the fallout for other scripts could still be disastrous. First of all, rm has many behaviors that differ slightly from just deleting files.
rm -R # recursive rm -i # interactive rm -f # forceful rm -d # remove directories rm -P # overwrite files ("secure") Does this script obey ANY of these options? (And those are just the BSD options -- forget about it if you install the GNU version from DarwinPorts.) Any script that relies on these could fail disasterously, and WORSE, it could accidentally destroy your system. Second, the low-level meaning of moving a file differs slightly from unlinking an inode (no, I don't understand exactly how it works). This could screw up anything that relies on that difference, too -- probably in subtle ways that could slowly corrupt your system over time. Third, if you ever delete anything from another volume, the script actually COPIES files to ~/.Trash (and then deletes the originals) rather than moving them to the volume's own trash. Forget about it if you're trying to delete a "special" file (/dev/* entry, named FIFO, etc.). Fourth, there are almost certainly other unintentional consequences that we haven't even considered. There always are. That's how software works (or more often doesn't, when you pull stupid stunts like this). Any modern system is NEVER just a "personal" system. There are thousands of scripts running that are written by OTHER people. These other people are essentially using your computer every day. |
SearchFrom our Sponsor...What's New:HintsNo new hintsComments last 2 days
Links last 2 weeksNo recent new linksWhat's New in the Forums?
The Editor's Corner...Here are some of my (robg) other projects...
Hints by TopicNews from Macworld
The macosxhints PollWhat version of OS X are you running as your main OS?
Other polls | 11,384 votes | 42 comments
|
|
Copyright © 2009 Mac Publishing LLC (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Powered by Geeklog Created this page in 0.04 seconds |
|