LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   delete .exe files in user's home folders (https://www.linuxquestions.org/questions/linux-newbie-8/delete-exe-files-in-users-home-folders-681658/)

Winanjaya 11-06-2008 07:32 PM

delete .exe files in user's home folders
 
Dear All,

I am running FC9, I have a lot of .exe files in many user's home folders.. is there any way to delete them using a shell command? ..

please help

Thanks

Winan

custangro 11-06-2008 07:37 PM

Code:

#!/bin/bash
#
rm ~username/*.exe

^ Cron that

-C

Winanjaya 11-06-2008 08:00 PM

Hi,
I have more than 400 users ;>( ..

I am trying to run below:

rm -f | find /home/ -name *.exe ..

but it doesnot work .. what I missed?

please help

Thanks & Regards

billymayday 11-06-2008 08:05 PM

How about

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

i92guboj 11-06-2008 08:44 PM

Quote:

Originally Posted by billymayday (Post 3334030)
How about

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

If you permit the usage of wine, you should read the find man page. Look for maxdepth. Otherwise, you might completely screw the programs they installed using wine. If that's your purpose, then forget about this post. :p

Winanjaya 11-06-2008 08:52 PM

Thanks for any helps.. it solved!

Regards


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