Re: [Fedora] Re: Specifying tmp for tar

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rick Stevens wrote:
On Fri, 2007-08-31 at 23:18 +0300, Dotan Cohen wrote:
I have a 2 GB bz2 archive that unzips to over 10 GB (wikipedia dump).
Although I have over 50 GB free in /home, / has only about 8 GB free.
Thus, as tar uses /tmp, the / filesystem fills up and I cannot
continue. How can I specify a tmp directory for tar in my home
directory? Note that man tar makes no mention of a tmp option.

Boot in single user mode,  Then as root:

	# mkdir /home/tmp
	# chmod 777 /home/tmp
	# mv /tmp /tmp-old
	# ln -s /home/tmp /tmp
	# cp -a /tmp-old/* /tmp

Doesn't tar only use tmp because it has to uncompress the file first? If that's the case, why not uncompress the file first with bzip2 somewhere on the file system that actually has space, and then run tar to extract the files? In essence he would be renaming his file to archive.tar.bz2, run bunzip2 against it, and then run tar against the archive.tar...

bzip uses whatever the current path is to compress or decompress a file, so /tmp wouldn't play a part here.

That's my theory at least. The last time I had to uncompress a large archive (over 100GiB in size), that's what I did and it worked flawlessly. Worst case, you can specify the -s option to bunzip2 which will cause bzip to use even less memory (and /tmp if he's really low on memory) and still get the file uncompressed.

   -- A


--
H | It's not a bug - it's an undocumented feature.
 +--------------------------------------------------------------------
 Ashley M. Kirchner <mailto:ashley@xxxxxxxxxx>   .   303.442.6410 x130
 IT Director / SysAdmin / Websmith             .     800.441.3873 x130
 Photo Craft Imaging                       .     3550 Arapahoe Ave. #6
http://www.pcraft.com ..... . . . Boulder, CO 80303, U.S.A.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux