Syntax for gtar

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?

xoxomosAsked:
Who is Participating?
 
gheistCommented:
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
 
Kent OlsenData Warehouse Architect / DBACommented:
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
 
JJSmithCommented:
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
gheistCommented:
http://www.freebsd.org/cgi/man.cgi?query=tar

Basically for extra info on what parameters to avoid to keep scrits portabls...
0
 
xoxomosAuthor Commented:
Actually is Solaris and it doesn't seem to like tar -cp {path} > archive
0
 
gheistCommented:
Not that way.

tar cpf - {path} > archive

i.e. one should use stdout instead of default tape for shell redirect to work.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.