Subj : Re: How to execute more than one command with find -exec? To : comp.os.linux From : Jitender Singh Date : Thu Nov 25 2004 11:19 am try multiple -exec switch find xxx -name "*.gif" -exec grep -v abc.txt {} \;  -exec echo {} \; -exec rm {} \; Cheng Mo wrote: > The scenario is: > In folder XXX there are lots of *.gif files. Those *.gif files whose > filename don't appear in file abc.txt should be deleted. I want to do > this job in one line command. > find XXX -name "*.gif" -exec ........... \; > But I don't know how to write the part of .............. > > I tried > find XXX -name "*.gif" -exec grep {} abc.txt || rm {} \; > But it seems -exec don't take behind as a combination of two commands. > Anybody can tell me how to execute more than one command with find -exec? > Thanks .