Sponsored Content
Top Forums Shell Programming and Scripting tar the entire directory except one directory Post 302349852 by kalpeer on Wednesday 2nd of September 2009 05:22:44 AM
Old 09-02-2009
Bug

Thanks for your information.
tar -cvf test.tar --exclude bin/perl bin/
When i execute i am getting the below error
tar: --exclude: No such file or directory

---------- Post updated at 01:22 AM ---------- Previous update was at 12:34 AM ----------

I got a solution.
Put the excluded file or directory name in some temporary file (/tmp/test)

then execute tar -cvfX test.tar /tmptest *

Thanks All Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to zip the entire directory

my first question is how to zip the entire directory contents. second question is can we unzip the same file through windows environment. please help i need to complete it by EOD (3 Replies)
Discussion started by: bbc17484
3 Replies

2. Shell Programming and Scripting

tar command dont tar to original directory

HI, if I have a tarfile called pmapdata.tar that contains tar -tvf pmapdata.tar -rw-r--r-- 0/0 21 Oct 15 11:00 2009 /var/tmp/pmapdata/pmap4628.txt -rw-r--r-- 0/0 21 Oct 14 20:00 2009 /var/tmp/pmapdata/pmap23752.txt -rw-r--r-- 0/0 1625 Oct 13 20:00 2009... (1 Reply)
Discussion started by: borderblaster
1 Replies

3. UNIX for Dummies Questions & Answers

tar directory -C

I m new to unix and trying to use tar command with -C option - tar -cf /tmp/Test_shell/ZipTestFolder/archive10.tar -C /tmp/Test_shell/ZipTestFolder/ . It creates one more folder no_name inside the tar file. any suggestions how to remove it. I m using aix 5.3 (8 Replies)
Discussion started by: abhishek1.618
8 Replies

4. UNIX for Advanced & Expert Users

How to rsync or tar directory trees, with hidden directory, but without files?

I want to backup all the directory tress, including hidden directories, without copying any files. find . -type d gives the perfect list. When I tried tar, it won't work for me because it tars all the files. find . -type d | xargs tar -cvf a.tar So i tried rsync. On my own test box, the... (4 Replies)
Discussion started by: fld2007
4 Replies

5. AIX

Using restorevgfiles to restore entire directory from rootvg problems

I am trying to restore a specific directory and all sub-directories therein using a rootvg tape. I am using the following command to make the backup: mksysb -m -i -v /dev/rmt0 However, I am getting the following result: tctl status rmt0 Available 04-08-00-0,0 LVD SCSI 4mm Tape Drive... (10 Replies)
Discussion started by: herot
10 Replies

6. UNIX for Dummies Questions & Answers

Do I need to extract the entire tar file to confirm the tar folder is fine?

I would like to confirm my file.tar is been tar-ed correctly before I remove them. But I have very limited disc space to untar it. Can I just do the listing instead of actual extract it? Can I say confirm folder integrity if the listing is sucessful without problem? tar tvf file1.tar ... (1 Reply)
Discussion started by: vivien_chu
1 Replies

7. Shell Programming and Scripting

Looping through entire directory and count unique values

Hello, I`m a complete newbie to coding, please help with this problem. I have multiple files in a directory, I have to loop through the contents of each file and extract number of unique isoforms in that file. Each file is tab delimited and only the line with the first parent (column 3)... (1 Reply)
Discussion started by: ritakadm
1 Replies

8. UNIX for Dummies Questions & Answers

Append two lines of text to php.ini in the entire directory tree.e

I am looking to write a script that will read the php.ini files on my web host. If the two lines do exist do nothing. If not append two lines to the end of it then move on to the next directory and open the next php.ini file. I have the beginning of one that was given to me on another web site but... (6 Replies)
Discussion started by: Larrykh465
6 Replies

9. AIX

Making Tar of directory and tar file is going to be placed

Quick question, is it possible to make a Tar of completely directory and placing the tar file in it (will this cause even the tar file to tarred ?) sample: /opt/freeware/bin/tar -cvf - /oracle | gzip > /oracle/backup.tgz will the tar file backup.tgz also include backup.tgz ? i tried... (5 Replies)
Discussion started by: filosophizer
5 Replies

10. UNIX for Beginners Questions & Answers

How to find and get a file in an entire directory with an excluded directory specified?

How to get a file 'zlib.h' in an entire directory with an excluded directory specified lives under that starting directory by using find command, as it failed on: $ find . -name 'zlib.h' -a -ipath 'CHROME.TMP' -prune -o -print it'll just list entirely up (2 Replies)
Discussion started by: abdulbadii
2 Replies
tar.h(3HEAD)                                                          Headers                                                         tar.h(3HEAD)

NAME
tar.h, tar - extended tar definitions SYNOPSIS
#include <tar.h> DESCRIPTION
The <tar.h> header defines header block definitions as follows. Name Description Value TMAGIC "ustar" ustar plus null byte TMAGLEN 6 length of the above TVERSION "00" 00 without a null byte TVERSLEN 2 length of the above Typeflag field definitions: Name Description Value REGTYPE '0' regular file AREGTYPE '' regular file LNKTYPE '1' link SYMTYPE '2' symbolic link CHRTYPE '3' character special BLKTYPE '4' block special DIRTYPE '5' directory FIFOTYPE '6' FIFO special CONTTYPE '7' reserved Mode field bit definitions (octal): Name Description Value TSUID 04000 set UID on execution TSGID 02000 set GID on execution TSVTX 01000 on directories, restricted deletion flag TUREAD 00400 read by owner TUWRITE 00200 write by owner special TUEXEC 00100 execute/search by owner TGREAD 00040 read by group TGWRITE 00020 write by group TGEXEC 00010 execute/search by group TOREAD 00004 read by other TOWRITE 00002 write by other TOEXEC 00001 execute/search by other ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ SEE ALSO
pax(1), attributes(5), standards(5) SunOS 5.10 10 Sep 2004 tar.h(3HEAD)
All times are GMT -4. The time now is 03:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy