fstyp command
You can use the fstyp command to find out what filesystem a device is.
# fstyp /dev/rdsk/c0d0s0
ufs
You could also use a shell script like so to determine all devices in the /dev/rdsk directory:
for i in /dev/rdsk/*; do echo “$i = $(fstyp $i 2>/dev/null)”; done
September 1st, 2006 at 4:52 pm
Hi Derek,
I am new to solaris and shell scripting. When I looked to your shell script, I see that you wrote 2>/dev/null through the end. I was wondering what does this do exactly?
Because when I replace that part with nothing I get more information (some of them are not necessary).
Thanks
Deniz Rende
September 2nd, 2006 at 9:09 am
Deniz,
Look up standard input and output on Unix.
2>/dev/null means it is redirecting standard error (any output that is considered an error) to /dev/null
0 = standard input
1 = standard output
2 = standard error
September 5th, 2006 at 9:46 am
Thank you so much Derek!