| Author |
Message |
Skookum
Butt Sniffer


Joined: 26 Oct 2001 Posts: 1535
Location: I dunno, I lost my Mommy
|
Posted:
Wed Dec 27, 2006 12:36 pm Post subject: Deleting a ton of files |
|
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
|
|
|
|
|
AnalogKid
Butt Sniffer


Joined: 26 Aug 2004 Posts: 1615
|
Posted:
Wed Dec 27, 2006 2:27 pm Post subject: |
|
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
|
|
|
|
|
Skookum
Butt Sniffer


Joined: 26 Oct 2001 Posts: 1535
Location: I dunno, I lost my Mommy
|
Posted:
Thu Dec 28, 2006 9:20 am Post subject: |
|
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. |
_________________ "Paranoia is no longer a mental illness it is a way of life" - Me
|
|
|
|
|
soup4you2
Tail-Wagger


Joined: 15 Mar 2002 Posts: 2452
Location: Desolate wastelands of Virginia
|
Posted:
Fri Dec 29, 2006 6:14 pm Post subject: |
|
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
|
|
|
|
|
Skookum
Butt Sniffer


Joined: 26 Oct 2001 Posts: 1535
Location: I dunno, I lost my Mommy
|
Posted:
Tue Jan 16, 2007 7:56 am Post subject: |
|
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
|
|
|
|
|
|
|