Search This Blog

Showing posts with label File System.. Show all posts
Showing posts with label File System.. Show all posts

Wednesday, May 4, 2011

How to check filesystem type ?

You can run below command to check linux file system.

# df -hT
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/sda2     ext3     39G  1.1G   36G   3% /
/dev/sda1     ext3     99M   46M   49M  49% /boot
tmpfs        tmpfs    2.6G     0  2.6G   0% /dev/shm
none         tmpfs    2.5G  328K  2.5G   1% /var/lib/xenstored
NASSERVER01:/
export/share1
               nfs    5.3T  3.0T  2.3T  58% /var/ovs/mount/D0122C0A025346218D9E9574667D34ADNASSERVER01:/export/share2
               nfs    250G  191G   60G  77% /var/ovs/mount/DCB311A73E6E4053A116E02A47D802F8

(
-h : used for human readable output
-T : --print-type
print file system type
)



THe same command can be used for showing POXFIX output( One line)

Just append P.
# df -hTP
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/sda2     ext3     39G  1.1G   36G   3% /
/dev/sda1     ext3     99M   46M   49M  49% /boot
tmpfs        tmpfs    2.6G     0  2.6G   0% /dev/shm
none         tmpfs    2.5G  328K  2.5G   1% /var/lib/xenstored
NASSERVER01:/
export/share1    nfs    5.3T  3.0T  2.3T  58% /var/ovs/mount/D0122C0A025346218D9E9574667D34AD 
NASSERVER01:/export/share2 nfs    250G  191G   60G  77% /var/ovs/mount/DCB311A73E6E4053A116E02A47D802F8
 

There are more such examples @ http://www.thegeekstuff.com/2012/05/df-examples/?utm_source=feedburner&utm_medium=email&utm_campaign=Feed%3A+TheGeekStuff+%28The+Geek+Stuff%29

Please Leave us with your comments and Queries /Suggestions.
           I will try to reply asap.

Sunday, September 26, 2010

Linux File System.

1) /

Only root user has write access under this directory .


# ls -ld /
drwxr-xr-x 36 root root 4096 Jul 23 13:06 /


many users assume it as root's home directory .
roots home directory is /root and not /.
# echo $HOME
/root


2) /bin

This directory contains the most commonly used commands.
The commands in this directory are used by almost all the users in the linux system.
For example .
ls ,cp,mv,grep.

# which cp
/bin/cp
# which grep
/bin/grep
# which mv
/bin/mv
# which ls
/bin/ls

{
Note : Which used to find the location of command.
In above example cp,grep,mv and ls commands are stored in /bin directory.
}

Therefore they are called as user binaries.

3) /sbin

This directory contains commands that are normally used by system administrators.

Commands like iptables (Used to modify firewall setting),ifconfig (Used to change ip address of machine) , fdisk (Used to make filesystem level changes) and many more.....

# which iptables
/sbin/iptables
# which ifconfig
/sbin/ifconfig
# which fdisk
/sbin/fdisk

Therefore they are called as System binaries.

A good article on linux directory structure can be found here.
http://www.thegeekstuff.com/2010/09/linux-file-system-structure/?utm_source=feedburner&utm_medium=email&utm_campaign=Feed%3A+TheGeekStuff+%28The+Geek+Stuff%29