Bug 22211

Summary: typoed tar -c clobbers archives
Product: Base System Reporter: Pekka Savola <pekkas>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.1.1-STABLE   
Hardware: Any   
OS: Any   

Description Pekka Savola 2000-10-22 15:30:01 UTC
Current tar (1.11.2) clobbers existing archives if called with:

tar zcvf test.tar.gz

when you meant to type:

tar zxvf test.tar.gz

This is, of course, a stupid typo, but more current tar versions (for example 1.13.17), detect and prevent the silliness:

$ tar zcvf test.tar.gz 
tar: Cowardly refusing to create an empty archive
Try `tar --help' for more information.

Fix: 

Please consider upgrading tar :-)
How-To-Repeat: See above.
Comment 1 Mike Barcroft freebsd_committer freebsd_triage 2001-12-03 09:45:42 UTC
State Changed
From-To: open->closed


FreeBSD -- Tools not policy.  Consider using the `w' option with tar, 
if you frequently encounter these types of problems.