![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| 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 !! |
|
|
||||
| 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 |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
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 {} \; |
|
#3
|
|||
|
|||
|
working great now, thanks.
|
|||
| Google The UNIX and Linux Forums |