Command in Solaris 10 to exlude more than one directory while creatinga tarfile


 
Thread Tools Search this Thread
Operating Systems Solaris Command in Solaris 10 to exlude more than one directory while creatinga tarfile
# 1  
Old 05-07-2013
Sun Command in Solaris 10 to exlude more than one directory while creatinga tarfile

Hi,
I am using solaris 10.Could anyone please help me on command to create a tar file by excluding more than one directory.I have tried below command but it did not work.


tar -pcvf orderm_setup.tar . --exclude=/orderm/common/7.0/logs001

Advance thanks for your reply.
# 2  
Old 05-07-2013
GNU tar is likely already installed:
Code:
/usr/sfw/gtar -pcvf orderm_setup.tar . --exclude=/orderm/common/7.0/logs001

# 3  
Old 05-08-2013
Code:
/usr/sfw/bin/gtar -pcvf orderm_setup.tar . --exclude=./logs001

Or
Code:
echo ./logs001 > exclude_file
tar pcvfX orderm_setup.tar exclude_file .

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Adding file to compressed tarfile

Hello all, I would like to add a file to a compressed (gzip) tarfile. Normally it won't be a Problem, if I would do it in several steps. But I do not want to have unnecessary files. So, in words: unzip the tarfile add a new file zip the tarfile What I tried: ... (3 Replies)
Discussion started by: API
3 Replies

2. Shell Programming and Scripting

Change to directory and search some file in that directory in single command

I am trying to do the following task : export ENV=aaa export ENV_PATH=$(cd /apps | ls | grep $ENV) However, it's not working. What's the way to change to directory and search some file in that directory in single command Please help. (2 Replies)
Discussion started by: saurau
2 Replies

3. Solaris

Problem when I try to create a directory on Solaris 8

Dear Gurus of solaris I have a problem when I try to create a directory when I enter in the /home/ directory and try to create a new directory appear the following error Why If I am root, Can any guru can help me (3 Replies)
Discussion started by: andresguillen
3 Replies

4. Solaris

Copy directory from solaris to windows.

Hi All I am new to Unix/sloaris. I want to copy a directory (which conatins further sub directories and files)from sloaris to my windows.I am using PuTTy for it. please any one guide me how to do this or share with me some piece of script. It will be very regarded Best Wishes MIS. (3 Replies)
Discussion started by: MIS
3 Replies

5. Programming

Copy directory from solaris to windows.

Hi All I am new to Unix/sloaris. I want to copy a directory (which conatins further sub directories and files)from sloaris to my windows.I am using PuTTy for it. please any one guide me how to do this or share with me some piece of script. It will be very regarded Best Wishes MIS. (1 Reply)
Discussion started by: MIS
1 Replies

6. Solaris

How to change directory limit in Solaris?

Hi, I am using Solaris 10. i was trying to make a new directory in /u04 but it don't let me make directory unless i remove some other directories. i issued the following command df -F ufs -o i Filesystem iused ifree %iused Mounted on /dev/dsk/c1t0d0s0 ... (2 Replies)
Discussion started by: malikshahid85
2 Replies

7. Solaris

what is the command to see the java version in solaris 8 and solaris 10

what is the command to see the java version in solaris 8 and solaris 10 (1 Reply)
Discussion started by: tv.praveenkumar
1 Replies

8. Solaris

how to restriction directory size in solaris

how to restrict the size of any directory in solaris. is there any command to give specific file size value for a directory? is there any idea? regards (3 Replies)
Discussion started by: nibiru78
3 Replies

9. Solaris

help linking directory from a hp to a solaris

I need to link a directory from a hp to a solaris machine like mapping in windows any suggestion will be apreciated thanks Raulb (3 Replies)
Discussion started by: raulb
3 Replies

10. UNIX for Dummies Questions & Answers

How to compress a directory on a Sun Solaris 5.7 ?

Hi, Is there any utility to compress an entire directory on a Sun Solaris 5.7 ? Something like "compressdir" on other flavours of Unix ? Thanks (4 Replies)
Discussion started by: sameerdes
4 Replies
Login or Register to Ask a Question