Sponsored Content
Operating Systems HP-UX Exclude socket files from PAX backup Post 303018449 by jim mcnamara on Wednesday 6th of June 2018 12:47:54 PM
Old 06-06-2018
I'm out of ideas. You can specify a list of filenames to add to the archive from a directory tree -- using find, but I've never tried it.

Code:
find /path ! -type s

Note: AFAIK this works only in cpio mode, which already allows you to specify file types to include anyway. Try cpio mode.

This is why I specifically mentioned tar. It has an exclude option that is an exclude file, which lists actual file names to exclude - you populate it with the find command I gave above.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to exclude file in tar backup?

I am taking a backup of area with the following command:- tar -cf -./* |/usr/contrin/bin/gzip >xxx.tar.gz. The area contains following files :- xxxx yyyy zzzzz asdaD DASdD WQWEE I want to backup all the files except yyyy from the following area. I checked manual page of tar but I... (2 Replies)
Discussion started by: kamlesh_p
2 Replies

2. UNIX for Advanced & Expert Users

du (exclude files)

Hi, I want to get the disk usage of a directory. But I want it to ignore a particular directory within it. Lets say I want disk usage of all files/dirs within dir1 except those that are named .snapshot Does du have the option of excluding a particular directory. (1 Reply)
Discussion started by: the_learner
1 Replies

3. UNIX for Dummies Questions & Answers

list the files but exclude the files in subdirectories

If I execute the command "ls -l /export/home/abcde/dev/proj/code/* | awk -F' ' '{print $9}' | cut -d'/' -f6-8" it will list all the files in /export/home/abcde/dev/proj/code/ directory as well as the files in subdirectories also proj/code/test.sh proj/code/test1.c proj/code/unix... (8 Replies)
Discussion started by: shyjuezy
8 Replies

4. AIX

exclude files not working

HI, I have upgraded nim master and client to TL8,SP6. Now when the mksysb backup ran from master,it is not excluding directories specified in /etc/exclude.rootvg in the client.Instead,mksysb is getting created for all the file systems in the rootvg. This problem only appeared after the TL... (3 Replies)
Discussion started by: to_bsr
3 Replies

5. AIX

Backup with Pax command. How to verify tape?

Dear all experts online, In my environment of AIX 5300-07, I am currently using "pax" command to backup all filesystems that I need to backup and it will take me around 4 hours time with LTO3 tape drive. When I need to verify the tape after backup, I am using "pax" command to list all files in... (2 Replies)
Discussion started by: kwliew999
2 Replies

6. AIX

Can a pax backup in AIX be restored into Linux?

Dear all experts, I would like to know if a pax command backup of AIX files can be restored into Linux environment run in Wintel server? Currently I have a Full database backup using "pax" command in AIX box(IBM pSeries), the new management decison of the new server is on Wintel server which is... (5 Replies)
Discussion started by: kwliew999
5 Replies

7. Ubuntu

[Solved] Using Find with an exclude/exclude file

I am familiar with using tar and exclude/include files: tar zcf backup.dirs.tgz --files-from=include.mydirs --exclude-from=exclude.mydirs --no-recursion but was wondering if I could use find in the same way. I know that you can just specify the directories to exclude but my list is... (2 Replies)
Discussion started by: metallica1973
2 Replies

8. Shell Programming and Scripting

Need to exclude .NFSxxx files in clear old files batch script

I am new to Shell Scripting and need some help. The following batch job has been failing for me due to the .nfsxxx files in use. I need to know how to modify the following script to exclude the .nfsxxx files so this batch job will not fail on me. I have done lots of googling and keep coming back... (2 Replies)
Discussion started by: kimberlyg2007
2 Replies

9. AIX

How to exclude directory from (File Systems) backup?

Hello AIX experts, I have a file system called /bossapp Its size = 77.5 GB I want to take a File Systems backup for this one using smitty, it is very easy, but the problem is I want to exclude one directory called (ORIGIN). How? The steps are very easy to take a File Systems backup,... (2 Replies)
Discussion started by: Mohannad
2 Replies

10. Shell Programming and Scripting

Exclude files in ls

Hi, I need to exlucde the files which are present in exclude.txt from a directory exlcude.txt AUZ.txt AUZ.chk NZ.txt NZ.chk tried with below code but not working ls -ltr | grep -v `cat exclude.lst` (9 Replies)
Discussion started by: rohit_shinez
9 Replies
CPIO(1) 						    BSD General Commands Manual 						   CPIO(1)

NAME
cpio -- copy file archives in and out SYNOPSIS
cpio -o [-aABcLvzZ] [-C bytes] [-F archive] [-H format] [-O archive] < name-list [> archive] cpio -i [-bBcdfmrsStuvzZ6] [-C bytes] [-E file] [-F archive] [-H format] [-I archive] [pattern ...] [< archive] cpio -p [-adlLmuv] destination-directory < name-list DESCRIPTION
The cpio command copies files to and from a cpio archive. The options are as follows: -o Create an archive. Reads the list of files to store in the archive from standard input, and writes the archive on standard output. -a Reset the access times on files that have been copied to the archive. -A Append to the specified archive. -B Set block size of output to 5120 bytes. -c Use ASCII format for cpio header for portability. -C bytes Set the block size of output to bytes. -F archive -O archive Use the specified file name as the archive to write to. -H format Write the archive in the specified format. Recognized formats are: bcpio Old binary cpio format. cpio Old octal character cpio format. sv4cpio SVR4 hex cpio format. tar Old tar format. ustar POSIX ustar format. -L Follow symbolic links. -v Be verbose about operations. List filenames as they are written to the archive. -z Compress archive using gzip(1) format. -Z Compress archive using compress(1) format. -i Restore files from an archive. Reads the archive file from standard input and extracts files matching the patterns that were speci- fied on the command line. -b Do byte and word swapping after reading in data from the archive, for restoring archives created on systems with a different byte order. -B Set the block size of the archive being read to 5120 bytes. -c Expect the archive headers to be in ASCII format. -C bytes Read archive written with a block size of bytes. -d Create any intermediate directories as needed during restore. -E file Read list of file name patterns to extract or list from file. -f Restore all files except those matching the patterns given on the command line. -F archive, -I archive Use the specified file as the input for the archive. -H format Read an archive of the specified format. Recognized formats are: bcpio Old binary cpio format. cpio Old octal character cpio format. sv4cpio SVR4 hex cpio format. tar Old tar format. ustar POSIX ustar format. -m Restore modification times on files. -r Rename restored files interactively. -s Swap bytes after reading data from the archive. -S Swap words after reading data from the archive. -t Only list the contents of the archive, no files or directories will be created. -u Overwrite files even when the file in the archive is older than the one that will be overwritten. -v Be verbose about operations. List filenames as they are copied in from the archive. -z Uncompress archive using gzip(1) format. -Z Uncompress archive using compress(1) format. -6 Process old-style cpio format archives. -p Copy files from one location to another in a single pass. The list of files to copy are read from standard input and written out to a directory relative to the specified directory argument. -a Reset the access times on files that have been copied. -d Create any intermediate directories as needed to write the files at the new location. -l When possible, link files rather than creating an extra copy. -L Follow symbolic links. -m Restore modification times on files. -u Overwrite files even when the original file being copied is older than the one that will be overwritten. -v Be verbose about operations. List filenames as they are copied. ENVIRONMENT
TMPDIR Path in which to store temporary files. DIAGNOSTICS
The cpio utility will exit with one of the following values: 0 All files were processed successfully. 1 An error occurred. Whenever cpio cannot create a file or a link when extracting an archive or cannot find a file while writing an archive, or cannot preserve the user ID, group ID, file mode, or access and modification times when the -p option is specified, a diagnostic message is written to stan- dard error and a non-zero exit value will be returned, but processing will continue. In the case where cpio cannot create a link to a file, cpio will not create a second copy of the file. If the extraction of a file from an archive is prematurely terminated by a signal or error, cpio may have only partially extracted the file the user wanted. Additionally, the file modes of extracted files and directories may have incorrect file bits, and the modification and access times may be wrong. If the creation of an archive is prematurely terminated by a signal or error, cpio may have only partially created the archive which may vio- late the specific archive format specification. SEE ALSO
pax(1), tar(1) AUTHORS
Keith Muller at the University of California, San Diego. BUGS
The -s and -S options are currently not implemented. BSD
February 16, 1997 BSD
All times are GMT -4. The time now is 03:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy