Professional Documents
Culture Documents
Marks –30
LINUX OPERATING SYSTEMS
Ans. Today Linux is being incorporated into many ST/IT environments as a part of improvements
in efficiency, security and cost savings. There are so many advantages of Linux operating
systems as follows:-
Q.3 What is i-node number? Which all information will be present in i-node of a file?
Ans. In Linux file system each file is represented by an i-node which is a kind of serial number
containing information about the actual data that makes up a file: to whom this file belongs,
and where is it located on the hard disk.
These are the information’s present n the i-node:-
• Owner and group owner of the file.
• File type (regular, directory,…).
• Permissions on the file.
• Date and time of creation, last read and change.
• Date and time this information has been changed in the i-node.
• Number of links to this file.
• File size.
• An address defining the actual location of the file data
The only information not included in an i-node, is the file name and directory. These are stored
in the special directory file.
Q.4 Which alias of ls command is used to set different colors to files based on there type?
What does following color code signify?
Color File Type
Blue ?
Red ?
White ?
Pink ?
Cyan ?
Yellow ?
Green ?
Flashing Red ?
Ans. The command color-ls is for alias of ls command used to set different colors to files based on
there type.
The following color codes signify these file type:-
Q.5 Explain the concept of Hard-Link and Soft-Links with help of a Block diagram.
Ans. Hard link: Associate two or more file names with the same i-node. Hard links share the
same data blocks on the hard disks, while they continue to behave as independent files.
There is an immediate disadvantage: hard links can’t span across partitions, because
i-node numbers are only unique within a given partition.
Soft link: Soft link or symbolic link, a small file that is a pointer to another file. A symbolic
link contains the path to the target file instead of a physical location on the hard disk. Since i-
nodes are not used in this system, soft links can span across partitions.
Hard disk
Q.1 Name different file permissions that can be assigned to a UNIX file? Interpret the meaning of
following commands:
$ chmod 776
$ chmod u+rw, g-w, o-x
Ans.File access permissions refer to the permissions associated with a file. There are three types
of file permissions:
• Command for all permission to the file owner:
$ chmod u+rwx
• Read permission: This allows a user to list the content of a directory.
Command for read permission to the file owner:
$ chmod o+r
• Write permission: This allows a user to
o Copy files to the directory
o Remove files from the directory
o Rename the files in the directory
o Make a sub directory
o Remove a sub directory from the directory
o Move file to and from the directory.
SUID: It stands for set user ID. It is represented by the character s in the user or group
permission field. When this mode is set on an executable file, it will run with the user and group
permission on the file instead of with those of the user issuing the command, thus giving access to
system resources.
SGID: It stands for set group ID. In this special case every file created in the directory will
have the same group owner as the directory itself (while normal behavior would be that neew files
are owned by the users who create them). This way, users don’t need to worry about file ownership
when sharing directories. This is the standard way of sharing files in UNIX.
bg
fg
kill
Ans. Bg: The ‘bg’ command is used to reactivate a suspended program in the background.