Home > Article > Operation and Maintenance > what does dir mean in linux
In Linux, dir means "list the contents of the current directory" and is the English directory abbreviation of the directory; this command was originally a dos command, and Linux has chosen to be compatible with this command. Its function is the same as the ls command. Similarly, any user can use this command in the terminal, the syntax is "dir [option] [directory name]".
#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
ls (abbreviation for list) command can list the contents of the current directory. The dir command is an alias of the ls command and the abbreviation of directory. Usually the listed files are displayed in different colors, and different colors represent different file types. The following table lists the correspondence between file types and colors.
ls or dir command: list the contents of the current directory
dir is the original dos command. Linux has chosen to be compatible with this dos command, so dir and ls are in Functionally the same! The only difference is the origin
1. Linux dir command usage permissions
Any user can use the "dir" command in the terminal.
2. Linux dir command usage format
The format of using the dir command in the terminal is: dir [option] [directory name] (no square brackets when used)
3. Linux dir command function
The function of the dir command is similar to that of the ls command, but there are fewer command parameters. You can use "dir –help" to view the related information of the dir command. parameter.
4. Example
For example, list the detailed information of all contents in "/home/cc/Ruijie". The following commands are available.
[cc@cc ~]$ dir -l /home/cc/Ruijie
The following is the displayed content:
[cc@cc ~]$ dir -l /home/cc/Ruijie 总计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 2005-08-31 xrgsu [cc@cc ~]$
Related recommendations: "Linux Video Tutorial"
The above is the detailed content of what does dir mean in linux. For more information, please follow other related articles on the PHP Chinese website!