Tuesday, March 15, 2011

Argument list too long - rm files failed

Use find and rm to delete files:

find /var/mol/temp/ -name *.txt -exec rm -rf {} \;

1 comment:

  1. find by time

    find . -mtime +1

    -mtime +1 means you are looking for a file modified 1 days ago.
    -mtime -1 means less than 1 days.
    -mtime 1 If you skip + or - it means exactly 1 days.

    ReplyDelete