linux - Folder filled with 10M+ log files and I can't delete them -


i had logging process go haywire on 1 of servers , have tons of files can't delete:

➜  logs  ls -l | wc -l 11135951 ➜  logs  rm log* -bash: fork: cannot allocate memory 

ideas? blow server away i'm genuinely curious how fix this.

find . -type f -name 'log*' -delete 

would efficient way it

in cases replacing -delete with-print show files removed. in case though don't think help

@biffen points out sub dirs too

to prevent use maxdepth argument

-maxdepth 1

1 limits current dir


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -