LinuxFSTutorial

LinuxFSTutorial - General overview of the Linux file system...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
General overview of the Linux file system Files General A simple description of the UNIX system, also applicable to Linux, is this: “On a UNIX system, everything is a file; if something is not a file, it is a process.” This statement is true because there are special files that are more than just files (named pipes and sockets, for instance), but to keep things simple, saying that everything is a file is an acceptable generalization. A Linux system, just like UNIX, makes no difference between a file and a directory, since a directory is just a file containing names of other files. Programs, services, texts, images, and so forth, are all files. Input and output devices, and generally all devices, are considered to be files, according to the system. In order to manage all those files in an orderly fashion, man likes to think of them in an ordered tree-like structure on the hard disk, as we know from MS-DOS (Disk Operating System) for instance. The large branches contain more branches, and the branches at the end contain the tree's leaves or normal files. For now we will use this image of the tree, but we will find out later why this is not a fully accurate image. Sorts of files Most files are just files, called regular files; they contain normal data, for example text files, executable files or programs, input for or output from a program and so on. While it is reasonably safe to suppose that everything you encounter on a Linux system is a file, there are some exceptions. Directories : files that are lists of other files. Special files : the mechanism used for input and output. Most special files are in /dev , we will discuss them later. Links : a system to make a file or directory visible in multiple parts of the system's file tree. We will talk about links in detail. (Domain) sockets : a special file type, similar to TCP/IP sockets, providing inter- process networking protected by the file system's access control. Named pipes : act more or less like sockets and form a way for processes to communicate with each other, without using network socket semantics. The -l option to ls displays the file type, using the first character of each input line: jaime:~/Documents> ls -l
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
total 80 -rw-rw-r-- 1 jaime jaime 31744 Feb 21 17:56 intro Linux.doc -rw-rw-r-- 1 jaime jaime 41472 Feb 21 17:56 Linux.doc drwxrwxr-x 2 jaime jaime 4096 Feb 25 11:50 course This table gives an overview of the characters determining the file type: Table 3.1. File types in a long list Symbol Meaning - Regular file d Directory l Link c Special file s Socket p Named pipe b Block device In order not to always have to perform a long listing for seeing the file type, a lot of systems by default don't issue just ls , but ls -F , which suffixes file names with one of the characters “/=*|@” to indicate the file type. To make it extra easy on the beginning user, both the -F and --color options are usually combined, see the section called “More about ls” . We will use
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/01/2012 for the course CMP 426 taught by Professor Gwangs.jung during the Spring '12 term at CUNY Lehman.

Page1 / 48

LinuxFSTutorial - General overview of the Linux file system...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online