Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Create individual tgz files from a set of files Post 302190262 by vbe on Tuesday 29th of April 2008 07:54:42 AM
Old 04-29-2008
The point is that it seems useless to archive a file in an archive individually, if its just to save space then just gzip the lot ... you wont have a file and its archived gzipped alter ego then, but just compressed files...
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

unzip .tgz files

hi all How to unzip .tgz files waiting for suggestions Praful (5 Replies)
Discussion started by: Prafulla
5 Replies

2. UNIX for Dummies Questions & Answers

Extract .tgz files that only contain a pattern

Let's say I've got File.tgz that contains:- Apple.txt Banana.txt Carrot.txt AppleBanana.txt Now, I would like to only extract files that contain the patter "Apple". I've tried this tar -xvf File.tgz 'tar -tf File.tgz | grep 'Apple'' but it does not work. Please help. Thanks. (12 Replies)
Discussion started by: percivalwcy
12 Replies

3. Shell Programming and Scripting

Apply 'awk' to all files in a directory or individual files from a command line

Hi All, I am using the awk command to replace ',' by '\t' (tabs) in a csv file. I would like to apply this to all .csv files in a directory and create .txt files with the tabs. How would I do this in a script? I have the following script called "csvtabs": awk 'BEGIN { FS... (4 Replies)
Discussion started by: ScKaSx
4 Replies

4. Shell Programming and Scripting

How to move files to existing .tgz file?

