LITTLEBLACKDOG.COM Forum Index LITTLEBLACKDOG.COM

 
LWD LWD   FAQ FAQ   Memberlist Memberlist   Usergroups Usergroups   Active Topics Active Topics   Register Register  
  Profile Profile   Log in to check your private messages Log in to check your private messages   Log in Log in  
  Who is Online Who is Online   Image Gallery Image Gallery   Chat Chat   Search Search  
  LWDGear       LBDGear  

View next topic
View previous topic
Post new topic     Reply to topic   LITTLEBLACKDOG.COM Forum Index -> Operating Systems » OS - Unix
Author Message
Skookum
Butt Sniffer
Butt Sniffer


Joined: 26 Oct 2001
Posts: 1535
Location: I dunno, I lost my Mommy

Post Posted: Wed Dec 27, 2006 12:36 pm   Post subject: Deleting a ton of files Reply with quote Back to top  

I am trying to delete around 1 million pictures from a folder, and I am doing a
rm *.jpg -f

and I am receiving the following error

-bash: //bin/rm: Argument list too long

Is there a way to get around this and delete all the files?

This is the first time I have ever seen this error before, so I am a little confused. And yes the pictures are already broken into sub-folders, this just happens to be a rather large sub-folder.

_________________
"Paranoia is no longer a mental illness it is a way of life" - Me
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
AnalogKid
Butt Sniffer
Butt Sniffer


Joined: 26 Aug 2004
Posts: 1617

Post Posted: Wed Dec 27, 2006 2:27 pm   Post subject: Reply with quote Back to top  

use rm -R

_________________
"It's just like the story of the grasshopper and the octopus: all year long the grasshopper kept burrying acorns for winter, while the octopus mooched off his girlfriend and watched TV, but then the winter came, and the grasshopper died, and the octopus ate all his acorns - and also he got a race car! Is any of this getting through to you?" -FRY

View user's profile Send private message
Skookum
Butt Sniffer
Butt Sniffer


Joined: 26 Oct 2001
Posts: 1535
Location: I dunno, I lost my Mommy

Post Posted: Thu Dec 28, 2006 9:20 am   Post subject: Reply with quote Back to top  

Sweet I will give it a try as soon as I get my server back up and running, it crashed yesterday. And I only have today to rebuild it before my project is due, Yay. Rolling Eyes

_________________
"Paranoia is no longer a mental illness it is a way of life" - Me
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
soup4you2
Tail-Wagger
Tail-Wagger


Joined: 15 Mar 2002
Posts: 2452
Location: Desolate wastelands of Virginia

Post Posted: Fri Dec 29, 2006 6:14 pm   Post subject: Reply with quote Back to top  

Whenever i cleanup my snort log directory i always get that.. running

(from bash shell) (be sure to be inside the directory to be pruned.)
for ls in *.jpg; do; rm -f $ls; done

does the trick.

_________________
tomorrow will be canceled due to lack of interest
View user's profile Send private message Send e-mail
Skookum
Butt Sniffer
Butt Sniffer


Joined: 26 Oct 2001
Posts: 1535
Location: I dunno, I lost my Mommy

Post Posted: Tue Jan 16, 2007 7:56 am   Post subject: Reply with quote Back to top  

soup4you2 wrote:
Whenever i cleanup my snort log directory i always get that.. running

(from bash shell) (be sure to be inside the directory to be pruned.)
for ls in *.jpg; do; rm -f $ls; done

does the trick.


I just checked back in here, didn't realize someone else responded.

Thanks that is a good idea soup4you2. I didn't even think to write a little awk script to do it for me.

_________________
"Paranoia is no longer a mental illness it is a way of life" - Me
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic     Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
phpBB SEO
All times are GMT - 8 Hours

Help us keep advertisements off this site. Donate today!