#1  
Old 26th June 2007, 02:49
Daisy Daisy is offline
Senior Member
 
Join Date: Dec 2006
Posts: 112
Thanks: 0
Thanked 3 Times in 1 Post
Default stupid rm question

I don't know why I can't figure this out. What if I want to remove all files starting with thmb from 217 subdirectories?

i.e.
/pics/1/thmb1.jpg
/pics/2/thmb15.jpg
/pics/3/thmb42.jpg

I tried rm -rf thmb* but that didn't work. Suggestions? (sorry for such a newb question)
Reply With Quote
Sponsored Links
  #2  
Old 26th June 2007, 09:01
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

The files are in different directories, so this will not work. If you want to delete all files, you will either have to enter every directory manually or you delete the 1 2 3 directories and files.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 26th June 2007, 17:31
Daisy Daisy is offline
Senior Member
 
Join Date: Dec 2006
Posts: 112
Thanks: 0
Thanked 3 Times in 1 Post
Default

what about mv? could you mv all those files to a single directory and then delete that directory?

There has to be a way to do this. If you can do it with windows you have to be able to do it with linux. (one would think) or is this a feature you lose in the name of security?
Reply With Quote
  #4  
Old 27th June 2007, 18:21
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
 
Default

You could write a script that loops through the directories and deletes all the image files. The /usr/local/sbin/webstats script on http://www.howtoforge.com/apache_log_splitting_vlogger should give you the idea.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
probaly an stupid question about antivirus DaRKNeSS666NL General 4 25th January 2007 15:30
sendmail config question westb Server Operation 1 1st September 2006 17:00
Stupid newb question: which IP, where? sagewah Installation/Configuration 3 10th August 2006 01:10
Really Basic Question !!! brainz Installation/Configuration 7 13th March 2006 23:20
configuration for PHP question... renzda2nd Installation/Configuration 8 17th February 2006 10:20


All times are GMT +2. The time now is 19:01.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.