[OpenAFS] how do I know if I'm in AFS
Kim Kimball
dhk@ccre.com
Wed, 25 Jun 2008 09:39:50 -0600
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