Linux File Structure Part 2Published: 1/12/2009File StructureOnce a user has mastered the way Linux organizes it's files then the battle to understanding Linux has been won. Linux filing structure is not like windows because there is no c:\ drive to the hard drive or d:\ to the CDROM there is not even an a:\ to the floppy. The BasicsOperating Systems need to save data to the hard drive. This information must be organized. Details about the dates of tasks performed on the file are saved. This includes, date the file was created, date the file was modified, date the file was accessed and much more. This data has to be saved onto the hard drive in a logical manner. A computer system uses file structure type(FST), which dictates the way the data is stored. Windows common FST include VFAT, FAT16, FAT32 and NTFS. NTFS is an advanced form of FST that can hold extra data about the files permissions. Details about file permissions will have been explained to you before you read this documentation. If not you must read file permissions. Linux FilesWhen you wish to use the CDROM drive it must first have a cdrom in the drive and data on the cdrom. To view the data you must mount the device to a given place of the Linux filing tree. Everything in Linux is a file. The whole partition of a hard drive is located in one file (/dev/hda). The whole CDROM is located in one file (dev/cdrom). The whole floppy drive is located in one file (/dev/fd0). This goes for all devices like sound cards, video graphics and usb devices. Users new to Linux are tempted to try and read the files (i.e /dev/fd0 for the floppy drive) directly. If this is done then every bit on the floppy drive will be read and displayed. This can have some benefits. Imagine a floppy disk that has had all its data deleted (not formatted). If you was to read this floppy directly vie /def/fd0 then all the data would open in one file. This is handy for restoring data. The above is easy if only text files was stored on the disk. If there were executables or graphics files then this data would be displayed and would not make sense to the reader. This is why a file system has to be mounted. Mounting the File System When a floppy drive is mounted the computer must know what type of data is stored on the disk and what File System Type was used. Floppy disks are normally formatted as FAT32 disks. The Linux operating system can guess what type of File System Type is in use and mount that data to /mnt/cdrom. When the user views the folder it will consist of all the separate files stored on the floppy; the system will be able to understand all valid files.
Most devices have to be mounted onto the filing system to be used. If you have a Digicam that is USB then the first step is to find its device within the /dev/ directory. This is a USB device so this can be mounted on one of the /dev/usb/ files within the Mandrake filing system. If not then it may be located within the /dev/scsi/ directory.
To mount this device login as root on the CLI terminal and enter the following commands. # mkdir /mnt/digicam # mount -t vfat /dev/usb/sba1 /mnt/digicam
The thing to note here is if the type and the location of the file within the /dev/ directory. These variable can normally be gained from a Internet search.
Related PostsLinux File StructureLast Updated: 1/12/2009Understanding the basic idea behind the Linux file structure can help but only if other people follow this idea! Read more... Pipe and RedirectionLast Updated: 1/12/2009The command line is not only a tool for bashing out program names but an elegant and intelligent environment. Some programming languages can be typed directly into the command line. Also tasks that take some time to execute in the background leaving Read more... Mounting a DriveLast Updated: 1/12/2009In Linux, like in UNIX, diskettes and CD-ROMs need to be mounted before they can be used. What mount does is to associate the devices (floppy or CD-ROM drives) to a mount point (a directory) in the root file system. The usual mount point for diskette Read more... Linux in a nut ShellLast Updated: 1/12/2009Why should we bother learning Linux shell command when we have GUI like KDE? Read more... |