Sponsored Content
Top Forums Shell Programming and Scripting Extracting from archive | compressing to new archive Post 302381751 by pludi on Sunday 20th of December 2009 10:15:33 AM
Old 12-20-2009
The problem is that tar can't archive files from stdin, only when they're given as arguments on the command line. I'm afraid you won't get around extracting the 2 files, and then tar'ing them again.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Q: tar archive help

hey how do you create a archive and add file to an existing archive. i keep getting an error: dir/#: No such file or directory currently using tar -cvfu name.tar files files searching from a word document each line having different file extention. Thanks in advance (1 Reply)
Discussion started by: nookie
1 Replies

2. UNIX for Dummies Questions & Answers

Extracting from a tar archive file

Can I extract files from an archive file (tar), where the filename includes the full directory path, to a different directory? For example the archive files may have a filename of /SrcFiles/XXX/filename.dat and I want to extract it to /SrcFiles/YYY/filename.dat. Since the archive file was... (1 Reply)
Discussion started by: nmalencia
1 Replies

3. UNIX for Advanced & Expert Users

overhead in the archive

Hi everyone, I am currently trying to work out the size overhead in the library archive. The total size of all my objects file is about 100KB. However, when I package them into the archive (libXX.a), the size gets boosted up to 200KB. I want to know what exact is that 100KB overhead. I tried... (1 Reply)
Discussion started by: jasoncrab
1 Replies

4. Shell Programming and Scripting

RCS archive in /etc

Well it is not a bad idea. I have worked for one place that did that. It wasn't my idea but I did not object. The reason it is done is to put critical files like nsswitch.conf, hosts, and so on under RCS control. Previous versions are then available to see how stuff changed over the years. ... (0 Replies)
Discussion started by: Perderabo
0 Replies

5. Shell Programming and Scripting

Read specific file from a zip archive without extracting

Hi All, I would like to extract specific file from a zip archive. I have a zip archive "sample.zip". sample.zip contains few text files and images... text1.txt, text2.txt, pic.jpg etc... I need to read specific file "text2.txt" from "sample.zip" WITHOUT EXTRACTING the zip file. ... (4 Replies)
Discussion started by: sridharg
4 Replies

6. Shell Programming and Scripting

Archive Files

I have 15-20 files in a unix folder on daily basis, so i need to archive those 20 files as dated today and place that archived files in a new folder and has to remove those 20 files from that folder. so that i place 20 new files that comes for tomorrow. i need write a unix script to do this. ... (1 Reply)
Discussion started by: gaddamshashank
1 Replies

7. Homework & Coursework Questions

Creating and extracting archive file

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Hi there, I wish to create a single .tar file of the current directory but have literally no idea on where to... (8 Replies)
Discussion started by: Banned
8 Replies

8. UNIX for Advanced & Expert Users

Self extracting archive for Linux and windows

Is there a way to create a self extracting archive that works in both linux and windows? And if so how? Everything I have read on google only works in either Linux or Windows but not both. (6 Replies)
Discussion started by: cokedude
6 Replies

9. UNIX for Dummies Questions & Answers

Cpio archive help

Hi I'm new to the forum and looking for some help with cpio archive creation. I have a bunch of directories that I need to make into a cpio archive. The problem I'm having is that when I input the commands I get the cpio archive but it creates a duplicate of the archive inside the archive... (4 Replies)
Discussion started by: reeves1985
4 Replies

10. Shell Programming and Scripting

Script to archive logs and sftp to another archive server

Requirement: Under fuse application we have placeholders called containers; Every container has their logs under: <container1>/data/log/fuse.log <container1>/data/log/fuse.log.1 <container1>/data/log/fuse.log.XX <container2>/data/log/fuse.log... (6 Replies)
Discussion started by: Arjun Goswami
6 Replies
BF_TAR(1)						    Bogofilter Reference Manual 						 BF_TAR(1)

NAME
bf_tar - shell script to write a tar file of a bogofilter directory to stdout SYNOPSIS
bf_tar [-r] [-R] bogofilter_directory DESCRIPTION
bf_tar bundles a bogofilter working directory in tar format and copies it to standard output (your console, or where you redirect it, see EXAMPLES below). OPTIONS
The -r option causes bf_tar to remove inactive log files after the archive has been written successfully. The default is to leave log files. The -R option causes bf_tar to remove inactive log files before the archive is written. This may reduce chances that the resulting archive is recoverable should it become damaged. The archive may be smaller though. The default is to leave log files. EXIT STATUS
The script exits with status code 0 if everything went well, and nonzero if it encountered trouble. EXAMPLES
o bf_tar ~/.bogofilter > outfile.tar Writes a standard .tar file containing the essential files from ~/.bogofilter to outfile.tar. o bf_tar ~/.bogofilter | gzip -9 -c > outfile.tar.gz Writes a gzipped .tar.gz file containing the essential files from ~/.bogofilter to outfile.tar.gz. o bf_tar `pwd`/mydirectory > outfile.tar Prepend $(pwd)/ or `pwd`/ if you want to specify an absolute path instead of a relative path. NOTES
This script is meant for use with Berkeley DB based bogofilter versions. This script requires a SUSv2 compliant pax utility. This script expects a SUSv2 compliant shell. Solaris systems should have the SUNWxcu4 package installed (when bogofilter is configured) so that /usr/xpg4/bin/sh can be used. AUTHORS
Matthias Andree Bogofilter 10/22/2012 BF_TAR(1)
All times are GMT -4. The time now is 12:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy