Re: tar command dangerously written
From: Bruce Barnett (spamhater113+U050519195928_at_grymoire.com)
Date: 05/20/05
- Next message: tridentadm: "Re: printing variable values seperately."
- Previous message: Alan Connor: "Re: send html email using mutt / mail / etc?"
- In reply to: danson: "Re: tar command dangerously written"
- Next in thread: Barry Margolin: "Re: tar command dangerously written"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 20 May 2005 00:22:54 GMT
"danson" <danwatts@gmail.com> writes:
> My original point still stands though that it would make good sense to
> prompt an overwrite with the tar command - most user friendly tools
> will prompt on an overwrite (unless a 'force' is used).
I disagree.
If I ask tar to create an archive every night, and I discover that my
nightly backups have failed except for the first time when no file was
there, I would be very upset and it's unfriendlyness.
You also should realize that tar is one of the old commands, and the
user interface violates nearly every convention. (Perhaps it was
created before shells did globbing?) It's one of those mistakes that
we had to live with, like using "umount" instead of "unmount."
Besides, It only takes a few shell lines to make tar more friendly.
It could prompt you for missing arguments, warn you if you might
overwrite a file, etc. And the best part - you can do this to any
command. I usually give them a name with a capital letter i.e. Tar,
etc. Alternately, you could keep the same names, and put, say,
/usr/friendly/bin first in your search path.
Or, you may want to make different commands to do different tar
options, like CreateTar and DumpTar.
If the command REQUIRES a friendly interface, there is often no way to
turn off the friendlyness. In other words, it's much easier to add
functionality that to disable built-in functionality.
I once used a GUI that forced me to confirm each and every delete when
I asked it to delete 500 files. I had to find a different tool to
actually finish the task without developing carpal tunnel.
I did not consider this friendly.
If you want to see an example of a dangerous command, consider
tee *
Just be aware that it can destroy every file in your directory.
-- Sending unsolicited commercial e-mail to this account incurs a fee of $500 per message, and acknowledges the legality of this contract.
- Next message: tridentadm: "Re: printing variable values seperately."
- Previous message: Alan Connor: "Re: send html email using mutt / mail / etc?"
- In reply to: danson: "Re: tar command dangerously written"
- Next in thread: Barry Margolin: "Re: tar command dangerously written"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|