Sponsored Content
Full Discussion: GNUTAR exclude directories
Top Forums UNIX for Advanced & Expert Users GNUTAR exclude directories Post 35647 by TheBlueLady on Thursday 24th of April 2003 04:49:45 AM
Old 04-24-2003
I tried it, but it didn't work for me.

Now I've got a way that seemed to work.
It is:

tar -cvf /tmp/datadir.tar --exclude=temp* /appl/data

This seems to work, but it now also excludes the files temp.txt that are in /appl and that is not right.
So if anyone can help me a bit further would be nice.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

find command to exclude directories

Howdy I have this directory structure ... eep eepaptest eepfatest eepgltest eep.old eeppoptest ehf ehfaptest ehfgltest ehp ehpgltest I want to find files in these directories, but I want to exclude eep, ehf & ehp. Cany anyone help with the correct command ?? (1 Reply)
Discussion started by: SmurfGGM
1 Replies

2. Shell Programming and Scripting

Find but exclude directories

Hello, I have a line in my script to find the files changed in the last 24 hours. It is as below: find /home/hary -type f -mtime -1 I now want to exclude a directory named "/home/hary/temp/cache" from the above find command. How do I add it to my script? Any help is appreciated. ... (9 Replies)
Discussion started by: tadi18
9 Replies

3. UNIX for Dummies Questions & Answers

How to Exclude multiple directories from find command?

Hi, Can some one help me how to exclude multiple directories using find command.. I have the directory structure below. /a/a1/b1 /a/c1/c2 /a/d1/d2/d3 I want to exlcude a1,c2and d3 from the above using find,can some one suggest pls.. thanks in advance... Use code tags... (1 Reply)
Discussion started by: jagadish_gaddam
1 Replies

4. Shell Programming and Scripting

Help - Find command to exclude sub-directories

Hi Forum. I'm trying to write a script that finds and deletes files that are older than 300 days. The script will read a table that contains the following 3 columns: 1st col: “Y” means sub-directory scan; "N" means no subdirectory scan 2nd col: sub-directory location 3rd col: File prefix... (7 Replies)
Discussion started by: pchang
7 Replies

5. Shell Programming and Scripting

How to exclude the empty directories

Hi., I have a script, in which I am processing a files present in the directory types. ls -lrt | grep ^d | grep Dir_type | awk -f '{print $9}' |\ while read dir_name; do #operations done where Dir_type is the pattern in which directories get created. How to filter out empty... (2 Replies)
Discussion started by: IND123
2 Replies

6. Shell Programming and Scripting

Perl exclude directories in command line

Hi, I use find command to list all the files in a directory and its sub-directories, but the problem is to exclude certain directories during search. Can i give the directory names in command line to skip them and search rest of the directories? For example i have directories: test ../test1... (1 Reply)
Discussion started by: nmattam
1 Replies

7. Shell Programming and Scripting

Global Pattern - exclude directories

All, I am trying delete folder by adding pattern not to delete certain folders. But i struck with error. When i use below command from command line, it works fine. shopt -s extglob rm -rf !(test1|test2|test3) But when i use the same in shell script, i get the below error. syntax... (6 Replies)
Discussion started by: vino_hymi
6 Replies

8. AIX

Exclude Directories in my tar command

Hi, im having some issues after i execute the next command: tar -cvf /varios/restore/test.tar -X /jfma/test1/excludefile /jfma | gzip -c > /varios/restore/test.tar.gz this creates the desired "test.tar.gz" file, but whe i try to open it it says "tar: 0511-164 There is a media read or write... (6 Replies)
Discussion started by: blacksteel1988
6 Replies

9. Shell Programming and Scripting

Exclude directories in FIND command

Can you please help tweak the below command to exclude all directories with the name "logs" and "tmp" find . -type f \( ! -name "*.tar*" ! -name "*.bkp*" \) -exec /usr/xpg4/bin/grep -i "user_1" /dev/null {} + >result.out bash-3.2$ uname -a SunOS mymac 5.10 Generic_150400-26 sun4v sparc sun4v... (9 Replies)
Discussion started by: mohtashims
9 Replies
AMSAMBA(8)						  System Administration Commands						AMSAMBA(8)

