Thursday 22 April 2010

rename a lakh file using find and xargs

I have 1 lakh files ending with (filenames).processing.done. I want to rename all these filename .processing.done files to filenames again to restart my processing again.

simple rename command won't work on large set and says argument list too long. One way is to do with find and xargs.

find . -type f | xargs rename 's/.processing.done//' {} ;


No comments:

Post a Comment

Tweets by @sriramperumalla