|
|
TAR Question
|
|
|
|
Mac Enthusiast
Join Date: Oct 2001
Location: Chicago, IL
Status:
Offline
|
|
Hi there,
Can someone please give me the "tar" command to do the following:
1) Copy every file in the current directory I am in (including: "dot" files, refular files, directories and subdirectories - basically... everything)
2) Maintaining the ownership for the above files, as is
3) Maintaining the permissions for the above files, as is
I'm way new to UNIX commands and need to copy all of the files from one domain to another. Everything is exactly how I want it at domain "A" - but I need to copy it over to domain "B". I figure I can download the tar file from "A" and upload it to "B." Any help?
Thanks,
BD
* P.S. Also, the "untar" command (for once I take the tar file and upload it to the other directory) would be helpful. I think it's just another "tar" command, but with different letters.
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Oct 2005
Location: Houston, TX
Status:
Offline
|
|
Please read the man page for tar and make an effort to figure out both commands on your own. I'll help you if you get stuck, but the best way to learn is by doing.
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Oct 2001
Location: Chicago, IL
Status:
Offline
|
|
Hey,
That's great... I wish I knew what a man page was, before you linked me to it. This is akin to my asking how to say something in Spanish, and being pointed to a Spanish dictionary. I'm trying, but I do not understand. Does this look correct:
tar cvf dbA_backup.tar *
And then:
tar xvf dbA_backup.tar
I'm trying to get it... but command line is not what I do (thus, the Mac). Thanks if you can help,
BD
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Oct 2001
Location: Chicago, IL
Status:
Offline
|
|
Ahh... forget it, I guess. My commands listed above do not keep ownership or permissions. I'll have to post somewhere else.
I'm all for learning by doing, but this isn't the time or place for me to dissect what a "man" page is... I just needed help with two UNIX commands. Not help on taking the time to learn UNIX. I didn't ask top be taught, I asked to be helped.
BD
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Oct 2005
Location: Houston, TX
Status:
Offline
|
|
"man" page is short for manual pages; most unix-like OSs include them to help users with the variety of unix commands.
This thread probably belongs in the UNIX forum anyway.
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Oct 2001
Location: Chicago, IL
Status:
Offline
|
|
Wow... thanks for all of your help.
BD
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
The -p flag will preserve permissions. Add that to the commands you listed above and they should work. But in order to extract files with the original owners in place (rather than owned by the user that extracted them), you'll have to use sudo tar rather than just tar when you extract them, since only root can set ownership. You might want to consider whether you actually want to keep the same owner, though — "same owner" could be kind of meaningless across machines.
As a side note, it's pretty rude to tell people, "I don't want you to help me solve the problem myself; I just want you to do all the work for me." People don't like to feel like they're being used. More politeness will go a long way toward winning people over and making them offer more help of their own accord.
(
Last edited by Chuckit; Feb 13, 2006 at 03:21 PM.
)
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|