RFC: alias tar="tar --backup" ?

Micah Cowan micahcowan at ubuntu.com
Fri May 18 01:03:18 UTC 2007


Onno Benschop wrote:
> From a usability perspective I would feel that you're changing expected
> behaviour for existing users. I also note that there are no active
> aliases in my current (Edgy) installation, and that the ones there are
> commented out.

Absolutely. The choice, as I see it, is minor inconvenience to users
such as you and I, who have certain expectations on tar's default
behavior (and whose user accounts are recently created, as otherwise
we'll just continue to have our original .bashrc files); and new users
who don't realize that if they tar -x, it will overwrite all conflicting
files.

> If you're going to do this, will you do an audit of all the packages
> available within Ubuntu to make sure that they too don't overwrite things?

Heck no. I'd wait for users to complain about it, as I've done here. :)

Also, I can't think of too many common CLI utilities that actually do
overwrite things (especially, multiple things) by default in that way.

> As I said, doing the right thing is hard. Personally I don't think the
> path you're advocating will make it better. Education is the key.
> 
> Of course, you could come up with an alias like "tar_backup" and update
> the man page to reflect that.
>
> A completely different approach could be that the calls that actually
> write to a file check that the file does not exist. You could activate
> this with a system-wide flag, but I strongly suspect that this would be
> more work than the few words it took for me to write the idea.

The call of which you speak (open()) already does this, unless you tell
it that you specifically wish to overwrite files (which tar does).

-- 
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer...
http://micah.cowan.name/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-devel-discuss/attachments/20070517/80894369/attachment.sig>


More information about the Ubuntu-devel-discuss mailing list