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   -   Original Discussion by royinfo.alain
Don Cragun's Unix or Linux Image
Don Cragun Don Cragun is offline Forum Staff  
Join Date: Jul 2012
Last Activity: 18 March 2018, 12:30 PM EDT
Location: San Jose, CA, USA
Posts: 11,143
Thanks: 622
Thanked 3,882 Times in 3,323 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 07: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   -   Original Discussion by royinfo.alain
Peasant's Unix or Linux Image
Peasant Peasant is offline Forum Advisor  
Registered User
Join Date: Mar 2011
Last Activity: 18 March 2018, 1:37 AM EDT
Posts: 1,141
Thanks: 32
Thanked 339 Times in 293 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 04:46 PM
Failed to use find-tar-gzip together Chetanz UNIX for Dummies Questions & Answers 7 02-01-2013 04:23 PM
find + tar + gzip + uunecode/email --> in one command? kchinnam Shell Programming and Scripting 3 03-02-2012 02: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 04:43 AM
From HPUX tar to Linux tar iarot Filesystems, Disks and Memory 4 02-14-2002 03:10 AM

All times are GMT -4. The time now is 03:31 PM.