Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have an NFS share which is shared across about two other machines. I recently realized that one of the servers isn't sharing the directory and is keeping files all for itself. Is there a way to see if the NFS share is mounted in the directory I think it is in?

share|improve this question
2  
I do not understand, are you looking for the mount command? –  andcoz Sep 12 '11 at 1:16
    
Yep, that's it. –  Naftuli Tzvi Kay Sep 12 '11 at 3:57
    
@andcoz: make it an answer :-) –  Stéphane Gimenez Sep 12 '11 at 20:33
    
mount -l works ;) –  Naftuli Tzvi Kay Sep 12 '11 at 21:16
add comment

2 Answers

up vote 4 down vote accepted

Maybe you are looking for

df .

When you are in the directory you want to know the mountpoint of?

share|improve this answer
    
+1 if you add mount -l to your answer ;) –  Naftuli Tzvi Kay Sep 12 '11 at 21:17
    
@TK Kocheran The mount command is another way to find out, but then you probably should do "mount -l | grep XXX" so you filter the output a little, and still you may have ambiguous output (if you have dirs with similar names). The df command will tell you where the current dir is mounted and what type so there is not ambiguity in this method. But the result should be the same... –  Johan Sep 13 '11 at 8:13
add comment

Straphka idea to use df will work well if you add some flags like the -T that shows filesystem type, (and maybe the -P for posix compability). And to top it off we can use awk to filter the output so we only print the type output column.

df -PTh . | awk '{print $2}'

or if you like to check up on a dir called smb/media/ in your homedir.

df -PTh ~/smb/media/ | awk '{print $2}'
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.