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

HP-UX


Tags
find tar gzip

Closed    
 
Thread Tools Search this Thread Display Modes
    #22  
Old Unix and Linux 08-13-2016
Don Cragun's Unix or Linux Image
Don Cragun Don Cragun is offline Forum Staff  
Administrator
 
Join Date: Jul 2012
Last Activity: 22 September 2017, 3:03 PM EDT
Location: San Jose, CA, USA
Posts: 10,508
Thanks: 542
Thanked 3,675 Times in 3,135 Posts
Quote:
Originally Posted by rezasadeghi View Post
hi,
i want to correct my command .

Code:
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
    #23  
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: 23 September 2017, 2:31 AM EDT
Posts: 1,070
Thanks: 31
Thanked 313 Times in 274 Posts
How about pax

Code:
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
Closed

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 10:50 AM.