LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 05-09-2005, 11:29 AM   #1
GUIPenguin
Member
 
Registered: Aug 2004
Location: Maine
Distribution: Gentoo Linux
Posts: 239

Rep: Reputation: 30
move files in tar.gz back into original folders


if I have made a backup in a tar.gz file backup.tar.gz and inside this archive I have system files and folders such as bin etc and sub folders etc/folder

is there a command I can use to have all these folders go back inplace where they were originaly were so in the backup.tar.gz the files in etc would go back into the /etc folder or the folder that corresponds.

Last edited by GUIPenguin; 05-09-2005 at 11:41 AM.
 
Old 05-09-2005, 12:11 PM   #2
freakyg
Member
 
Registered: Apr 2005
Distribution: LFS 5.0 and 6.1
Posts: 705

Rep: Reputation: 30
Now when I make a tarball I like to keep all the path's from which the file is
in. For this use the -P switch (absolute path)

Code:
 tar -zPvcf filename.tar.gz /path/to/file
When I extract it I will see a new directory called /path
and under that I will see the "to" directory, and the "file" is under "to"

Last edited by freakyg; 05-09-2005 at 12:13 PM.
 
  


Reply


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot using FTP move command to move files adrianmak Linux - Networking 4 04-21-2009 12:01 PM
Using (s)tar for back-up to hard disk creating very large files jlinkels Linux - Software 3 10-25-2005 08:55 PM
getting downloaded rpm/cups and tar files into correct folders mookie2125 Linux - Newbie 4 07-17-2005 08:35 PM
weird hostname appeared, want the original back rksanders Debian 2 12-05-2004 05:53 PM
how to restore back the gnome original desktop Egyptian_Isis Linux - Newbie 2 10-31-2003 12:20 AM


All times are GMT -5. The time now is 07:42 PM.

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