3
2
How should I tar/gzip and delete files somewhat safely?
Background: We're running a little low on disk space on a Ubuntu computer (Hardy Heron), and I want to tar/gzip, verify that it worked, and then delete, some directories I'm no longer using. I'm planning on making a tar gzip for each directory I'm getting rid of. (The gzips will be to the hard drive, not a magnetic tape)
I came across a solution that ought to be safe but isn't at unix.com. It isn't safe because in current versions of tar, --remove-files can delete files even if the archive isn't created. (Acknowledged as a bug in this email)
I've also noticed a --compare option, but it says that it "ignores files in the file system that do not have corresponding members in the archive".
Also, does gzipping interfere with tar's ability to check against the existing files?
I'm not using multiple computers. – Andrew Grimm – 2009-11-10T23:47:33.357
rsync does not require 2 computers. You can define the source & destination to whatever you want. A local rsync is perfectly legal. – DaveParillo – 2009-11-11T02:06:08.453