LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-03-2005, 11:44 AM   #1
bob_man_uk
Member
 
Registered: Jul 2003
Location: Malta
Distribution: Ubuntu/Windows/Mac
Posts: 83

Rep: Reputation: 16
TAR'ing multiple directories


hi all,

probably a no brainer question but i dont thave the time to research this, i need to backup multiple directories to one tar file which will then be put onto tape, I have a scripe that will do the backup to tape but i cant figure out how to tar multiple directories, i have approx 40GB of data most of which are drawings and office docs which will fit onto a 20gb travan tape (when using compression with tapeware, which has knackered)
i dont mind using two tape cos this will only be a weekly thing, daily I can trim the dross and make it less than 20GB,

any ideas welcome
if you would like me to rephrase please say so,

thanks

mattyG
 
Old 02-03-2005, 11:52 AM   #2
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
you mean like:

tar -cf myTar.tar dir1 dir2 dir3 dir4 etc...

or something else?
 
Old 02-03-2005, 11:59 AM   #3
bob_man_uk
Member
 
Registered: Jul 2003
Location: Malta
Distribution: Ubuntu/Windows/Mac
Posts: 83

Original Poster
Rep: Reputation: 16
yeah thats what I was trying to do,

tar -cf /root /data /dnchost /drawings /backup.tar

but it falls over and i think its looking for the path /root/data/dnchost/drawings which of course doesnt exist, but if the PATH1 Path2 path3 etc is correct then how do you write the directories out to a tar file?

thanks

mattyG
 
Old 02-03-2005, 12:08 PM   #4
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
you gotta put the name first like:

tar -cf backup.tar /root /data /dnchost /drawings

note that this will put backup.tar in the current directory
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Searching multiple directories and sub directories for a file jeep99899 Linux - Newbie 2 10-13-2005 01:23 PM
Help I need help tarring multiple files in multiple directories VisionZ Linux - Newbie 28 03-25-2004 06:25 PM
Contents of multiple directories in one playroll Linux - Newbie 2 11-17-2003 03:17 PM
Multiple directories in .iso Wynd Linux - General 3 07-17-2003 07:02 AM
tar multiple directories computera Linux - General 2 11-17-2001 08:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:48 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration