?
Solved

Syntax for gtar

Posted on 2006-06-09
6
Medium Priority
?
1,850 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 46

Expert Comment

by:Kent Olsen
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 62

Accepted Solution

by:
gheist earned 600 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 400 total points
ID: 16881975
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 62

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 62

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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
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.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

800 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