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
Post a Comment