Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-01-2006, 08:33 AM   #1
Registered: Jul 2004
Location: South Africa
Posts: 146

Rep: Reputation: 15
Cool restore a tar file.

Hi Again
Can some one help me, i forgot the command on how to restore a tar file.?
But the tar file is on my tape drive which is /dev/st0. the problem is i only want to restore certain file from the tar file into /restore directory and over write the files where came from on the system.?

Old 06-01-2006, 09:26 AM   #2
Senior Member
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
man tar 
tar --help
tar -tvf /dev/st0
to get a list of files on your device.
You may need to add some options if you want the tar archive is zipped (compressed).

Replace the "t" with an "x" and then add the files you want to extract at the end to restore your files.
You can use wildcards, but I suggest you put them inside single quotes, so that the shell doesn't do wildcard expansion before passing the parameters to tar.
tar -xvf /dev/st0 '*.txt'


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 14 10-25-2016 02:48 AM
restore lfs from tar.bz2 file logicalfuzz Linux From Scratch 2 09-20-2005 01:13 AM
gave wrong syntax for tar as tar -cvzf file file.tgz how to recover the file gautham Linux - General 4 04-13-2005 03:15 AM
tar/restore questions solex Linux - General 5 09-01-2004 02:03 PM
how can I restore a tar backup len snelly Linux - Newbie 1 04-30-2002 12:29 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:22 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration