<div class="socmaildefaultfont" dir="ltr" style="font-family:Arial, Helvetica, sans-serif;font-size:12pt" ><div dir="ltr" >Presumably the only feature that would help here is if policy could determine that the end location pointed to by a symbolic link is within the current file system.&nbsp; I am not aware of any such feature or attribute which policy could check so I think all you can do is run policy to find the symbolic links and then check each link to see if it points into the same file system.&nbsp; You might find the mmfind command useful for this purpose.&nbsp; I expect it would eliminate the need to create a policy to find the symbolic links.</div>
<div dir="ltr" ><div class="socmaildefaultfont" dir="ltr" style="font-family:Arial, Helvetica, sans-serif;font-size:10pt" ><div class="socmaildefaultfont" dir="ltr" style="font-family:Arial, Helvetica, sans-serif;font-size:10.5pt" ><div dir="ltr" ><br><font size="2" face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" ><span style="font-size:1.143em;" >Fred<br>_______________________________________________________<br>Fred Stock | Spectrum Scale Development Advocacy | 720-430-8821<br>stockf@us.ibm.com</span></font></div></div></div></div>
<div dir="ltr" >&nbsp;</div>
<div dir="ltr" >&nbsp;</div>
<blockquote data-history-content-modified="1" dir="ltr" style="border-left:solid #aaaaaa 2px; margin-left:5px; padding-left:5px; direction:ltr; margin-right:0px" >----- Original message -----<br>From: "Oesterlin, Robert" &lt;Robert.Oesterlin@nuance.com&gt;<br>Sent by: gpfsug-discuss-bounces@spectrumscale.org<br>To: gpfsug main discussion list &lt;gpfsug-discuss@spectrumscale.org&gt;<br>Cc:<br>Subject: [EXTERNAL] Re: [gpfsug-discuss] Policy scan of symbolic links with contents?<br>Date: Mon, Mar 8, 2021 10:35 AM<br>&nbsp;<br><!--Notes ACF
<meta http-equiv="Content-Type" content="text/html; charset=utf8" >--> <!--[if !mso]><style></style><![endif]--><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit" >
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div><p style="margin: 0px;" >Well - the case here is that the file system has, let\u2019s say, 100M files. Some percentage of these are sym-links to a location that\u2019s not in this file system. I want a report of all these off file system links. However, not all of the sym-links off file system are of interest, just some of them.<o:p></o:p></p>
<p style="margin: 0px;" ><o:p>&nbsp;</o:p></p>
<p style="margin: 0px;" >I can\u2019t say for sure where in the file system they are (and I don\u2019t care).<o:p></o:p></p>
<p style="margin: 0px;" ><o:p>&nbsp;</o:p></p>
<div><p style="margin: 0px;" ><o:p>&nbsp;</o:p></p>
<p style="margin: 0px;" ><span style="font-size:12.0pt" >Bob Oesterlin<o:p></o:p></span></p>
<p style="margin: 0px;" ><span style="font-size:12.0pt" >Sr Principal Storage Engineer, Nuance<o:p></o:p></span></p></div>
<p style="margin: 0px;" ><o:p>&nbsp;</o:p></p>
<p style="margin: 0px;" ><o:p>&nbsp;</o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in" ><p style="margin: 0px;" ><b><span style="font-size:12.0pt;color:black" >From: </span></b><span style="font-size:12.0pt;color:black" >&lt;gpfsug-discuss-bounces@spectrumscale.org&gt; on behalf of Frederick Stock &lt;stockf@us.ibm.com&gt;<br><b>Reply-To: </b>gpfsug main discussion list &lt;gpfsug-discuss@spectrumscale.org&gt;<br><b>Date: </b>Monday, March 8, 2021 at 9:29 AM<br><b>To: </b>"gpfsug-discuss@spectrumscale.org" &lt;gpfsug-discuss@spectrumscale.org&gt;<br><b>Cc: </b>"gpfsug-discuss@spectrumscale.org" &lt;gpfsug-discuss@spectrumscale.org&gt;<br><b>Subject: </b>[EXTERNAL] Re: [gpfsug-discuss] Policy scan of symbolic links with contents?<o:p></o:p></span></p></div>
<div><p style="margin: 0px;" ><o:p>&nbsp;</o:p></p></div>
<div align="center" ><table cellspacing="0" cellpadding="0" border="1" >        <tbody>                <tr>                        <td style="width:100.0%;background:#FFEB9C;padding:0in 0in 0in 0in" width="100%" >                        <p style="text-align: center; margin: 0px;" align="center" ><b><span style="font-size:10.0pt;color:red" >CAUTION: </span></b><span style="font-size:10.0pt;color:black" >This Email is from an EXTERNAL source. Ensure you trust this sender before clicking on any links or attachments.</span><o:p></o:p></p>                        </td>                </tr>        </tbody></table></div>
<div style="text-align: center; margin: 0px;" align="center" ><hr width="100%" size="0" align="center" ></div>
<div><div><p style="margin: 0px;" ><span style="font-size:12.0pt;font-family:&quot;Arial&quot;,sans-serif" >Could you use the PATHNAME LIKE statement to limit the location to the files of interest?<o:p></o:p></span></p></div>
<div><div><div><div><p style="margin: 0px;" ><br><span style="font-size:11.5pt;font-family:&quot;Verdana&quot;,sans-serif" >Fred<br>_______________________________________________________<br>Fred Stock | Spectrum Scale Development Advocacy | 720-430-8821<br>stockf@us.ibm.com</span><span style="font-size:10.5pt;font-family:&quot;Arial&quot;,sans-serif" ><o:p></o:p></span></p></div></div></div></div>
<div><p style="margin: 0px;" ><span style="font-size:12.0pt;font-family:&quot;Arial&quot;,sans-serif" >&nbsp;<o:p></o:p></span></p></div>
<div><p style="margin: 0px;" ><span style="font-size:12.0pt;font-family:&quot;Arial&quot;,sans-serif" >&nbsp;<o:p></o:p></span></p></div>
<blockquote style="border:none;border-left:solid #AAAAAA 1.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt" ><p style="margin: 0px;" ><span style="font-size:12.0pt;font-family:&quot;Arial&quot;,sans-serif" >----- Original message -----<br>From: "Oesterlin, Robert" &lt;Robert.Oesterlin@nuance.com&gt;<br>Sent by: gpfsug-discuss-bounces@spectrumscale.org<br>To: gpfsug main discussion list &lt;gpfsug-discuss@spectrumscale.org&gt;<br>Cc:<br>Subject: [EXTERNAL] [gpfsug-discuss] Policy scan of symbolic links with contents?<br>Date: Mon, Mar 8, 2021 10:12 AM<br>&nbsp;<br><br><o:p></o:p></span></p>
<div><p style="margin:0in" ><span style="font-family:&quot;Arial&quot;,sans-serif" >Looking to craft a policy scan that pulls out symbolic links to a particular destination. For instance:</span><span style="font-size:12.0pt;font-family:&quot;Arial&quot;,sans-serif" ><o:p></o:p></span></p>
<p style="margin:0in" ><span style="font-family:&quot;Arial&quot;,sans-serif" >&nbsp;</span><span style="font-size:12.0pt;font-family:&quot;Arial&quot;,sans-serif" ><o:p></o:p></span></p>
<p style="margin:0in" ><span style="font-family:&quot;Arial&quot;,sans-serif" >file1.py -&gt; /fs1/patha/pathb/file1.py (I want to include these)</span><span style="font-size:12.0pt;font-family:&quot;Arial&quot;,sans-serif" ><o:p></o:p></span></p>
<p style="margin:0in" ><span style="font-family:&quot;Arial&quot;,sans-serif" >file2.py -&gt; /fs2/patha/pathb/file2.py (exclude these)</span><span style="font-size:12.0pt;font-family:&quot;Arial&quot;,sans-serif" ><o:p></o:p></span></p>
<p style="margin:0in" ><span style="font-family:&quot;Arial&quot;,sans-serif" >&nbsp;</span><span style="font-size:12.0pt;font-family:&quot;Arial&quot;,sans-serif" ><o:p></o:p></span></p>
<p style="margin:0in" ><span style="font-family:&quot;Arial&quot;,sans-serif" >The easy way would be to pull out all sym-links and just grep for the ones I want but was hoping for a more elegant solution\u2026</span><span style="font-size:12.0pt;font-family:&quot;Arial&quot;,sans-serif" ><o:p></o:p></span></p>
<p style="margin:0in" ><span style="font-family:&quot;Arial&quot;,sans-serif" >&nbsp;</span><span style="font-size:12.0pt;font-family:&quot;Arial&quot;,sans-serif" ><o:p></o:p></span></p>
<p style="margin:0in" ><span style="font-family:&quot;Arial&quot;,sans-serif" >&nbsp;</span><span style="font-size:12.0pt;font-family:&quot;Arial&quot;,sans-serif" ><o:p></o:p></span></p>
<p style="margin:0in" ><span style="font-size:12.0pt;font-family:&quot;Arial&quot;,sans-serif" >Bob Oesterlin<o:p></o:p></span></p>
<p style="margin:0in" ><span style="font-size:12.0pt;font-family:&quot;Arial&quot;,sans-serif" >Sr Principal Storage Engineer, Nuance<o:p></o:p></span></p>
<p style="margin:0in" ><span style="font-size:12.0pt;font-family:&quot;Arial&quot;,sans-serif" >&nbsp;<o:p></o:p></span></p></div>
<div><p style="margin: 0px;" ><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;" >_______________________________________________<br>gpfsug-discuss mailing list<br>gpfsug-discuss at spectrumscale.org<br><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listinfo_gpfsug-2Ddiscuss&amp;d=DwICAg&amp;c=jf_iaSHvJObTbx-siA1ZOg&amp;r=p_1XEUyoJ7-VJxF_w8h9gJh8_Wj0Pey73LCLLoxodpw&amp;m=i6m1zVXf4peZo0yo02IiRaQ_pUX95MN3wU53M0NiWcI&amp;s=z-ibh2kAPHbehAsrGavNIg2AJdXmHkpUwy5YhZfUbpc&amp;e=" target="_blank" >https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listinfo_gpfsug-2Ddiscuss&amp;d=DwICAg&amp;c=jf_iaSHvJObTbx-siA1ZOg&amp;r=p_1XEUyoJ7-VJxF_w8h9gJh8_Wj0Pey73LCLLoxodpw&amp;m=i6m1zVXf4peZo0yo02IiRaQ_pUX95MN3wU53M0NiWcI&amp;s=z-ibh2kAPHbehAsrGavNIg2AJdXmHkpUwy5YhZfUbpc&amp;e=</a>&nbsp;</span><span style="font-size:12.0pt;font-family:&quot;Arial&quot;,sans-serif" ><o:p></o:p></span></p></div></blockquote>
<div><p style="margin: 0px;" ><span style="font-size:12.0pt;font-family:&quot;Arial&quot;,sans-serif" >&nbsp;<o:p></o:p></span></p></div></div>
<p style="margin: 0px;" ><br><br><o:p></o:p></p></div>
<div><font size="2" face="Default Monospace,Courier New,Courier,monospace" >_______________________________________________<br>gpfsug-discuss mailing list<br>gpfsug-discuss at spectrumscale.org<br><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listinfo_gpfsug-2Ddiscuss&amp;d=DwICAg&amp;c=jf_iaSHvJObTbx-siA1ZOg&amp;r=p_1XEUyoJ7-VJxF_w8h9gJh8_Wj0Pey73LCLLoxodpw&amp;m=oRbtYApZcD6DP-VZN9gW7dTGSZU6I4r9b_Q-nb9Xc7k&amp;s=SvdmxtC5aLPE7HL4nkPNlImv4pzfOCwcTkVBQsrAo-Q&amp;e=" target="_blank" >https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listinfo_gpfsug-2Ddiscuss&amp;d=DwICAg&amp;c=jf_iaSHvJObTbx-siA1ZOg&amp;r=p_1XEUyoJ7-VJxF_w8h9gJh8_Wj0Pey73LCLLoxodpw&amp;m=oRbtYApZcD6DP-VZN9gW7dTGSZU6I4r9b_Q-nb9Xc7k&amp;s=SvdmxtC5aLPE7HL4nkPNlImv4pzfOCwcTkVBQsrAo-Q&amp;e=</a>&nbsp;</font></div></blockquote>
<div dir="ltr" >&nbsp;</div></div><BR>