bzcat mydir.tar.bz2 | tar xvf -


 
Thread Tools Search this Thread
Operating Systems Solaris Solaris BigAdmin RSS bzcat mydir.tar.bz2 | tar xvf -
# 1  
Old 10-26-2009
bzcat mydir.tar.bz2 | tar xvf -

To unzip (bunzip2) and untar an archive in a single command, the following command works: bzcat mydir.tar.bz2 | tar xvf -

More...
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

ZCAT xxx.Z|tar -xvf - decompression slow ?

I have recently built a new server and patched Soalris 10 up tp latest bundle etc... When I run a decompress using the format zcat fred.Z |tar -xvf - it runs at a very slow rate. A similiar server which is less powerful runs over twice as quick. Is there any work arounds to configure decompress... (4 Replies)
Discussion started by: smcart
4 Replies

2. UNIX for Advanced & Expert Users

Tar xvf in file

Good afternoom, I have a file very big, when I execute tar xvf XXXXXX_2010.tar, and show me this in the screen. x XXXXXX_2010_(01_DE_18).ixf, 3330845041 bytes, 6505557 media blocks. x XXXXXX_2010_(02_DE_18).ixf, 3336071703 bytes, 6515766 media blocks. x XXXXXX_2010_(03_DE_18).ixf, 3333011013... (3 Replies)
Discussion started by: systemoper
3 Replies

3. Shell Programming and Scripting

Put one tar.bz2 file to another tar.bz2

Hi experts, I have two tar.bz2 file,: a.tar.bz2 and b.tar.bz2 I want to put a.tar.bz2 in to b.tar.bz2 eg: b.tar.bz2 only have one file named "b.c" contained I want it contain "b.c and a.tar.bz2" I don't want to decompress the b.tar.bz2 to achieve this, I try with "cat a.tar.bz2 >>... (1 Reply)
Discussion started by: yanglei_fage
1 Replies

4. UNIX for Dummies Questions & Answers

tar xvf to a different directory?

Hi all, I have a tar file that was done with tar -cvf <tar_file> /directory. Is there any way that I can untar this, i.e. tar -xvf <tar_file> into a different directory? So far Google said you can't do tar -xvf to a different directory. Unfortunately, am not the one doing the tar -cvf... (9 Replies)
Discussion started by: newbie_01
9 Replies

5. Shell Programming and Scripting

I look help in tar xvf

Dears, I have copied one compressed file from one directory to another directory say finame.txt.tar.gz copied from FirstDirectory to SecondDirecory cd FirstDirectory / cp finame.txt.tar.gz SecondDirecory cd SecondDirecory/ once i do gunzip to finame.txt.tar.gz it, the file got... (4 Replies)
Discussion started by: faiz
4 Replies

6. AIX

tar -xvf doesnt work

Hello Im trying to extract this file tar -xvf opt-samba-base.tar.tar tar: 0511-169 A directory checksum error on media; 0 not equal to 75420. but I get that message I tried algo with gunzip and uncompress but nothing happens gunzip -d opt-samba-base.tar.tar gunzip:... (2 Replies)
Discussion started by: lo-lp-kl
2 Replies

7. Solaris

tar -xvf is showing error

Hi, When i am trying to untar a file for installation its showing an error like tar -xvf te_agent__sparc.en_tar.gz tar: directory checksum error Please help me to solve this issue........... (10 Replies)
Discussion started by: Renjesh
10 Replies

8. Shell Programming and Scripting

compare two tar.bz2

Hello, I am using a bash script to archive directories of text files located in ${root}: tar cf ${root}.tar ${root}* bzip2 ${root}.tar I'd like to compare the newly produced archive two.tar.bz2 with the second latest one.tar.bz2. cmp one.tar.bz2 two.tar.bz2 returns one.tar.bz2 two.tar.bz2... (2 Replies)
Discussion started by: JCR
2 Replies

9. UNIX for Advanced & Expert Users

extracting from tar.bz2

hi could any body tell me how to extract .tar.bz2 files i tried using tar but in vain. i found bzip2 in googling but i could not find it on machine unix tru64 please suggest. (1 Reply)
Discussion started by: Raom
1 Replies
Login or Register to Ask a Question
chroot(1M)						  System Administration Commands						chroot(1M)

NAME
chroot - change root directory for a command SYNOPSIS
/usr/sbin/chroot newroot command DESCRIPTION
The chroot utility causes command to be executed relative to newroot. The meaning of any initial slashes (/) in the path names is changed to newroot for command and any of its child processes. Upon execution, the initial working directory is newroot. Notice that redirecting the output of command to a file, chroot newroot command >x will create the file x relative to the original root of command, not the new one. The new root path name is always relative to the current root. Even if a chroot is currently in effect, the newroot argument is relative to the current root of the running process. This command can be run only by the super-user. RETURN VALUES
The exit status of chroot is the return value of command. EXAMPLES
Example 1: Using the chroot Utility The chroot utility provides an easy way to extract tar files (see tar(1)) written with absolute filenames to a different location. It is necessary to copy the shared libraries used by tar (see ldd(1)) to the newroot filesystem. example# mkdir /tmp/lib; cd /lib example# cp ld.so.1 libc.so.1 libcmd.so.1 libdl.so.1 libsec.so.1 /tmp/lib example# cp /usr/bin/tar /tmp example# dd if=/dev/rmt/0 | chroot /tmp tar xvf - ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
cd(1), tar(1), chroot(2), ttyname(3C), attributes(5) NOTES
Exercise extreme caution when referencing device files in the new root file system. References by routines such as ttyname(3C) to stdin, stdout, and stderr will find that the device associated with the file descriptor is unknown after chroot is run. SunOS 5.10 15 Dec 2003 chroot(1M)