![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to find a file named vijay in a directory using find command | amirthraj_12 | UNIX for Dummies Questions & Answers | 6 | 10-25-2008 01:37 PM |
| How to find whenther given value is in betwwen min and Max in unix shell scripting | pinky | UNIX for Dummies Questions & Answers | 5 | 07-27-2007 11:52 AM |
| Scripting to find the size of the folder | victorvvk | Shell Programming and Scripting | 2 | 03-17-2005 06:14 AM |
| UNIX find by time scripting | budrito | UNIX for Advanced & Expert Users | 1 | 10-08-2004 06:19 AM |
| command find returned bash: /usr/bin/find: Argument list too long | yacsil | Shell Programming and Scripting | 1 | 12-15-2003 06:38 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Scripting using the FIND command
I'm working on a 'find' command which uses the -exec option to tar a listing of files that it finds. Is there a single option available that would both 1) create the TAR file if it doesn't exist and/or 2) update the TAR file if it already exists?
Currently when I want manually create a TAR file and then add files to it I need to issue two different options to the TAR command. In other words, my command sequence needs to look like: tar -cvf myTarFile.txt fileA.txt tar -uvf myTarFile.txt fileB.txt tar -uvf myTarFile.txt fileC.txt So in the first iteration I have to include the -c (e.g. create TAR file) option. And in subsequent iterations I have to include the -u (e.g. update TAR file) option. I want to avoid programatically having to issue a different command for the first iteration. Is this possible? Any help would be greatly appreciated!!! |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|