In English

    Tips & Tricks

    Note to myself.
    I found that my /var/amavis/tmp has thousends of files.

    du -sg tmp/
    26 tmp/

    Actually 26Gb of crap. Now, how to delete all files excluding these with current date and one day before?

    Here is one line magic spell:

    find /var/amavis/tmp -type f -mtime +1 -exec rm -f {} \;

    Results?

    du -sm tmp/
    9 tmp/

    Bingo! ;)
    Thx to aniou #netbsd.pl



    Related Posts with Thumbnails

    Leave a Reply

    Add your widget here