Note: that this is a
dangerous command to issue
since it assumes that you
are consciously using it
on a directory which is
full of files that are out
of date or not belonging to
March or whatever.
(If this is not the case you
might get some undesirable
results.)
The other thing is that you
might want to keep more than
one month's worth of files.
You would then need to move
the files from the other month
out into a temporary subfolder
while you "clean" the top
folder. Then move them back
in. Also, note that you have
two types of single quote,
the first and last are from
the key under the escape key
and the one that is used to
delimit the awk print
statement is the one next to
the hash key. I have used this
command myself regularly with a
few extra pipes (to do certain
specific things which are
irrelevant here) in order to
clean out subdirectories where
the df is running at 100%!
This has been a time-saver
when I have had to log on to
different servers around the
world and do a regular purge.
THIS TIP IS NOT SUPPORT,
UGU ADVICES TESTING BE FOR
USING.
NOTE: All tips provided are USE AT YOUR OWN RISK. Tips are submitted
by various unix admins around the globe. UGU suggest you read and
test each tip in a non-volitile environment before placing into
production.