Unix/Linux Go Back    

HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

Hpux find tar gzip


find tar gzip

Thread Tools Search this Thread Display Modes
Old Unix and Linux 08-13-2016
Don Cragun's Unix or Linux Image
Don Cragun Don Cragun is offline Forum Staff  
Join Date: Jul 2012
Last Activity: 25 February 2017, 7:00 AM EST
Location: San Jose, CA, USA
Posts: 10,022
Thanks: 488
Thanked 3,463 Times in 2,951 Posts
Originally Posted by rezasadeghi View Post
i want to correct my command .

find * -type f -mtime -900 -print -exec tar cvs  name.tar {} \; && bzip2 *.tar

i am sure this will work
It might work, but it creates a compressed archive for each file being processed (and each of those archives has the same name) instead of creating one compressed archive containing all of the files being processed. (But I do not see an s modifier in the HP/UX tar man page.) And, it looks like the HP/UX version of tar wants -cv instead of just cv.) Furthermore it creates an uncompressed archive in the filesystem which the submitter of this thread wanted to avoid.

Last edited by Don Cragun; 08-13-2016 at 08:40 AM.. Reason: Add some notes based on the HP/UX tar man page.
The Following User Says Thank You to Don Cragun For This Useful Post:
rezasadeghi (08-15-2016)
Sponsored Links
Old Unix and Linux 08-14-2016
Peasant's Unix or Linux Image
Peasant Peasant is offline Forum Advisor  
Registered User
Join Date: Mar 2011
Last Activity: 25 February 2017, 1:00 PM EST
Posts: 1,026
Thanks: 28
Thanked 289 Times in 256 Posts
How about pax

find <your options and operands> | pax -w | gzip > /your/path/arhive.tar.gz

The Following User Says Thank You to Peasant For This Useful Post:
MadeInGermany (08-15-2016)
Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Need help ASAP - FIND - TAR - GZIP royinfo.alain UNIX for Beginners Questions & Answers 2 08-04-2016 05:46 PM
Failed to use find-tar-gzip together Chetanz UNIX for Dummies Questions & Answers 7 02-01-2013 05:23 PM
find + tar + gzip + uunecode/email --> in one command? kchinnam Shell Programming and Scripting 3 03-02-2012 03:25 PM
tar -cvf test.tar `find . -mtime -1 -type f` only tar 1 file ahSher UNIX for Dummies Questions & Answers 2 04-02-2009 05:43 AM
From HPUX tar to Linux tar iarot Filesystems, Disks and Memory 4 02-14-2002 04:10 AM

All times are GMT -4. The time now is 02:34 PM.