Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tar problem!!

Status
Not open for further replies.

ndog4ever

MIS
Feb 6, 2002
92
US
i am trying to figure out the correct flags to untar a file and make its content stay in that current directory

tar -xvf namedb_backup -C /opt/chroot/opt/bind/var/named

that does nothing, if i just issue the tar -xvf namedb_backup , then it trys to extract to another directory. Is there a way around this? If there is please let me know, i dont want to have to move all these directories manually.

Thanks,

Nate
 

PWD=`pwd`
mkdir -p /opt/chroot/opt/bind/var/named
cd /opt/chroot/opt/bind/var/named
tar xfvp $PWD/namedb_backup
............NOTA
assumed namedb_backup is a tarfile AND is NOT a tarfile of an absolute path, in this case, you need 'chroot'
vox clamantis in deserto.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top