is there command to show the fs on a directory?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting is there command to show the fs on a directory?
# 1  
Old 09-05-2011
Question is there command to show the fs on a directory?

On Solaris, is there a command which can show the file system of a specific directory?

In a script, i need to figure out whether a directory or its parent directory is mounted as "NFS".

Is there a easy way to figure it out?
# 2  
Old 09-05-2011
# 3  
Old 09-05-2011
Try
Code:
stat -f .

and
Code:
stat -f -c "%T" .

(It works on linux)
# 4  
Old 09-05-2011
Thanks for it. But it seems "df <dir name>" not show the FS...i will check the other options.

---------- Post updated at 12:55 AM ---------- Previous update was at 12:55 AM ----------

Quote:
Originally Posted by yazu
Try
Code:
stat -f .

and
Code:
stat -f -c "%T" .

(It works on linux)
Thanks for the option. But seems "stat" not available in Solaris system

---------- Post updated at 01:06 AM ---------- Previous update was at 12:55 AM ----------

The issue is resolved by "df -n <dir name>"

Sample:

bash-3.00$ df -n /opt/test/
/opt : ufs

Great thanks all your help.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Show only the filenames under a directory without relative and absolute paths.

I am able to list all the filenames under a directory & its sub-directories except blent.tar on Linux find "/tmp/" -type f | grep -v blent.tar | rev | cut -d '/' -f1 | rev Desired Output: THIRDPARTYLICENSEREADME.txt javaws libjavaplugin_oji.so libjavaplugin_oji.so... (3 Replies)
Discussion started by: mohtashims
3 Replies

2. AIX

Command to show HMC of this lpar?

Does anyone know of a command that can be run on the lpar to show the name of the lpars managing HMC? We have a large environment and records a little old on which HMC manages which lpars....if i could login to an lpar and just issue a command to show me its managing hmc that would be great. (2 Replies)
Discussion started by: Foiled
2 Replies

3. Solaris

Show complete command on command line when we use 'ps'

Hi, When I query using ps -ef, the complete command is not displayed and is truncated. Can you please tell me a method to resolve this ? I have tried the below. ps -ef | cat ps -ef | grep imp >/tmp/t1.txt /usr/ucb/ps -auxw pargs <pid> /usr/ucb/ps -aefyl | grep imp Thanks (11 Replies)
Discussion started by: mk1216
11 Replies

4. Shell Programming and Scripting

How do I get an ls -l to not show the full directory path?

Hey I'm new to the forums here, and I'm seeking help for this script that I'm writing. When I do ls -l of a directory it shows the full pathname for files in it. For example, if the directory is /internet/post/forum/ and the file is topic, it currently shows internet/post/forum/topic. What's the... (3 Replies)
Discussion started by: unity04
3 Replies

5. Shell Programming and Scripting

How we can create the master file through shell to show the tree structure of the directory?

Can we create the master file that show the whole tree structure of the directory till a particular folder? Database that contains four sub repository Sybase,sql,oracle,mysql and sql and oracle contains two subrepostories Siebel and plsql and each repositories contains three folders... (1 Reply)
Discussion started by: rohit22hamirpur
1 Replies

6. UNIX for Dummies Questions & Answers

Group files by owner and show directory

Hello, i would like to find huge files and group them by owners. To find big files i use this command: ls -lR | sort -bnr +4 | head -n 75 which give me 75 biggest files, then i need to see in which subdirectory is every file. second thing i dont know is how to group those files by owner, could... (6 Replies)
Discussion started by: dealer1985
6 Replies

7. Shell Programming and Scripting

Grep command to show only process name

Can I modify the grep command to show only a process name? Currently I run ps -efa | grep chk_web to get the following: mousr 3395 1 0 09:36:06 pts/10 0:00 sh /var/opt/scripts/chk_web.sh Can this be changed in any way to get only: /var/opt/scripts/chk_web.sh or chk_web.sh. I... (3 Replies)
Discussion started by: runnerpaul
3 Replies

8. SuSE

Which command can be used to show running services?

Hi Dear Guys: I want to get a list of running services. Is there any command having this functionality? (3 Replies)
Discussion started by: crest.boy
3 Replies

9. UNIX for Dummies Questions & Answers

UFW show args command

In ubuntu man page there is this command. What are values of ARGS I can use? (0 Replies)
Discussion started by: mojoman
0 Replies

10. UNIX for Advanced & Expert Users

Possible to show in which directory a user can write?

Hi Gurus, is there a possibility to show where a user can write to? i want to see all directories where a user has permissions to write to. Kind Regards FranzB (0 Replies)
Discussion started by: FranzB
0 Replies
Login or Register to Ask a Question