Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-06-2008, 08:32 PM   #1
Registered: Sep 2003
Posts: 230

Rep: Reputation: 32
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


Old 11-06-2008, 08:37 PM   #2
Senior Member
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,978
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
rm ~username/*.exe
^ Cron that

Old 11-06-2008, 09:00 PM   #3
Registered: Sep 2003
Posts: 230

Original Poster
Rep: Reputation: 32
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
Old 11-06-2008, 09:05 PM   #4
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
How about

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

Last edited by billymayday; 11-06-2008 at 09:23 PM.
Old 11-06-2008, 09:44 PM   #5
Gentoo support team
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 403Reputation: 403Reputation: 403Reputation: 403Reputation: 403
Originally Posted by billymayday View Post
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.
Old 11-06-2008, 09:52 PM   #6
Registered: Sep 2003
Posts: 230

Original Poster
Rep: Reputation: 32
Thanks for any helps.. it solved!



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
what is the command to delete files and folders quickly. ravi Linux - General 1 03-13-2007 01:09 PM
Can't delete certain files or do I change this? xsithlordx SUSE / openSUSE 10 03-05-2006 11:32 PM
HELP: can't delete files/folders :( kevingpo General 1 12-07-2004 08:51 PM
Delete old files and folders Script? AsteX Linux - General 4 11-11-2004 07:26 PM
How to disable ftp user's ability to delete files BrianG Linux - General 2 01-15-2002 05:40 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:29 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration