LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 11-06-2008, 07:32 PM   #1
Winanjaya
Member
 
Registered: Sep 2003
Posts: 239

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

Thanks

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

Rep: Reputation: 209Reputation: 209Reputation: 209
Code:
#!/bin/bash
#
rm ~username/*.exe
^ Cron that

-C
 
Old 11-06-2008, 08:00 PM   #3
Winanjaya
Member
 
Registered: Sep 2003
Posts: 239

Original Poster
Rep: Reputation: 32
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
 
Old 11-06-2008, 08:05 PM   #4
billymayday
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 08:23 PM.
 
Old 11-06-2008, 08:44 PM   #5
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
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, 08:52 PM   #6
Winanjaya
Member
 
Registered: Sep 2003
Posts: 239

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

Regards
 
  


Reply


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 12:09 PM
Can't delete certain files or folders...how do I change this? xsithlordx SUSE / openSUSE 10 03-05-2006 10:32 PM
HELP: can't delete files/folders :( kevingpo General 1 12-07-2004 07:51 PM
Delete old files and folders Script? AsteX Linux - General 4 11-11-2004 06:26 PM
How to disable ftp user's ability to delete files BrianG Linux - General 2 01-15-2002 04:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:15 PM.

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