We help IT Professionals succeed at work.

untar fedora 13

teera
teera used Ask the Experts™
on
How can i unter   backup.tar    to /home      remark backup.tar is in usbstick  i use fedora 13
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
President
Commented:
Hi,

You can use:

tar -tvf backup.tar

to see the contents

tar -xvf backup tar

to extract. If the contents are zippep add the z switch such as:

tat -tvzf backup.tar

Cheers,
K.
Kerem ERSOYPresident

Commented:
sorry tat should be tar.
There should be no difference from where you untar your archive,whether from USB,DVD or whatever. If we suppose that the full path of your backup.tar is:
/media/USB/backup.tar
then issuing the following command should do the job:
tar xvf /media/USB/backup.tar -C /home/
I would copy the file from the usb stick to /home/username,

[ user @ linux $ ] mount

will show you where the usb stick is mounted. It will be called:

/dev/sd[a,b,c,d]1

Just look on that line of the mount output, and that's the directory with your backup in it. If the usb stick is in /media/ with a really long and complicated directory name, you can just use the first character of the directory name and *, like this /media/a*.

If the usb stick is not mounted, you can mount it:

[ user @ linux $ ] sudo mkdir /mnt/usb

[ user @ linux $ ] ls /dev/sd*

The last /dev/sd[x]1 device is the usb stick.

[ user @ linux $ ] sudo mount /dev/sd[x]1<space> /mnt/usb

copy the file:

[ user @linux $ ] cp /mnt/usb/backup.tar<space>~/   (tilde-slash means /home/username)

Make sure your in you /home directory:

[ user @ linux $ ] pwd

and use one of the following command lines:

backup.tar

[ user @ linux $ ] tar xvf backup.tar

backup.tar.gz

[ user @ linux $ ] tar zxvf backup.tar.gz

backup.tar.bz2

[ user @ linux $ ] tar jxvf backup.tar.bz2

The backup files should be in ~/backup/