what does dir mean in linux

WBOY
Release: 2022-05-09 16:23:05
Original
7213 people have browsed it

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]".

what does dir mean in linux

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

What does dir mean in Linux

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
Copy after login

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 ~]$
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!