Operating System - HP-UX
1847129 Members
5822 Online
110263 Solutions
New Discussion

Re: Not enough memory to run command

 
SOLVED
Go to solution
peterchu
Super Advisor

Not enough memory to run command

When I use "find" command on the shell , it deny me to do it and pop the below error , may be we have too many files so not enough memory to do that , can I increase the memory and do it again ? if it is OK , how can I increase the memory ? thx

-bash: /usr/bin/find: Argument list too long
6 REPLIES 6
Ken Penland_1
Trusted Contributor

Re: Not enough memory to run command

what is the syntax you are using in your find command, meaning, are you doing a find and specifying wildcards?

if you are doing something like:
find . -name *.log

try instead:
find . -name '*.log'
'
Chris Wilshaw
Honored Contributor
Solution

Re: Not enough memory to run command

What OS version are you on, and what's the full command you're trying to run?
Fred Ruffet
Honored Contributor

Re: Not enough memory to run command

could you please show us the command ?

reagrds,

Fred
--

"Reality is just a point of view." (P. K. D.)
Victor Fridyev
Honored Contributor

Re: Not enough memory to run command

Hi,

The reason for such a message is that the command gives a large output, which you use somewhere as a list, e.g. this is similar to "ls *" in a directory with thousands of files.
If you use
find something | xargs cmd
replace it with
find something -exec cmd {} \;

HTH
Entities are not to be multiplied beyond necessity - RTFM
Fabio Ettore
Honored Contributor

Re: Not enough memory to run command

Hi,

problem could be that find command obtains too many files.

Complete command launched could help to understand better your problem.

You also should know that bash shell on HP-UX is not supported, it is default on Linux.
What is your O.S.?

Best regards,
Ettore
WISH? IMPROVEMENT!
Navin Bhat_2
Trusted Contributor

Re: Not enough memory to run command

Is this 10.20 or 11.0?