Get the App
SLTechnology News&Howtos  ›  Servers  › 

What does dir mean in linux

Shulou Source: shulou.com Published: 2022-05-31 10:46:03 09月21日 Update

Most people do not understand the knowledge of this article "what dir refers to in linux", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "what dir refers to in linux" article.

In linux, dir means "list the contents of the current directory" and is the directory abbreviation of the directory; the command was originally a command of dos, and linux chose to be compatible with the command, and the function of the ls command is the same, any user can use the command in the terminal, and the syntax is "dir [option] [directory name]".

The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

What does dir mean in linux

The ls (abbreviation for list) command lists the contents of the current directory. The dir command is an alias for the ls command and an abbreviation for directory. Usually listed files are displayed in different colors, and different colors represent different file types. The following table lists the corresponding relationship between file types and colors.

Ls or dir command: lists the contents of the current directory

Dir is the command of the original dos, and Linux chooses to be compatible with this dos command, so dir and ls are functionally the same! It's just that the origin is different.

I. the right to use the Linux dir command

Any user can use the "dir" command on the terminal.

Second, the format of Linux dir command

The format of using the dir command on the terminal is: dir [option] [directory name] (without square brackets)

Third, Linux dir command function

The function of the dir command is similar to that of the ls command, except that the command parameters are relatively few, and you can use "dir-help" to view the relevant parameters of the dir command.

Fourth, give examples

For example, list the details of everything in "/ home/cc/Ruijie". The following command is available.

[cc@cc ~] $dir-l / home/cc/Ruijie

Here is what is displayed:

[cc@cc] $dir-l / home/cc/Ruijie Total 2168-rwxr-xr-x 1 cc cc 112876 2008-06-26 libpcap.so.0.6.2-rwxr-xr-x 1 cc cc 737192 2008-06-26 libstdc++.so.5-rwxr-xr-x 1 cc cc1938 2004-04-23 readme.txt-rwxr-xr-x 1 cc cc 1350772 08-31 xrgsu [cc@cc] $above is the content of the article "what does dir mean in linux" I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please pay attention to the industry information channel.

Tags: Command content directory function middle finger different file terminal abbreviation color parameter meaning article format user directory name knowledge article type selection Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Shulou Technology Docker Xiaomi Microsoft