Linux Files
Introduction
The Linux System treats every entity as a file. In a file we can find: executable programs, a data base etc. As we are used any file has a name and the name has no more than 255 characters and may have or not an extension. The file names may contain any character, without “/” which is used as a delimiter between file names . Also, a file name can begin with the “.” character and may contains as many “.” characters as we want.
Directories
A directory is a file too and may contains individual files and also directories. There are some operations we can make with directories:
- create a directory with the mkdir command
mkdir [path] directory-name
- delete a directory with the command rmdir
rmdir [path] directory-name
- view the directory content with the ls command
We can organize the directories in a hierarchical way. As I said, we can have the “.” character in a file name, but generally the files which begin with the point character are configuration files. The root directory is specified with the “/” character. This directory is settled when we install the operating system.
Every directory contains two files with special name:
- the directory with name “.” specifies the current file. This is the current working file.
- the directory with name “..” specifies the parent directory
The Linux system has a standard structure of directories:
- /bin: contains usual commands: ls, rpm, pwd etc
- /sbin: contains executable programs used by the system administrator
- /dev: contains system’s peripheral devices - /dev/hda -> represent the first IDE hard-disk, /dev/sda represent the first SCSI hard-disk, /dev/cdrom represent the CD-ROM
- /etc: includes configuration files and different system services. For example: /etc/passwd contains information about users (passwords etc).
- /usr: includes files used by different users, contains another directories: bin, sbin, lib, games, share
- /lib: contains libraries and modules
- /boot:
- /home: this contains one directory for any user. For example: /home/aida is the working directory for the aida user
- /mnt: it is used by the command mount for setting a set of external files. For example /mnt/floppy.
- /var: contains files used with different occasions
- /opt: contains big size software applications
- /proc: contains the virtual system of proc files and has one subdirectory for any existent process.
Accessing files
There are two methods for accessing files:
- the graphical one: using a windows manager. It can be used the Konqueror manager for KDE or Nautilus for GNOME. The allowed operations are: access the file content, delete file, rename file. One used files manager is Midnight Commander. We can launch this program using the mc command
- using some commands who allow executing necessary operations

RSS/XML