The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
LINKS command not working !! vr76413 SUN Solaris 6 11-02-2006 08:46 AM
Variable for -name causing issue in Find command ParNone UNIX for Dummies Questions & Answers 2 03-24-2006 03:48 PM
using find to locate hard and soft links with tar manthasirisha Shell Programming and Scripting 4 03-14-2006 12:57 PM
An issue with find command. rajugp1 Shell Programming and Scripting 6 12-19-2002 08:34 AM
find and sym links peter.herlihy UNIX for Dummies Questions & Answers 3 06-24-2002 03:27 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 08-18-2005
Registered User
 

Join Date: Aug 2005
Posts: 5
Issue with find command using links

Hi,
Having a simple issue with find command on Sun. The command works fine if the variable is set to the actual filesystem but fails when the variable is set to a link which is pointing to the same filesystem.


export DUMPDEST=/oradata1/exports/pbm - Set the variable

oracle@gbo6020d:[PBM]:/home/oracle> find ${DUMPDEST} -name "${ORACLE_SID}*FULL*" -mtime +2 -exec ls -l {} \;
-rw-r--r-- 1 oracle dba 398239993 Aug 15 01:24 /oradata1/exports/pbm/PBM_15Aug05_FULL_3.dmp.Z
-rw-r--r-- 1 oracle dba 367997548 Aug 15 01:09 /oradata1/exports/pbm/PBM_15Aug05_FULL_1.dmp.Z
-rw-r--r-- 1 oracle dba 306083283 Aug 15 01:17 /oradata1/exports/pbm/PBM_15Aug05_FULL_2.dmp.Z

export DUMPDEST=/u01/app/oracle/admin/PBM/exports - Set the path with the value as link.

oracle@gbo6020d:[PBM]:/u01/app/oracle/admin/PBM> find ${DUMPDEST} -name "${ORACLE_SID}*FULL*" -mtime +2 -exec ls -l {} \;
oracle@gbo6020d:[PBM]:/u01/app/oracle/admin/PBM>

oracle@gbo6020d:[PBM]:/u01/app/oracle/admin/PBM> pwd
/u01/app/oracle/admin/PBM
oracle@gbo6020d:[PBM]:/u01/app/oracle/admin/PBM> ls -l
total 176
lrwxrwxrwx 1 oracle dba 21 Dec 13 2004 exports -> /oradata1/exports/pbm

It sounds like a small problem or is it a bug ?
Any help will be appreciated.
Reply With Quote
Forum Sponsor
  #2  
Old 08-18-2005
Registered User
 

Join Date: Jul 2005
Location: England
Posts: 183
By default find will not follow soft links. You can add the -follow option to make it do so:

find ${DUMPDEST} -follow -name "${ORACLE_SID}*FULL*" -mtime +2 -exec ls -l {} \;
Reply With Quote
  #3  
Old 08-18-2005
Registered User
 

Join Date: Aug 2005
Posts: 5
working great now, thanks.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 08:05 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0