Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Create individual tgz files from a set of files Post 302190283 by amitg on Tuesday 29th of April 2008 09:00:46 AM
Old 04-29-2008
Thanks for the response. You're right, I just needed to gzip the files. I do want them individually though (for various reasons). The command that I eventually stumbled on and which works fine is :

for i in `ls -l`; do echo $i; bzip2 $i ; done
 

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
XDIFF_FILE_PATCH_BINARY(3)						 1						XDIFF_FILE_PATCH_BINARY(3)

xdiff_file_patch_binary - Alias of xdiff_file_bpatch

SYNOPSIS
bool xdiff_file_patch_binary (string $file, string $patch, string $dest) DESCRIPTION
Patches a $file with a binary $patch and stores the result in a file $dest. This function accepts patches created both via xdiff_file_bdiff(3) or xdiff_file_rabdiff(3) functions or their string counterparts. Starting with version 1.5.0 this function is an alias of xdiff_file_bpatch(3). PARAMETERS
o $file - The original file. o $patch - The binary patch file. o $dest - Path of the resulting file. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 xdiff_file_patch_binary(3) example The following code applies binary diff to a file. <?php $old_version = 'archive-1.0.tgz'; $patch = 'archive.bpatch'; $result = xdiff_file_patch_binary($old_version, $patch, 'archive-1.1.tgz'); if ($result) { echo "File patched"; } else { echo "File couldn't be patched"; } ?> NOTES
Note Both files ($file and $patch) will be loaded into memory so ensure that your memory_limit is set high enough. SEE ALSO
xdiff_string_patch_binary(3). PHP Documentation Group XDIFF_FILE_PATCH_BINARY(3)
All times are GMT -4. The time now is 05:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy