The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 03-18-2008
knijjar knijjar is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 27
find command takes a lot of time ( can I skip directories)

I have a file called "library" with the following content

libnxrdbmgr.a
libnxrdbmgr.so
libnxtk.a
libnxtk.so
libora0d_nsc_osi.so

I am trying to locate if these libraries are on my machine or not. find command runs for about few seconds and hangs after this.
Can someone please help me and let me know if there is a better way. Is there a way I can ignore a directory and its sub directories during the find process

find: cannot read dir /ssttools/performance/RMCmem: Permission denied


$ for i in `cat library`
do
find / -name $i -print | grep $i >> outputfile
done




find: cannot read dir /proc/24250: Permission denied
find: cannot read dir /proc/17502: Permission denied
find: cannot read dir /tmp/smc898: Permission denied
find: cannot read dir /tmp/config_pvr: Permission denied
find: cannot read dir /export/home/dwgore/.rhosts: Permission denied
find: cannot read dir /export/home/mgalvin/.rhosts: Permission denied
find: cannot read dir /export/home/nmsbb/.ssh: Permission denied
find: cannot read dir /export/home/www/.ssh: Permission denied
find: cannot read dir /ssttools/performance/RMCmem: Permission denied

It is taking a lot of time here before it can go to next