Thursday, January 25, 2007

Delete files by size recursively

Delete files by size recursively

find /var/spool/squid/* -size +10k -type f -exec rm -f '{}' \;

The command meaning..
find
args1 =
args2 =
args3 =
args4 =
args5 = <-f means files.. we could have mentioned -d (directory) -b (block), -c (character), -f (regular file), -l (link), -s (socket), -p (pipes) >
args6 = <-exec means what action to perform if all the matches are true, so -exec is for action..>
args7..10 = <>

Cheers...
( Besides the above is for my own bad memory :-) )

No comments:

VIM issues with powerline

What to do if you get this annoying issue - vi requirements.txt ...