tar multiple directories into one file
I have found ways to tar a directory and exclude certain directories but is there a way to simply tar multiple directories (they are in the same directory) in to one .tgz file? thx.
|
see:
Code:
man tar |
Hello davedpss,
Code:
tar cf directories.tar dir1 dir2 dir3 Markus |
It depends on what you want to do.
tar -cvf tarfile.tar dir1 dir2 dir3 tar -cvf tarfile.tar * tar -cvf tarfile.tar -T filename_where_files_are_listed man tar |
I don't know how I missed this. I thought I had tried that and didn't get the result I was expecting. Obviously I was wrong. I should have suspected something when I didn't see a post on this when I searched this forum. Maybe the next person to search on this will appreciate that I asked the obvious question and get his question answered.
For the guy who simply answered "man tar" why bother? You feel better? Thanks to those that answered the question. |
Quote:
Anyway, since the issue is solved, you should mark the thread as solved now. |
Quote:
|
Quote:
|
Just for the record, I did use the man page and I searched on the internet and I searched this forum. Man pages to me are at times helpful and at times confusing. I didn't find this answer there - it was neither obvious nor obscure. I have no problem with someone telling me about the man page in the spirit of being helpful. The answer to this question could have easily been answered in the same amount of time and effort (and was) and then add that man tar would provide more info if they thought I was unaware of man.
I've used enough lists to know that there is a certain percentage of users that are arrogant and rude. Every time I post a question, I'm planning that somebody is going to take a shot at it to prove their superiority. I'm new to a lot of this stuff (that's why the newbie forum) and I'm sure I will ask more questions that seem stupid to some. I am grateful to those that did answer the question. I want to rip off a bunch of nasty comments and obscenities here but hey, what good would that do. Now I'm going to set myself up here for someone to take another shot but I would like to show this as solved but not sure how to do that (yes, i have looked around and no, i haven't found anything) Thanks. |
All times are GMT -5. The time now is 05:52 AM. |