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 -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -