LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 09-23-2004, 03:09 PM   #1
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Rep: Reputation: 45
tar with permissions


Hi.... I want to tar a folder with all the subfolders preserving concurrently the permissions......

How i can tar them and how i can untar it in a new system...?

In the new system if the user and group does not exist do u know if it is possible the untar create the user and group???

Thx ... have a nice day
 
Old 09-23-2004, 03:29 PM   #2
kan4132
LQ Newbie
 
Registered: Jul 2004
Posts: 4

Rep: Reputation: 0
Re: tar with permissions

Quote:
Originally posted by alaios
Hi.... I want to tar a folder with all the subfolders preserving concurrently the permissions......

How i can tar them and how i can untar it in a new system...?

In the new system if the user and group does not exist do u know if it is possible the untar create the user and group???

Thx ... have a nice day

Go into the directory that you want to tar up. for example "cd test" then use the tar command "tar -cf outputfile.tar *.*" it'll take all of the files in your folder and tar them up. Simply move them to the new system and use the command "tar -xf outputfile.tar" and you're all extracted. I have no idea if this is going to work if you have directories in the folder you wish to tar up. I highly doubt it though.

As for your other question. I haven't the foggiest. Sorry.
 
Old 09-23-2004, 04:08 PM   #3
Blinker_Fluid
Member
 
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 683

Rep: Reputation: 63
I would do something like
tar -zcvpf test.tgz directory/ --same-owner

No I don't think it is possible to have tar create the owner/group on the new system. If the owner does not exist then it will put the UID/GID in for username or group. Also if you have bob on one server with UID of 501 and bill on another server with UID of 501 then Bill will own bob's files on the new server.

To extract it's just the normal tar -zxvf test.tgz from the directory you want to extract the files to.

Last edited by Blinker_Fluid; 09-23-2004 at 04:17 PM.
 
  


Reply



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



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
Tar permissions exvor Linux - Software 5 05-31-2005 02:54 PM
fat32 permissions change/tar problems microsoft/linux Debian 5 10-18-2004 09:03 AM
permissions on tar backup files durden2.0 Linux - Newbie 4 08-03-2004 11:50 PM
Diferance between rpm, tar, tar.gz, scr.tar, etc mobassir Linux - General 12 08-21-2003 06:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

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