[OpenAFS] how do I know if I'm in AFS

David Bear David.Bear@asu.edu
Wed, 25 Jun 2008 09:26:17 -0700


------=_Part_10566_29890369.1214411177894
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Thanks. This is an interesting way to do it and it retains os independence.

Can anyone tell me was return codes the fs command has? (error levels that
it passes back to the calling shell)

On Wed, Jun 25, 2008 at 8:39 AM, Kim Kimball <dhk@ccre.com> wrote:

> David Bear wrote:
>
>> aside from taking the full path to the file I'm stat'ing, is there any
>> other operating system independent way to tell if I'm looking at a file in
>> afs?
>>
>> stat can return directory, link, file types. Are there other codes that
>> could be use to test for 'inAFS'?
>>
>> --
>> David Bear
>> College of Public Programs at ASU
>> 602-464-0424
>>
> Hi David,
>
> fs lq returns useful error codes:
>
> [kim@angel bo]$ fs lq
> Volume Name                   Quota      Used %Used   Partition
> user.k.kim                 no limit  23928220    0%         60%
> [kim@angel bo]$ echo $?
> 0
> [kim@angel bo]$ cd /
> [kim@angel /]$ fs lq
> Volume Name                   Quota      Used %Used   Partition
> fs: Invalid argument; it is possible that . is not in AFS.
> [kim@angel /]$ echo $?
> 1
> [kim@angel /]$
>
>
> Kim
>
>


-- 
David Bear
College of Public Programs at ASU
602-464-0424

------=_Part_10566_29890369.1214411177894
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Thanks. This is an interesting way to do it and it retains os independence.<br><br>Can anyone tell me was return codes the fs command has? (error levels that it passes back to the calling shell)<br><br><div class="gmail_quote">
On Wed, Jun 25, 2008 at 8:39 AM, Kim Kimball &lt;<a href="mailto:dhk@ccre.com">dhk@ccre.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
David Bear wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
aside from taking the full path to the file I&#39;m stat&#39;ing, is there any other operating system independent way to tell if I&#39;m looking at a file in afs?<br>
<br>
stat can return directory, link, file types. Are there other codes that could be use to test for &#39;inAFS&#39;?<br>
<br>
-- <br>
David Bear<br>
College of Public Programs at ASU<br>
602-464-0424 <br>
</blockquote>
Hi David,<br>
<br>
fs lq returns useful error codes:<br>
<br>
[kim@angel bo]$ fs lq<br>
Volume Name &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Quota &nbsp; &nbsp; &nbsp;Used %Used &nbsp; Partition<br>
user.k.kim &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; no limit &nbsp;23928220 &nbsp; &nbsp;0% &nbsp; &nbsp; &nbsp; &nbsp; 60%<br>
[kim@angel bo]$ echo $?<br>
0<br>
[kim@angel bo]$ cd /<br>
[kim@angel /]$ fs lq<br>
Volume Name &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Quota &nbsp; &nbsp; &nbsp;Used %Used &nbsp; Partition<br>
fs: Invalid argument; it is possible that . is not in AFS.<br>
[kim@angel /]$ echo $?<br>
1<br>
[kim@angel /]$<br><font color="#888888">
<br>
<br>
Kim<br>
<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>David Bear<br>College of Public Programs at ASU<br>602-464-0424

------=_Part_10566_29890369.1214411177894--