Username: Save?
Password:
Home Forum Links Search Login Register*
    News: Welcome to the TechnoWorldInc! Community!
Recent Updates
[April 24, 2024, 11:48:22 AM]

[April 24, 2024, 11:48:22 AM]

[April 24, 2024, 11:48:22 AM]

[April 24, 2024, 11:48:22 AM]

[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[February 14, 2024, 02:00:39 PM]
Subscriptions
Get Latest Tech Updates For Free!
Resources
   Travelikers
   Funistan
   PrettyGalz
   Techlap
   FreeThemes
   Videsta
   Glamistan
   BachatMela
   GlamGalz
   Techzug
   Vidsage
   Funzug
   WorldHostInc
   Funfani
   FilmyMama
   Uploaded.Tech
   MegaPixelShop
   Netens
   Funotic
   FreeJobsInc
   FilesPark
Participate in the fastest growing Technical Encyclopedia! This website is 100% Free. Please register or login using the login box above if you have already registered. You will need to be logged in to reply, make new topics and to access all the areas. Registration is free! Click Here To Register.
+ Techno World Inc - The Best Technical Encyclopedia Online! » Forum » THE TECHNO CLUB [ TECHNOWORLDINC.COM ] » Computer / Technical Issues » Operating Systems » Windows
 File system commands
Pages: [1]   Go Down
  Print  
Author Topic: File system commands  (Read 1032 times)
Taruna
Elite Member
*****



Karma: 13
Offline Offline

Posts: 845

Hi ALL


View Profile
File system commands
« Posted: January 03, 2007, 01:48:59 PM »


In previous article we saw overall picture of linux commands. From this on wards we see commands by category.
I am starting with File system commands.

In Linux everything is viewed as file or process. File is the abstract concept which means the place for storing permenent data. Process the program in execution.

File system is the system for storing information regarding files. There are various kinds of file systems.
adfs, affs, autofs, coda, coherent, cramfs, devpts, efs,ext, ext2, ext3, hfs, hpfs, iso9660, jfs, minix, msdos, ncpfs,nfs, ntfs, proc, qnx4, ramfs, reiserfs, romfs, smbfs, sysv, tmpfs, udf, ufs, umsdos, vfat, xenix, xfs, xiafs are the some examples of file systems. I am not going in depth of file system.

In general ext3 is the file system used for file system in hard disk. iso9660 is the file system used in cdrom.

There are virtual file systems like proc. Proc is not actually file sytem,It receives information regarding the system from kernel.

Devices connected to computer system are also files in linux. These are called device files for example /dev/mouse is the device file for mouse. To read data from mouse just read data from /dev/mouse like reading data from regular file.

your hard disk is also a device, so it contains device special file. /dev/hda is the primary disk connected to IDE controller 0. /dev/hdb is secondary disk connected to IDE controller 0. /dev/hdc, /dev/hdd are the primary and secondary disks connected to IDE controller 1.

Creating file system
Generally Hard disk is partioned into different pieces and in each piece we can create different file systems.
In linux partion named swap is the special partion used as extension of RAM. Generally it is double the size of RAM. System performance is also depend on size of swap partion.
partitions are named as /dev/hda1, /dev/hda2, /dev/hda3..
For creating partitions use the command fdisk. I am assuming that you know how to partion the hard disk. For linux in worst case two partitions are enough. One is the root partittion and another one is swap. Already I discussed about swap come to root partition. Every partition has to mount on some directory to access the data on that partition. In linux / is called root directory. The partition which is mounted at root directory root partition. Remaining partitions have to be mounted on some directory under root for example /x .
Linux file system starts with /, the root directory. All other directories are children of this directory. The partition which the root file system resides on is mounted first during boot and the system will not boot if it doesn t find it. / contains these sub-directories:

bin/ dev/ home/ lost+found/ proc/ sbin/ usr/ cdrom/ opt/ vmlinuz boot/ etc/ lib/ mnt/ root/ tmp/ var/ dvd/ floppy/ initrd/ /tftpboot

/ -- the root directory
/bin Essential command binaries
/boot Static files of the boot loader
/dev Device files
/etc Host-specific system configuration
/lib Essential shared libraries and kernel modules
/mnt Mount point for mounting a filesystem temporarily
/opt Add-on application software packages
/sbin Essential system binaries
/tmp Temporary files
/usr Secondary hierarchy
/var Variable data
/home User home directories
/root Home directory for the root user
/lost+found is special directory in every partition. I think it requires some explanation.
Linux should always go through a proper shutdown. Sometimes your system might crash or a power failure might take the machine down. Either way, at the next boot, a lengthy filesystem check using fsck command will be done. Fsck will go through the system and try to recover any corrupt files that it finds. The result of this recovery operation will be placed in this directory. The files recovered are not likely to be complete or make much sense but there always is a chance that something worthwhile is recovered. Each partition has its own lost+found directory. If you find files in there, try to move them back to their original location. If you find something like a broken symbolic link to file , you have to reinstall the file/s from the corresponding RPM, since your file system got damaged so badly that the files were mutilated beyond recognition. Below is an example of a /lost+found directory. As you can see, the vast majority of files contained here are in actual fact sockets. As for the rest of the other files they were found to be damaged system files and personal files. These files were not able to be recovered.

total 368
-rw-r--r-- 1 root root 110891 Oct 5 14:14 #388200
-rw-r--r-- 1 root root 215 Oct 5 14:14 #388201
-rw-r--r-- 1 root root 110303 Oct 6 23:09 #388813
-rw-r--r-- 1 root root 141 Oct 6 23:09 #388814
-rw-r--r-- 1 root root 110604 Oct 6 23:09 #388815a
-rw-r--r-- 1 root root 194 Oct 6 23:09 #388816
srwxr-xr-x 1 root root 0 Oct 6 13:00 #51430
srwxr-xr-x 1 root root 0 Oct 6 00:23 #51433
-rw------- 1 root root 63 Oct 6 00:23 #51434
srwxr-xr-x 1 root root 0 Oct 6 13:00 #51436
srwxrwxrwx 1 root root 0 Oct 6 00:23 #51437
srwx------ 1 root root 0 Oct 6 00:23 #51438
-rw------- 1 root root 63 Oct 6 13:00 #51439
srwxrwxrwx 1 root root 0 Oct 6 13:00 #51440
srwx------ 1 root root 0 Oct 6 13:00 #51442
-rw------- 1 root root 63 Oct 6 23:09 #51443
srwx------ 1 root root 0 Oct 6 10:40 #51445
srwxrwxrwx 1 root root 0 Oct 6 23:09 #51446
srwx------ 1 root root 0 Oct 6 23:09 #51448

Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Copyright © 2006-2023 TechnoWorldInc.com. All Rights Reserved. Privacy Policy | Disclaimer
Page created in 0.146 seconds with 25 queries.