On 07/13/2017 09:26 AM, Jon Ingason wrote: > Den 2017-07-13 kl. 17:33, skrev bruce: >> hey guys.. >> >> i'm missing something. thoughts/comments? >> >> trying to do a rm with find/exec. >> >> ssh crawl_user@1.2.3.4 " rm -f '/cloud_nfs/*hash*.dat' ; find >> /cloud_nfs -name '*austincc*master*book*.dat' -exec rm {} \; rm -f > Here is the problem--------------------------------------------^ > The ";" is part of the find command. Try "...rm {} \; ; rm -f ..." > I have not tested this but should works. > >> '/cloud_nfs_fetch/*hash*.dat' ; " >> >> i get >> find: paths must precede expression: rm >> Usage: find [-H] [-L] [-P] [-Olevel] [-D >> help|tree|search|stat|rates|opt|exec] [path...] [expression] >> >> can't seem to see my error... >> >> however, if I remove the last rm -- the find/exec/rm works.. Of course, you COULD use "-delete" in the find command rather than doing an "-exec rm {} \;": sh crawl_user@1.2.3.4 " rm -f '/cloud_nfs/*hash*.dat' ; find /cloud_nfs -name '*austincc*master*book*.dat' -delete; rm -f '/cloud_nfs_fetch/*hash*.dat' ; " Might be a bit cleaner and less confusing. ---------------------------------------------------------------------- - Rick Stevens, Systems Engineer, AllDigital ricks@xxxxxxxxxxxxxx - - AIM/Skype: therps2 ICQ: 226437340 Yahoo: origrps2 - - - - Do you know how to save five drowning lawyers? No? GOOD! - ---------------------------------------------------------------------- _______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx