Operating System - Tru64 Unix
1753797 Members
7315 Online
108799 Solutions
New Discussion юеВ

problems with the find cmd

 
dom kris
Frequent Advisor

problems with the find cmd

Hi,

In the past, I have written some scripts that use the 'find' cmd to scan a system for files owned by root and with bad file permissions.
This always worked fine. However, on some v5.1B systems, find is giving me trouble.
It complains about ' : Too many open files"
This seems strange. It seems that find open file it accesses, so I am not supprised that sooner or later, there no open file descriptors.
It does not seem logical, find should only open the current file it checks.

Has anybody had similar problems?

With kind regards,

Kris
6 REPLIES 6
Roberto Polli
Trusted Contributor

Re: problems with the find cmd

it happens beacuse you surely use
a command like
find *

so the OS tries to open all the files listed in the directory.
You have to supply a path to find .
to use the meta * character you have to increase the max_open_file with the
ulimit
or thru a c program. which runs find as a 'son' process

Peace, R.
Victor Semaska
Frequent Advisor

Re: problems with the find cmd

I tried increasing it with ulimit and got this error:

# ulimit -Hn 8192
ksh: ulimit: exceeds allowable limit

Vic

Re: problems with the find cmd

If you have installed 5.1B patch kit 3, there is a bug with the find command. There is a patch available to correct the problem:

http://www2.itrc.hp.com/service/patch/patchDetail.do?BC=patch.breadcrumb.main|patch.breadcrumb.search|&patchid=T64KIT0020861-V51BB24-E-20031125&context=tru:tru64:5.1b

Victor Semaska
Frequent Advisor

Re: problems with the find cmd

I tried the patch and it works. Although it says a reboot is necessary the patch works without a reboot.

Thanks Mathias.

Vic
Ralf Puchner
Honored Contributor

Re: problems with the find cmd

Please use the "search" option next time within the forum.

So the answer was:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=267908

Due to such postings the quality within the forum will be lowered by time.

Help() { FirstReadManual(urgently); Go_to_it;; }
Ravi_8
Honored Contributor

Re: problems with the find cmd

Hi Kris

I had similar problem, after installing patchkit 3, problem has been solved.
never give up