Argument list too long
Lars Engels
lars.engels at 0x20.net
Thu Mar 7 16:15:49 UTC 2013
On Thu, Mar 07, 2013 at 05:50:36PM +0200, Vladislav Prodan wrote:
> Why 12K small files from one directory to cause problems?
>
> # ll | wc -l
> 11467
>
> # grep X-PHP-Script * | more
> /sbin/grep: Argument list too long.
>
> # egrep X-PHP-Script *.ua | more
> /usr/sbin/egrep: Argument list too long.
>
> # cat *.ua | grep X-PHP-Script | more
> /sbin/cat: Argument list too long.
>
>
>
Your shell can't process that many arguments. Use this:
grep -R "X-PHP-Script" .
or if you don't want to descent into subdirectories:
find . -type -f -name '*.ua' -maxdepth 1 -exec grep "X-PHP-Script" {} \+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20130307/66706aa1/attachment.sig>
More information about the freebsd-fs
mailing list