Showing posts with label Find. Show all posts
Showing posts with label Find. Show all posts

Saturday, January 31, 2015

Unix - Find Command Argument List Too Long

When I was trying to use the following script to find all files under a directory and perform some task, I got arg list too long error.
for i in `find $WORKDIR/*Alarm* -mtime 1 -type f`
do
some task
done
After I changed to use below script, it worked as expected.
for i in `find $WORKDIR -name ‘*Alarm*’ -mtime 1 -type f`
do
some task
done


Create a Successful Online Store at Bigcommerce! Try it Free Now!