I've been working through a bunch of directories, trying
to figure out where I should focus my effort for
cleanup, doing:
du -s * | sort -n
I've probably execed this command 100 times in the
last 20 minutes. As root.
Of course, I never type it, I:
^R|
which puts the last '|' containing command in the
buffer, and then I hit <ENTER>.
But I found a log directory with many thousands of files.
It blew out the max buffer for a command, so I used:
find . -print | xargs rm
Which cleans it up nicely.
Which also makes it the last command in the buffer that
contains the vertical bar.
{CUE THE DARTH VADER MUSIC}
So I then went to the top level directory of the file system
and pressed:
^R|<ENTER>
About 15 screens of
rm: cannot remove `./home/{{HOME_DIR}}': Is a directory
syle messages scrolled by before I could ^C the command.
Which means it COULD remove the contents of every one of those
directories.
This is a quad opteron connected to a dual fibre EMC. 380MB
per second / a SHITLOAD of IOPs.
Any idea how many files it can delete in that amount of time?
ARGG!!!!!!!
And then I realized.
There are DOZENS of unused home directies that Samba creates for
windows users when they first touch the system. And the find command
went to those first.
OMFG!
SAFE!
Even if I could get that stuff back from backup, I'd NEVER
hear the end of it.