Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ls fails with saying "Arguments list too long!"

Status
Not open for further replies.

jkhatri

Programmer
Mar 13, 2002
2
US
Hi Everybody,

I have to do ls -al *.eob files but 'ls' is failing
becuase there is nearly 10000 files in the directory and I assume ls is not able to handle that large volume.

Will appreciate if anybody has a solution for this problem.

Thanks

Jyo
 
hi,

yes, it's because the pattern *.eob is matching more files than the shell can pass to ls

in the past I've gotten around this by matching the files in several passes

ls a*.eob
ls b*.eob
..
..
ls z*.eob
Mike
"Experience is the comb that Nature gives us after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
I wonder whether find suffers the same limitation?:

find . -name '*.eob' -exec ls -la {} \;

Then again, you could always prune the directory in question! HTH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top