1831406 Members
3503 Online
110025 Solutions
New Discussion

HPUX 11.0: Find Command

 
SOLVED
Go to solution
LG Porter
Frequent Advisor

HPUX 11.0: Find Command

I have several HPUX 11.0 systems that have as part of their configuration NFS file systems that is very large. I would like to used the "find" command to A) Find a specific file but exclude the find command from searching through the large NFS mounted file systems, what is the correct syntax for the "find" command for this type of search? B) Using the "find" command, I would like to find all the associated file links on the system?
5 REPLIES 5
Joseph Loo
Honored Contributor
Solution

Re: HPUX 11.0: Find Command

hi,

A)
# find -name '' -type f -exec ls -ld {} \;
e.g.
# find /etc -name 'resolv.conf' -type f -exec ls -ld {} \;

B)
# find / -type l -exec ls -ld {} \;

for more info on find command:
# man find

hope it helps.

regards.
what you do not see does not mean you should not believe
Abdul Rahiman
Esteemed Contributor

Re: HPUX 11.0: Find Command

Hi,

You could use the -fsonly option with find to descent only on hfs or vxfs filesystems like this.,

find / -name "filename" -fsonly vxfs -print

regds,
Abdul.
No unix, no fun
Sundar_7
Honored Contributor

Re: HPUX 11.0: Find Command

Hi,

You can use -xdev option with find to restrict the search only to that file system. I do believe find has an option for ignoring nfs file system but I dont have a system to look up and tell you righ tnow. do a man find.

Sundar
Learn What to do ,How to do and more importantly When to do ?
Manish Srivastava
Trusted Contributor

Re: HPUX 11.0: Find Command

Hi,

To add to it you can use the -follow option to follow the symbolic links.

manish
Muthukumar_5
Honored Contributor

Re: HPUX 11.0: Find Command

hai,

Question A.

Do you want the find command not to search large nfs files (largefiles) or NFS mounted files.
Some time / directory is mounted as largefiles
fsadm -F vxfs /
largefiles
We have to detect the largefiles as another process

To search a file without searching through the nfs mounted files,
find -name -fsonly vxfs -print

Question B.

We can get the link files as
find -type l -exec file -h {} \;

Regards,
Muthukumar.
Easy to suggest when don't know about the problem!