LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Remove files w/ extension txt recursively (https://www.linuxquestions.org/questions/linux-general-1/remove-files-w-extension-txt-recursively-391613/)

spiri 12-11-2005 03:20 PM

Remove files w/ extension txt recursively
 
Hi,
I need to remove the files from a directory and their subdir with a extension.

I use to make the backups of all the customer disk to a samba share, then I
enter with bash and need to strip all exe, dll etc.
I try a lot of commands: rm *.exe /foo -Rf
but it doesn't work.

Any help with be very greatfull.

Regards,

spiri

homey 12-11-2005 04:06 PM

Something like this....

find /some/directory -type f -name '*.exe' -exec rm {} \;

spiri 12-11-2005 04:56 PM

Quote:

Originally Posted by homey
Something like this....

find /some/directory -type f -name '*.exe' -exec rm {} \;

Thanks,but it gives an error: find:missing argument '-exec'

Tinkster 12-11-2005 06:36 PM

Did you put that space between the curley-braces and the \;?


Cheers,
Tink

spiri 12-14-2005 03:52 AM

Thats it buddy, the missing space.

Thanks a lot.


All times are GMT -5. The time now is 05:37 AM.