Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Linux file system

Linux file system:

Figure

Root : it is an home directory of super user (root) administrator

Etc : it is the location of all configuration file and directory used for server

configuration or system configuration

dev : it is a location of the device file

home : it is a location of home directory or regular users

proc : it is a virtual file system or directory not actually store on the disk and

contain system information

# cat /proc/meminfo

# cat /proc/cpuinfo

boot : contain kernel and boot related files

sys : it is also a virtual directory and contain system information

media : it is a mount point of removable disk like cdrom floppy usb drive etc.

tmp : it contain all temporary file

usr : it is used for software installation

lib : it contain all library files

bin : it is the location of all executable files or command or user command

/usr/bin also contain user command

sbin : it contain all system command or super user command /usr/sbin

mnt : it is a mount point for physical hard-disk or partition

opt : optional directory and used for temporary working

var : it is a variable file system or directory and contain all log and error

message

file system type:

Dos : Fat 16

95/Xp/2000 : FAT32

Xp/NT/2000 : NTFS

Linux : EXT2,EXT3

UNIX : VXFS

k� K i u �� x�� "'># chmod ugo+rwx file/directory

  • # Chmod ugo-rwx file/directory
    • + is used to add permission
    • - is used remove permission

    chmod ugo=rw directory/file

    this command will assign read/write permission to u,g,o

    suppose we have one file as

    test.txt

    permission : -r- - r- -r- -

    chmod u=w,g=wx,o=w test.txt

    this command will assign write to user, write/execute to group and write to other while remove the previous permission.

    The main difference between +,= are + operator simply add the new permission with previous one and = assign the new permission while removing old (new permission overwrite an old)

    1. Numeric Method:

    In this method, calculation are based on following numbers

    r=4 w=2 x=1 0= no permission

    Example:

    #chmod 777 file/directory

    in this case user get 7 means that user has permission of read/write/execute, group get 7 means read/write/execute and ame for other

    # chmod 531 file/directory

    in this case user get 5 means that user has permission of read/execute, group get 3 means write/execute and other get 1 means that other has permission to execute.

    #chmod 742 file/directory

    7 : User : rwx

    4 :Group : r

    2 : Other : w



    This post first appeared on RED HAT ENTERPRISE LINUX, please read the originial post: here

    Share the post

    Linux file system

    ×

    Subscribe to Red Hat Enterprise Linux

    Get updates delivered right to your inbox!

    Thank you for your subscription

    ×