Unix/Linux Go Back    



Calling a find/remove within a script

Shell Programming and Scripting




Kindly Note - This is a Single User Post by Forum Member RudiC Regarding:
Calling a find/remove within a script.
Please Follow The Primary Link Above to View the Full Discussion.

   
Old Unix and Linux 05-16-2017   -   Original Discussion by jeffs42885
RudiC RudiC is offline Forum Staff  
Moderator
 
Join Date: Jul 2012
Last Activity: 17 November 2017, 6:42 AM EST
Location: Aachen, Germany
Posts: 11,616
Thanks: 320
Thanked 3,615 Times in 3,320 Posts
Quote:
Originally Posted by AbelLuis View Post
.
.
.
The final \; for the exec clause is mandatory. I don't know why you add the plus sign to the filename : {}+ .

Try

Code:
-exec gzip {} \;

.
.
.
.
Not necessarily. man find (on my linux: find (GNU findutils) 4.7.0-git)
Quote:
-exec command {} +
This variant of the -exec action runs the specified command on the selected files, but the command line is built by appending each selected file name at the end; the total number of invocations of the command will be much less than the number of matched files.
But: a space before the + may be compulsory.