Filesystem 1 File Hierarchy The Unix system consists

  • Slides: 7
Download presentation
Filesystem 1

Filesystem 1

File Hierarchy • The Unix system consists of files. These can be ordinary files,

File Hierarchy • The Unix system consists of files. These can be ordinary files, directories, special files and links to name a few. A directory is simply a file that contains information about other files. • The top level of the file hierarchy is referred to as the root( or /). The root directory typically contains several other directories such as /bin, /sbin and /lib. 2

The Linux Filesystem Layout • The basic layout of the filesystem starts with the

The Linux Filesystem Layout • The basic layout of the filesystem starts with the root directory. –root directory : this is the base of the file system's tree structure. –/bin : binary files for the OS –/dev : the device files –/etc : system configuration files –/sbin: system administrative binaries –/home : conventional location for users’ home directories. –lost+found : storage for recovered files 3

root • Every part of the UNIX file system can eventually be tracked back

root • Every part of the UNIX file system can eventually be tracked back to one central point, the root. • The file system, however, may be spread over several physical devices; different parts of file hierarchy may exist on totally separate partitions, disks, CD-ROMs, network file systems, floppy disks and other devices. These systems can be connected at startup or connected as and when necessary. 4

The Linux Filesystem Layout • –/mnt: empty directory for temporarily mounting • –/tmp: temporary

The Linux Filesystem Layout • –/mnt: empty directory for temporarily mounting • –/tmp: temporary directory • –/usr : contains subdirectories for locally generated programs, and third party tools • –/var: spooling and other variable directories • –/lib : main OS shared libraries and kernel modules • –/root : home directory for the super-user (linux) • -/swap • -/proc 5

File Types • • Regular Files Directories Character device files Block device files Local

File Types • • Regular Files Directories Character device files Block device files Local domain sockets Named pipes (FIFOs) Symbolic links 6

Commonly used command/concepts • • mount/umount ls: different options ln df fuser tree chmod,

Commonly used command/concepts • • mount/umount ls: different options ln df fuser tree chmod, chown, chgrp 7