A
file system (often also written as
filesystem) is a method for storing and organizing
computer files and the data they contain to make it easy to find and access them.
Whether the file system has an underlying storage device or not, file systems typically have directories which associate
file names with files, usually by connecting the file name to an index into a
file allocation table of some sort, such as
NTFS or
FAT for Windows, or an
inode in a
Unix-like file system. Directory structures may be flat, or allow hierarchies where directories may contain subdirectories. In some file systems, file names are structured, with special syntax for
filename extensions and version numbers. In others, file names are simple strings, and per-file
metadata is stored elsewhere.
"On a UNIX system, everything is a file; if something is not a file, it is a process."
Esstential Reading:
Chapter 3 from 'Introduction to Linux: A Hands on Guide" by Machtelt GarrelsHere is all about Linux files and the Linux filesystem.
Here are the basic Linux commands for beginners:
Command
| ls | Displays a list of files in the current working directory, like the dir command in DOS |
| cd directory | change directories |
| passwd | change the password for the current user |
| file filename | display file type of file with name filename |
| cat textfile | throws content of textfile on the screen |
| pwd | display present working directory |
| exit or logout | leave this session |
| man command | read man pages on command |
| info command | read Info pages on command |
| apropos string | search the whatis database for strings |
rm filename this command will remove an
unwanted file
A few comparisons between the
Linux and
Windows file systems:
A. In Linux, there is a single hierarchical directory structure - everything starts from the root directory - shown by a '/'. Linux places all partitions under the root directory by 'mounting' them under specific directories. In Windows, there are many partitions (e.g. different drives and devices) and then directories under these partitions. These various paritions are detected at boot and assigned a drive letter.
B. Under Linux, unless you mount a partition or a device, the system does not know the existence of that partition or device.C.
"Windows must be installed to and boot from a primary partition. There are a maximum of four primary partitions on a single hard disk (a computer with two hard disks can have eight primary partitions). Linux is better in this regard as it can be installed to and boot from either a primary partition or a logical partition. Logical partitions reside inside a special type of primary partition called an extended partition. There is no practical limit to the number of logical partitions that can exist on a single hard disk. Thus you can easily experiment with a dozen different Linux distributions by installing each one in a different logical partition. Windows must boot from the first hard disk. Here too Linux is better, it can boot from any hard disk in the computer." [from: http://www.michaelhorowitz.com/Linux.vs.Windows.html]
D. Linux is case sensitive!
E. On most Linux versions
ls is
aliased to color-ls by default. This feature allows to see the file type without using any options to
ls. To achieve this, every file type has its own color. The standard scheme is in /etc/DIR_COLORS:
Color-ls default color scheme
| blue | directories |
| red | compressed archives |
| white | text files |
| pink | images |
| cyan | links |
| yellow | devices |
| green | executables |
| flashing red | broken links |
More information is in the man page. The same information was in earlier days displayed using suffixes to every non-standard file name. Source:
http://tldp.org/LDP/intro-linux/html/sect_03_03.htmlHere is
an article on using the Windows Shell (DOS prompt).