UNIX

Important Directory Or File In Linux

directory

Important Directory of Linux:

1. /bin:

It is a sub-directory that contain executable program file that related to Linux command.

2. /DEV:

It is a device file that contains device related processing files. It also maintains the input, output, memory and other resources related files.

3. /EPC:

It is a directory that contains extra file related information like password, user, and configuration etc.

4. /tmp:

It is a directory that contains temporary files which are deleted by the user. Linux system allows us to recover the deleted file from the system memory with help of temp directory.

5. /Lib:

It is a directory that contains the system related library files. Linux system allows our different files and library file to manage the programming concepts.

6. /mnt:

It is the directory that manages the mounting related device like CD-ROM, FD, PD. The system access the external device using this directory.

7. /user:

It is a way to store the user-related data file. The Linux operating system automatically creates a directory with username and store user-related data.

8. /kernel:

It is a directory that contains the kernel-specific code-related file. The kernel is the core of Linux operating system it is responsible for relocation, security input-output devices, and other resources.

File And Directory Name:

File And Directory Name in Linux
image source:-http://slideplayer.com

The data are stored in files and files are stored in a directory. The system defines the directory name in a particular pre-defined format.

  1. The character can be upto255.
  2. We may use the extension or not.
  3. We cannot use space.
  4. We can use lower or upper case but it is case sensitive.
  5. We can use special character into the file.
  6. We can excess the file with the particular identifier with the particular case.

Path Name:

It is a process to identify the particular file and directory from the particular location. The system uses pre-defined path or user-defined path to access the file or directory. The directory is known as the path name.

1. Absolute path:

It is a path that identifies the complete path of the directory or file from the start location as root.

2. Relative path:

It is a path name that indicates the location of the directory where the user currently worked. It means it displays the relative path of the existing file or directory.

Files And Directory Command:

Linux operating system allows us built-in commands to manage the user instructions that executed on the command prompt. The commands are defined small characters.

1. HOME:

It is a command that displays the absolute path of the current working location. It also processed as the environment variable.

2. Echo:

It is a command that displays the message and value of the variable.

echo “Hello”↵

echo $HOME↵

Note:- We use dollar $ symbol to display the value of the variable.

3. Pwd:

It is a command that displays the relative path of the file. It stands for present working dir.

Pwd↵

4. Mkdir:

It is a command that creates the new dir. In this, we pass a name of the dir as an identifier. We can also create sub-directories using this command.

Example:

mkdir Φ<dir name>

mkdir anna↵

mkdir anna banna Kanna nanna.

mkdir anna|banna|kanna|ganna↵

5. cd:

It is a command that allows changing the dir location. It means we open the existing dir. In this, we pass created dir name.

Example:

cd <created dir name>

cd anna↵

6. cd∅..:

It is a command that allows exiting from the current dir.

7. Rmdir:

It is a command that removes the dir from the current location. The dir should be removed. In this, we pass created directory name.

Example:

rm∅<created dir name>

8. Ls:

It is a command that displays the list of files and sub-directories of the current location.

Example:

option s↵

9. -l:

It is an option that displays the contents of a dir with complete information like file permission, file size, link files, file owner etc.

10. -w:

It displays the contents rows and column wise.

11. -r:

List the file and sub-directories with reverse order.

12. -t:

It displays the contents as time wise.

13. -a:

List the file and sub-directories with reverse order.

14. -c:

List the files with the modification time of i-node.

15. -i:

To display the i-node number of file and dir.

16. -Q:

Display the non-printable characters.

Ls∅[option]∅[path name]

Ls-l↵

Ls-i↵

Ls-i anna↵

 

About the author

Parichay

Add Comment

Click here to post a comment