NAME
amsamba - Amanda Application to interface with smbclient DESCRIPTION
Amsamba is an Amanda Application API script. It should not be run by users directly. It uses smbclient to backup and restore data. The diskdevice in the disklist (DLE) must have the form '//CIFSHOST/SHARE/SUBDIR' where CIFSHOST is the CIFS host containing the data to be backed up, SHARE is the share to connect, and subdir is the subdirectory to backup. '/subdir' can be ommited, in which case the complete share is archived. Unlike most applications, amsamba backs up and restores data located on a different system from that where amsamba itself runs. The host containing the data is the CIFS host. In practice, amsamba is usually run on the same system as the Amanda server, with a DLE like localhost "//CIFSHOST/SHARENAME" amsamba-dumptype Include or exclude can be used, but not both. The path for 'exclude list' or 'include list' must be absolute path on the CIFS host. The estimate calculates the complete size of the share, without regard for include or exclude directives. It will be larger than the actual dump if you use include or exclude. Using 'estimate server' in the dumptype could give better estimate. PROPERTIES
This section lists the properties that control amsamba's functionality. See amanda-applications(7) for information on application properties and how they are configured. SMBCLIENT-PATH The path to the smbclient binary. The default is set when Amanda is built by the --with-smbclient configure option. GNUTAR-PATH The path to the gnutar binary. The default is set when Amanda is built by the --with-gnutar configure option. gnutar is used to create the index. AMANDAPASS Location of the amandapass file, defaulting to "$CONFIG_DIR/amandapass". Relative pathnames are relative to the configuration directory, "$CONFIG_DIR/<config>". Note that this file is located on the client, not on the server. The format of the file is as follow: Sharename User%Password Domain Sharename is '//HOST/SHARE' without the SUBDIR. Sharename can be quoted, it can be '*' to match all share, it can be '//pc-host/*' to match all share on pc-host. User is the username use to connect to the share. Password is the password use to connect to the share. '%Password' is optional if the user can connect to the share without password. 'User%Password' is optional, the user 'guest' without password is use to connect to the share. Domain is optional. Example: //another-pc/share otheruser%otherpw domain //another-pc/share otheruser%otherpw //another-pc/share myuser mydomain //another-pc/share myuser //another-pc/share ALLOW-ANONYMOUS This username without password is used to connect to the share if no matching entry is found in the amandapass file. DIRECTORY For restore command only, the data is recoved in that directory. Must be a unix path for "tar" RECOVER-MODE or a smb path for "smb" recover-MODE. RECOVER-MODE "tar" or "smb", default to "tar". If "tar", the data is recovered on the local machine, If "smb", the data is recovered on the smb client machine. INCLUDE AND EXCLUDE LISTS
This application supplies exclude lists via the smbclient -TX option. Normal shell-style wildcard expressions, using * and ?, are not supported. All expressions are matched only from the base directory of the DLE. Expressions that match a directory may have a leading or trailing "/". Example expressions: ./temp-files # exclude top-level dir "temp-files" entirely ./temp-files/ # same /temp-files # same temp-files # same ./temp-files/* # BAD: does nothing *.iso # BAD: does nothing proxy/local/cache # exclude "cache" in dir "proxy/local" Include lists are supported only if excludes are not given. They are handled via the smbclient -TI option. Include matching is identical to the exclude matching described above. EXAMPLE
define application app_amsamba { property "SMBCLIENT-PATH" "/usr/bin/smbclient" property "GNUTAR-PATH" "/bin/tar" property "AMANDAPASS" /etc/amandapass" property "ALLOW-ANONYMOUS" "guest" } SEE ALSO
amanda(8), amanda.conf(5), amanda-applications(7) The Amanda Wiki: : http://wiki.zmanda.com/ AUTHOR
Jean-Louis Martineau <martineau@zmanda.com> Zmanda, Inc. (http://www.zmanda.com) Amanda 3.3.1 02/21/2012 AMSAMBA(8)
All times are GMT -4. The time now is 06:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy