Tar -C in Solaris 10


 
Thread Tools Search this Thread
Operating Systems Solaris Tar -C in Solaris 10
# 1  
Old 10-11-2007
Tar -C in Solaris 10

Hi
I what unpack my TAR archive in separate folder Smilie
For example on Linux:
Code:
# mkdir /data/one/two
# cd /data
# touch 11{1,2,3,4,5,6,7,8}
# pwd
/data
# ls -l
total 32
-rw-r--r-- 1 root root 0 Oct 11 13:54 111
-rw-r--r-- 1 root root 0 Oct 11 13:54 112
-rw-r--r-- 1 root root 0 Oct 11 13:54 113
-rw-r--r-- 1 root root 0 Oct 11 13:54 114
-rw-r--r-- 1 root root 0 Oct 11 13:54 115
-rw-r--r-- 1 root root 0 Oct 11 13:54 116
-rw-r--r-- 1 root root 0 Oct 11 13:54 117
-rw-r--r-- 1 root root 0 Oct 11 13:54 118
# tar -cf 11x.tar 11*
# ls -l *.tar
-rw-r--r-- 1 root root 10240 Oct 11 13:54 11x.tar
# tar xvf 11x.tar -C /data/one/two
# ls -l /data/one/two
total 32
-rw-r--r-- 1 root root 0 Oct 11 13:54 111
-rw-r--r-- 1 root root 0 Oct 11 13:54 112
-rw-r--r-- 1 root root 0 Oct 11 13:54 113
-rw-r--r-- 1 root root 0 Oct 11 13:54 114
-rw-r--r-- 1 root root 0 Oct 11 13:54 115
-rw-r--r-- 1 root root 0 Oct 11 13:54 116
-rw-r--r-- 1 root root 0 Oct 11 13:54 117
-rw-r--r-- 1 root root 0 Oct 11 13:54 118

How i can it on Solaris 10 ? -C not worked Smilie

Last edited by jess_t03; 10-11-2007 at 05:20 AM..
# 2  
Old 10-11-2007
See if gtar is installed
Code:
pkginfo SUNWgtar

If not, download the appropriate package from SunFreeware.com

Cheers,
ZB
# 3  
Old 10-11-2007
$ pkginfo SUNWgtar
system SUNWgtar gtar - GNU tar
# 4  
Old 10-11-2007
/usr/sfw/bin/gtar
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to check tar version in Solaris?

for pkg in `pkginfo | grep tar | grep application | awk '{print $2}'`; do pkginfo -l $pkg | grep VERSION; done Please use CODE tags as required by forum rules! (2 Replies)
Discussion started by: svijayas
2 Replies

2. Solaris

Solaris tar command to ignore mount points?

i.e. to stay in local filesytem. I believe the flag in linux is one-file-system. Is there corresponding in solaris? SOLARIS 9 BTW. (10 Replies)
Discussion started by: psychocandy
10 Replies

3. Shell Programming and Scripting

tar command to explore multiple layers of tar and tar.gz files

Hi all, I have a tar file and inside that tar file is a folder with additional tar.gz files. What I want to do is look inside the first tar file and then find the second tar file I'm looking for, look inside that tar.gz file to find a certain directory. I'm encountering issues by trying to... (1 Reply)
Discussion started by: bashnewbee
1 Replies

4. UNIX for Dummies Questions & Answers

How to install new version of tar under solaris 9

Hello, I'm trying to install new version of tar under solaris "tar-1.23-sol9-sparc-local.gz" in Solaris, I downloaded this version from sunfreeware.com I unzip it and I found only binaire file no Readme... some one vcan help ?? Thanks (2 Replies)
Discussion started by: Sigma
2 Replies

5. UNIX for Dummies Questions & Answers

tar -cvf test.tar `find . -mtime -1 -type f` only tar 1 file

Hi all, 4 files are returned when i issue 'find . -mtime -1 -type f -ls'. ./ora_475244.aud ./ora_671958.aud ./ora_934052.aud ./ora_934050.aud However, when I issued the below command: tar -cvf test.tar `find . -mtime -1 -type f`, the tar file only contains the 1st file -... (2 Replies)
Discussion started by: ahSher
2 Replies

6. Solaris

how to tar a directory in a sun solaris?

i have lot of directories which are needed to be transferred to a LINUX workstation. to do this i need to tar the directories. please let me know how to tar the directories in Sun Solaris. (7 Replies)
Discussion started by: mmb
7 Replies

7. UNIX for Dummies Questions & Answers

gnu tar on Solaris 8

Here is how I got where I am: I tried untarring tomcat and at the end of the untar I get the following: So I downloaded GNU tar and did a pkgadd -d, which installed the package. But when I run /usr/local/bin/tar, I get this message: (1 Reply)
Discussion started by: dangral
1 Replies

8. Solaris

Combination of gunzip and tar on Solaris

Hello I'm trying to use a combination of gunzip and tar to unpack and unzip a *.tar.gz file. I tried gunzip ~/myfile.tar.gz | gtar -x This will unzip the file, but it won't unpack. Any hints? thanks a lot Dan (5 Replies)
Discussion started by: dwidmer
5 Replies

9. UNIX for Dummies Questions & Answers

delete a file from an existing Solaris tar

How can I delete a file from an existing Solaris tar file ? (not gtar) (2 Replies)
Discussion started by: avnerht
2 Replies
Login or Register to Ask a Question