Hi, I have already created the tar files. which consist of some log files and Audit.csv plz see the below code for that ================================================ tar -Pczf ARCH/${arc_date}.tgz $LOG/*.log $REYE/CEP/FiAdapter/Audit.${arc_date}.csv ... (3 Replies)
Discussion started by: pspriyanka
3 Replies

5. Shell Programming and Scripting

Unpack individual files from tarball

Say you don't want to unpack the whole thing, just individual files or directories within a .tgz. How to do this? (1 Reply)
Discussion started by: stevensw
1 Replies

6. Shell Programming and Scripting

Finding compound words from a set of files from another set of files

Hi All, I am completely stuck here. I have a set of files (with names A.txt, B.txt until L.txt) which contain words like these: computer random access memory computer networking mouse terminal windows All the files from A.txt to L.txt have the same format i.e. complete words in... (2 Replies)
Discussion started by: shoaibjameel123
2 Replies

7. Shell Programming and Scripting

Executing a batch of files within a shell script with option to refire the individual files in batch

Hello everyone. I am new to shell scripting and i am required to create a shell script, the purpose of which i will explain below. I am on a solaris server btw. Before delving into the requirements, i will give youse an overview of what is currently in place and its purpose. ... (2 Replies)
Discussion started by: goddevil
2 Replies

8. Solaris

Auditing Individual Files

I have some Solaris 9 systems and I'm interested in using the "fm" audit class to track changes to sensitive files but it's too verbose for it to be auditing to that level for EVERY file, so I was wondering if there were a way of restricting the audit of those events to particular files. I... (0 Replies)
Discussion started by: thmnetwork
0 Replies

9. Shell Programming and Scripting

Extracting specific files from multiple .tgz files

Hey, I have number of .tgz files and want to extract the file with the ending *results.txt from each one. I have tried for file in *.tgz; do tar --wildcards -zxf $file *results.txt; doneas well as list=$(ls *.tgz) for i in $list; do tar --wildcards -zxvf $i *.results.txt; done... (1 Reply)
Discussion started by: jfern
1 Replies

10. UNIX for Dummies Questions & Answers

Create a tgz from source FreeBSD

Hello, i'm having a problem here with FreeBSD 9.2 . I've created a directory and downloaded the latest ntp-4.2.8p1-beta2 from ntp.org. Untar then into the directory and then ./configure all went OK. Then i had to modify some parameters in the config.h created with ./configure . Then make... (2 Replies)
Discussion started by: Board27
2 Replies
XAR(1)								   User Commands							    XAR(1)

NAME
xar - eXtensible ARchiver SYNOPSIS
xar -[ctx][v] ... DESCRIPTION
The XAR project aims to provide an easily extensible archive format. Important design decisions include an easily extensible XML table of contents (TOC) for random access to archived files, storing the TOC at the beginning of the archive to allow for efficient handling of streamed archives, the ability to handle files of arbitrarily large sizes, the ability to choose independent encodings for individual files in the archive, the ability to store checksums for individual files in both compressed and uncompressed form, and the ability to query the table of content's rich meta-data. FUNCTIONS
One of the following options must be used: -c Creates an archive -t Lists the contents of an archive -x Extracts an archive NOTE: all of the above require the use of the -f option (filename) as this release of xar doesn't correctly handle pipes or sockets. -f The filename to use for creation, listing or extraction. With extraction, this can be a POSIX regular expression. OPTIONS
--compression Specifies the compression type to use. Valid values: none, gzip, bzip2, lzma. Default value: gzip -C <path> On extract, xar will chdir to the specified path before extracting the archive. -a Synonym for --compression=lzma -j Synonym for --compression=bzip2 -z Synonym for --compression=gzip --compression-args=<arguments> Specifies arguments to the compression engine selected. gzip, bzip2, and lzma all take a single integer argument between 0 and 9 specifying the compression level to use. --dump-toc=<filename> Has xar dump the xml header into the specified file. "-" can be specified to mean stdout. --dump-header Has xar print out the xar binary header information to stdout. --extract-subdoc=<name> Extracts the specified subdocument to a document in cwd named <name>.xml --list-subdocs List the subdocuments in the xml header --toc-cksum Specifies the hashing algorithm to use for xml header verification. Valid values: none, sha1, and md5. Default value: sha1 -l On archival, stay on the local device. -P On extract, set ownership based on uid/gid. If the uid/gid can be set on the extracted file, setuid/setgid bits will also be pre- served. -p On extract, set ownership based on symbolic names, if possible. If the uid/gid can be set on the extracted file, setuid/setgid bits will also be preserved. -s <filename> On extract, specifies the file to extract subdocuments to. On archival, specifies an xml file to add as a subdocument. -v Verbose output --exclude Specifies a POSIX regular expression of files to exclude from adding to the archive during creation or from being extracted during extraction. This option can be specified multiple times. --rsize Specifies a size (in bytes) for the internal libxar read buffer while performing I/O. --coalesce-heap When multiple files in the archive are identical, only store one copy of the data in the heap. This creates smaller archives, but the archives created are not streamable. --link-same When the data section of multiple files are identical, hardlink them within the archive. --no-compress Specifies a POSIX regular expression of files to archive, but not compress. The archived files will be copied raw into the archive. This can be used to exclude already gzipped files from being gzipped during the archival process. --prop-include Specifies a file property to be included in the archive. When this option is specified, only the specified options will be included. Anything not specifically included with this option will be omitted. This option can be used multiple times. --prop-exclude Specifies a file property to be excluded from the archive. When this option is specified, all file properties will be included except the specified properties. This option can be used multiple times. --distribution Creates an archive to only contain file properties safe for file distribution. Currently, only name, type, mode, and data are pre- served with this option. --keep-existing Does not overwrite existing files during extraction. Keeps any previously existing files while extracting. -k Synonym for --keep-existing. --keep-setuid When extracting without -p or -P options, xar will extract files as the uid/gid of the extracting process. In this situation, xar will strip setuid/setgid bits from the extracted files for security reasons. --keep-setuid will preserve the setuid/setgid bits even though the uid/gid of the extracted file is not the same as the archived file. EXAMPLES
xar -cf sample.xar /home/uid Create a xar archive of all files in /home/uid xar -tf sample.xar List the contents of the xar archive sample.xar xar -xf sample.xar Extract the contents of sample.xar to the current working directory BUGS
Doesn't currently work with pipes or streams. Might be fixed in a future release. Probably one or two more somewhere in there. If you find one please report it to http://code.google.com/p/xar/ AUTHORS
Rob Braun <bbraun AT synack DOT net> Landon Fuller <landonf AT bikemonkey DOT org> David Leimbach Kevin Van Vechten version 1.6 November 1, 2007 XAR(1)
All times are GMT -4. The time now is 09:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy