Please help with tar syntax.

Please help with tar syntax.

Post by Roy D » Sun, 31 Dec 1899 09:00:00



I am in need of some actual examples of commands to create tar files.
I have a directory I want to turn into a tar.gz file.
I need it to include all files and sub directory's with ownership, mode
and everything intact.

Please post answers here.
Thank you
Roy

  webmaster.vcf
< 1K Download
 
 
 

Please help with tar syntax.

Post by Randall J. Par » Sun, 31 Dec 1899 09:00:00



> I am in need of some actual examples of commands to create tar files.
> I have a directory I want to turn into a tar.gz file.
> I need it to include all files and sub directory's with ownership, mode
> and everything intact.

> Please post answers here.
> Thank you
> Roy

Assuming you are user root and IN directory /home and further assuming
/home contains directory joe/ and fred/ (with subdirectories), you can
create a compressed tar file joefred.tar.gz (or joefred.taz) with the
following command:

gtar -zcvf joefred.taz joe fred

The ownerships, etc. will be preserved.

You can extract the tar INTO YOUR PRESENT WORKING DIRECTORY with

gtar -zxvf joefred.taz

the directories joe/ and fred/ will be created and permissions will be set
as they were saved (assuming those group/user id's exist on the system the
tar is extracted on).

R.Parr
Temp*Arts

 
 
 

1. Help with tar syntax please

Hello,

I'm planning on copying one of my partitions to a new one.  Originally I was
going to use Partimage, but I'd like to try it using tar.  Some searching
has shown me that the following command should work:

cd/home; tar cvpf - * | (cd/newhome; tar xvpf -)

However, I would like to fully understand the command before I use it.
Manual pages tell me what the options c, v, p, f, x do.  I don't know what
the "-", "|", and paranthesis do.  I can see what the command is doing
overall, but I don't understand the specific syntax mentioned.  If anyone
can shed light on this for me, or give me a link to a more comprehensive
explanation of tar, I would appreciate it.

thanks
sluggo

2. Genius-Netmouse with Linux ???

3. help on tar command and its syntax.

4. libc-4.4.4 upgrade

5. help: tar syntax

6. Is there a release of linux supporting DMA66?

7. Help with samples of regular expressions syntax please

8. /dev/modem permissions. Help!

9. Apache:mod_rewrite syntax help please

10. Please help me with Syntax problem- Parsing Mail Files

11. Sendmail problems. Please please please please help!

12. PLEASE PLEASE HELP Major problem with my SCSI & Redhat 5.0 PLEASE Help

13. NFS please help me please please please sniff