Tar overwrites without prompting by default
Bug #113154 reported by
timothy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bash (Ubuntu) |
Invalid
|
Wishlist
|
Unassigned |
Bug Description
Tar overwrites files old or new without prompting by default. This means that, 1 a user could download a tar file for a theme, untar it at the CLI and have it overwrite config files in the home dir. And 2, it means that when I went to untar my home dir backup just now to get back some files, I lost the last few days changes to the files I had not accidentaly deleted. Not good for noobs.
To post a comment you must log in.
Thank you for your bug report. While I absolutely agree that this is a problem, I'm afraid that there's little that can be done about it. If we change tar's behavior to not overwrite files, we break with traditional tar behavior, which is something that many scripts rely upon. There are common uses of tar that expect to replace the existing contents of a directory with the contents of the archive ("extract over a directory").
Be that as it may, it may be worth considering aliasing "tar" to "tar --backup" in the .bashrc's, so that interactive use of tar will not destroy data by default. For this reason, I've switched this bug's package to bash, for consideration.