1846882 Members
3932 Online
110256 Solutions
New Discussion

Re: find command

 
SOLVED
Go to solution
Peter J. Palmquist
New Member

find command

Hi,

When executing the find command as in the example below, the command appears to terminate prematurely. At times, depending on what I am searching for I do get some returns, but inevitably the command terminates the same way without completely searching the directory hierarchy.

Does anyone have any ideas?

Thanks in advance!
Peter

EXAMPLE:

ns01# find . -name "*.mpeg" -exec rm -i {} ;
find: cannot open .: Value too large for defined data type
ns01#
6 REPLIES 6
Kofi ARTHIABAH
Honored Contributor

Re: find command

Do you have a "hidden" directory there somewhere? (eg. one with say space for a name?)
nothing wrong with me that a few lines of code cannot fix!
CHRIS_ANORUO
Honored Contributor
Solution

Re: find command

Your comand is okay. If the kernel parameters for maxssiz, maxtsiz and maxdsiz are default sizes as at when system was installed, pls increase them.
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
James R. Ferguson
Acclaimed Contributor

Re: find command

Peter:

This is common if there are a large number of arguments. You can avoid this by using xargs in place of exec. This is actually "kinder" on system resources. Do something like:

# find . -name "*.mpeg"|xargs -n100 rm -i {}

This will do 100 files at a time until the list is exhausted.

See the man pages for xargs.

...JRF...
Trevor Dyson
Trusted Contributor

Re: find command

Peter,

Just working on a hunch, are any of the *.mpeg files greater then 2GB in size?

I've got a little black book with me poems in
Scott Dunkley
Regular Advisor

Re: find command

how many mpeg files are there, there may be too many to pass to the wild card, in whcih case write a simple loop to pick up the files.
Better to regret something you have done, than something you havn't
Peter J. Palmquist
New Member

Re: find command

Hi All,

Thanks a bunch for all your help! Chris & James the comments you made helped me isolate the problem. The homes which I had to clean reside on a Network Appliance, and are mounted to an Intel Box running Solaris. When I instead mounted the Network Appliance to my HP B2000 running HP-UX 11.0, I was able to perform my searches without any problems at all. The comments about the kernal perameters are what clued me in to making this change. Thanks again!

Peter