Friday, October 16, 2009

UNIX - File System

UNIX - File System


The Unix file system includes directories containing files and directories, each directory of which can contain yet more files and directories. Our own home directory, how ever , probably doesn't contain any directories(except . and .. of course) which prevents us from exploiting what call the virtual file cabinet of the file system.

Managing files system is one of the important task of the system Administrator.
Unix file system when originally designed to favor its users. Unix file systems look like an inverted tree, So that a root is at top and then branches underneath it.

Major tasks for the system administrator's are:
->Making files available to the users.
->Managing and monitoring the system's disk resources.
->Protecting against file corruption, hardware failures, user errors through backup.
->Security of these file systems, what users need and have access to which files.
->Adding more disks when needed.
->Configuring the printers.


When Unix OS is installed , some directories depending upon the Unix being installed are created under / (or Root), such as /usr /bin /etc /tmp / home /var.

We will have a look on each and every file or directory in this hierarchy:

etc -> Contains all the system configuration files and the files which maintain information about users and groups.
bin -> Contains all binary executables files(command that can be used by normal user also).
usr -> Default directory provided by Unix OS to create users home directories and contains manual pages.
tmp -> System or users create temporary files which will be removed when the server reboots.
dev -> Contains all devices files i,e Logical file names to physical devices.
devices -> Contains all device files i,e physical names to physical devices.
home -> Default directory allocated for the home directories of normal users when the administrator don't specify any other directory.
var -> Contains all system log files and message files.
sbin -> Contains all system administrator executable files (Command which generally normal users don't have the privileges)


(Please visit my blog for the next post on the Unix File Types)

UNIX Operating System Overview

UNIX Operating System Overview

The UNIX Operating system was designed to let a number of programmers access the computer at the same time and share its resources. The Operating system co-ordinates the use of the computer's resources, allowing one person, for example, to run a spell check program while another creates a document, let another edit a document while another create graphics, and let another user format a document---all at the same time, with each user obilivious to the activities of the others.

The operating system controls all of the commands from all of the keyboards and all of the data being generated, and permits each user to believe he or she is the only person working on the computer. This real time sharing of resources makes UNIX one of the most powerful operating systems ever.

Although UNIX was developed by programmers for the programmers, it provides an environment so powerful and flexible that it is found in businesses, science's, academics and industries.

The features that made UNIX a hit are:-

->Multi-Tasking Capability
->Multi-User Capability
->Portability
->Unix Programs
->Library of application Software
->In the UNIX, the "operating system" contains many of utilities along with the master control program known as kernel



(Please visit my blog for the next post on the Unix File System)

Monday, October 5, 2009

Linux Hard Disk Format Command

There are total 4 steps involved for hard disk upgrade and installation procedure:

Step #1 : Partition the new disk using fdisk command
Following command will list all detected hard disks:

# fdisk -l | grep '^Disk'
Output:

Disk /dev/sda: 251.0 GB, 251000193024 bytesDisk /dev/sdb: 251.0 GB, 251000193024 bytesA device name refers to the entire hard disk. For more information see Linux partition naming convention and IDE drive mappings.
To partition the disk - /dev/sdb, enter:

# fdisk /dev/sdb
The basic fdisk commands you need are:

m - print help
p - print the partition table
n - create a new partition
d - delete a partition
q - quit without saving changes
w - write the new partition table and exit
Step#2 : Format the new disk using mkfs.ext3 command
To format Linux partitions using ext2fs on the new disk:

# mkfs.ext3 /dev/sdb1
Step#3 : Mount the new disk using mount command
First create a mount point /disk1 and use mount command to mount /dev/sdb1, enter:

# mkdir /disk1# mount /dev/sdb1 /disk1# df -H
Step#4 : Update /etc/fstab file
Open /etc/fstab file, enter:

# vi /etc/fstab
Append as follows:

/dev/sdb1 /disk1 ext3 defaults 1 2Save and close the file.

Task: Label the partition
You can label the partition using e2label. For example, if you want to label the new partition /backup, enter

# e2label /dev/sdb1 /backup
You can use label name insted of partition name to mount disk using /etc/fstab:

LABEL=/backup /disk1 ext3 defaults 1 2


M.Srikanth
9347539405