Solved

Syntax for gtar

Posted on 2006-06-09
6
1,804 Views
Last Modified: 2008-01-09
Trying to gtar directory and subdirectories.  Need to include long file names and maintain symbolic links and maintain permissions.  What is the syntax for command line?

0
Comment
Question by:xoxomos
6 Comments
 
LVL 45

Expert Comment

by:Kdo
ID: 16870455
Hi xoxomos,

tar -cp {path} > archive

I think that gtar handles long file names automatically.
The default is to dump symlinks as symlinks.


Good Luck!
Kent
0
 
LVL 61

Accepted Solution

by:
gheist earned 150 total points
ID: 16875726
tar cpf file.tar directory/

cpf - create archive, include permissions, use first parameter as result file, instead of using default tape

ans xpf prameter after to extract using permissions.
0
 
LVL 6

Assisted Solution

by:JJSmith
JJSmith earned 100 total points
ID: 16881975
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 61

Expert Comment

by:gheist
ID: 16882023
http://www.freebsd.org/cgi/man.cgi?query=tar

Basically for extra info on what parameters to avoid to keep scrits portabls...
0
 

Author Comment

by:xoxomos
ID: 16887482
Actually is Solaris and it doesn't seem to like tar -cp {path} > archive
0
 
LVL 61

Expert Comment

by:gheist
ID: 16889781
Not that way.

tar cpf - {path} > archive

i.e. one should use stdout instead of default tape for shell redirect to work.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
lsuser for specific number of users listed in a file 11 99
ftpcommand 2 56
Problem logging tar errors 11 54
Bash Script to Analyze Oracle Schemas 11 80
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now