![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| combination of two commands | nehaquick | UNIX for Dummies Questions & Answers | 3 | 02-01-2008 01:09 AM |
| Detecting a key combination | mobile01 | High Level Programming | 11 | 12-22-2006 06:46 AM |
| awk and file combination | sickboy | UNIX for Dummies Questions & Answers | 1 | 06-13-2005 06:02 PM |
| Getting 'tar' to exclude | kuultak | UNIX for Dummies Questions & Answers | 6 | 02-07-2005 04:31 PM |
| Combination Of commands | rahulrathod | UNIX for Dummies Questions & Answers | 2 | 12-14-2004 04:32 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
'find' and 'tar' combination
I'm trying to tar the files I get from the 'find' command result. However I can't make it run successfuly? This is for our archiving process.
Here is my script: find /mnt/LOGS -mtime -10 -name "TUXLOG.*" -exec tar -cvf /mnt/LOGS/combine.tar {} \; Im not sure why it is not working or it is even possible to use the 'tar' command with exec. Appreciate your help. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
You command "find /mnt/LOGS -mtime -10 -name "TUXLOG.*" -exec tar -cvf /mnt/LOGS/combine.tar {} \;" with the "-c" recreate for each file founded par find another "combine.tar".
Better way to create a temporay file : Code:
find /mnt/LOGS -mtime -10 -name "TUXLOG.*" > combine.lst tar -cvf /mnt/LOGS/combine.tar -L combine.lst |
|
#3
|
|||
|
|||
|
The -uvf works!!
Thank you so much... |
|||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|