×
UNIX.COM Login
Username:
Password:  
Show Password





×
UNIX.COM Login
Hello Unregistered
Welcome from United States
You are somewhere around Ashburn
Last Visit: 1 Minute Ago @ 03:20 PM
Bits: 0
UNIX Time: 1531682408

👤


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 05-16-2017   -   Original Discussion by jeffs42885
RudiC's Unix or Linux Image
RudiC RudiC is offline Forum Staff  
Moderator
 
Join Date: Jul 2012
Last Activity: 15 July 2018, 1:38 PM EDT
Location: Aachen, Germany
Posts: 13,051
Thanks: 444
Thanked 4,004 Times in 3,681 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.