tar cvf - ./mydir | bzip2 - >> mydir.tar.bz2


 
Thread Tools Search this Thread
Operating Systems Solaris Solaris BigAdmin RSS tar cvf - ./mydir | bzip2 - >> mydir.tar.bz2
# 1  
Old 10-26-2009
tar cvf - ./mydir | bzip2 - >> mydir.tar.bz2

To create a tar archive and bzip it in a single command, use the following command: $ tar cvf - ./mydir | bzip2 - >> mydir.tar.bz2

More...
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

Download firefox-19.0.2.tar.bz2

Does anyone know a reliable source to download firefox-19.0.2.tar.bz2 from? I would think you be able to download from firefox or mozilla somewhere. I haven't gotten anything useful from my google searches. (2 Replies)
Discussion started by: cokedude
2 Replies

2. Shell Programming and Scripting

Put one tar.bz2 file to another tar.bz2

Hi experts, I have two tar.bz2 file,: a.tar.bz2 and b.tar.bz2 I want to put a.tar.bz2 in to b.tar.bz2 eg: b.tar.bz2 only have one file named "b.c" contained I want it contain "b.c and a.tar.bz2" I don't want to decompress the b.tar.bz2 to achieve this, I try with "cat a.tar.bz2 >>... (1 Reply)
Discussion started by: yanglei_fage
1 Replies

3. Shell Programming and Scripting

Bus error while using command tar -cvf

Hi, I am working on a mac OSX machine. I am getting bus error :confused: when i use the command tar -cvf file1.tar file1 What could be the reason for this?? (1 Reply)
Discussion started by: shweeths
1 Replies

4. UNIX for Dummies Questions & Answers

tar -cvf test.tar `find . -mtime -1 -type f` only tar 1 file

Hi all, 4 files are returned when i issue 'find . -mtime -1 -type f -ls'. ./ora_475244.aud ./ora_671958.aud ./ora_934052.aud ./ora_934050.aud However, when I issued the below command: tar -cvf test.tar `find . -mtime -1 -type f`, the tar file only contains the 1st file -... (2 Replies)
Discussion started by: ahSher
2 Replies

5. UNIX for Dummies Questions & Answers

shortcut for tar cvf - [filename] | gzip > [filename].tar.gz

i'd like to have an alias (or something similar) where i can type a command like "archive" and a filename and have it tar and gzip the file, so... $ archive filename results in filename.tar.gz...do i have to write a script to do this? (4 Replies)
Discussion started by: bcamp1973
4 Replies

6. Shell Programming and Scripting

compare two tar.bz2

Hello, I am using a bash script to archive directories of text files located in ${root}: tar cf ${root}.tar ${root}* bzip2 ${root}.tar I'd like to compare the newly produced archive two.tar.bz2 with the second latest one.tar.bz2. cmp one.tar.bz2 two.tar.bz2 returns one.tar.bz2 two.tar.bz2... (2 Replies)
Discussion started by: JCR
2 Replies

7. UNIX for Advanced & Expert Users

extracting from tar.bz2

hi could any body tell me how to extract .tar.bz2 files i tried using tar but in vain. i found bzip2 in googling but i could not find it on machine unix tru64 please suggest. (1 Reply)
Discussion started by: Raom
1 Replies

8. UNIX for Dummies Questions & Answers

using Tar -cvf file.tar "Need Help"

Ok, I use the command tar -cvf ~kw4691/output/test.tar ~kw4691/input on one UNIX server, lets call it sneezy. I FTP the tared file over to another server, lets call it bashful. Use the tar -xvf test.tar command and get the error ~kw4691/input "could not create the directory" /hom/dev/sy40... (7 Replies)
Discussion started by: wev
7 Replies

9. UNIX for Advanced & Expert Users

using TAR -cvf test.tar "HELP"

Ok, I use the command tar -cvf /home/output/test.tar /home/input on one UNIX server, lets call it sneezy. I FTP the tared file over to another server, lets call it bashful. Use the tar -xvf test.tar command and get a error indicating that it is looking for the same directory as where the... (3 Replies)
Discussion started by: wev
3 Replies
Login or Register to Ask a Question
MKAF(1) 						      General Commands Manual							   MKAF(1)

NAME
mkaf - create a Performance Co-Pilot archive folio SYNOPSIS
$PCP_BINADM_DIR/mkaf [findopts] filename ... DESCRIPTION
A collection of one or more Performance Co-Pilot (see PCPIntro(1)) archive logs may be combined with mkaf to produce a PCP archive folio and the associated archive folio control file. Some PCP tools use mkaf to create archive folios, e.g. the ``record'' facility in the pmchart(1) and pmview(1) tools, to facilitate playback with pmafm(1). mkaf processes each filename argument, and if this is a component file from a PCP archive that archive is added to the folio. If filename is a directory, then this is searched recursively using find(1). Any filename argument beginning with a ``-'' is assumed to be a find(1) command line option (findopts); the default is -follow if no findopts are specified. The first named archive in the folio is assumed to be associated with the default host for any tool that tries to replay multiple archives from the folio. The folio control file is written to standard output, and has the following format. 1. The first line contains the word PCPFolio. 2. The second line contains the tag Version: followed by the format version number (currently 1). 3. For subsequent lines, blank lines and lines beginning with ``#'' are ignored. 4. The line beginning with the tag Created: documents where and when the folio was created. 5. The line beginning with the tag Creator: identifies the tool which created the folio (and is assumed to know how to replay the archive folio). If present, the second argument is the name of a configuration file that the creator tool could use to replay the archive folio, e.g. with the replay command for pmafm(1). In the case of mkaf (unlike pmchart(1) or pmview(1)) there is no knowledge of the contents of the archives, so the ``creator'' cannot replay the archive, however pmchart(1) is able to replay any archive, and so this tool is identified as the Creator: for archive folios created by mkaf(1). 6. This is then followed by one or more lines beginning with the tag Archive: followed by the hostname and base name of the archive. For example $ mkaf mydir/gonzo might produce the following folio control file. PCPFolio Version: 1 # use pmafm(1) to process this PCP archive folio # Created: on gonzo at Tue Jul 2 03:35:54 EST 1996 Creator: pmchart # Host Basename # Archive: gonzo mydir/gonzo/960627 Archive: gonzo mydir/gonzo/960628 Archive: gonzo mydir/gonzo/960629 Archive: gonzo mydir/gonzo/960630 Archive: gonzo mydir/gonzo/960701 Archive: gonzo mydir/gonzo/960701.00.10 Archive: gonzo mydir/gonzo/960701.05.25 Archive: gonzo mydir/gonzo/960702.00.10 PCP ENVIRONMENT
Environment variables with the prefix PCP_ are used to parameterize the file and directory names used by PCP. On each installation, the file /etc/pcp.conf contains the local values for these variables. The $PCP_CONF variable may be used to specify an alternative configura- tion file, as described in pcp.conf(5). SEE ALSO
find(1), PCPIntro(1), pmafm(1), pmchart(1), pmview(1), pcp.conf(5) and pcp.env(5). DIAGNOSTICS
Some informational messages, warnings and pathological conditions are reported on standard error. Performance Co-Pilot PCP MKAF(1)