What does ls mean in linux

WBOY
Release: 2022-03-15 15:43:52
Original
12104 people have browsed it

ls in Linux is the abbreviation of "list files", which means listing files. The ls command is used to display the contents of the specified working directory and list the files and subdirectories contained in the current working directory. The syntax is "ls [-alrtAFR] [name...]".

What does ls mean in linux

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

What does ls mean in Linux

Linux ls (English spelling: list files) command is used to display the contents of the specified working directory (list the files and subtitles contained in the current working directory) Table of contents).

Syntax

 ls [-alrtAFR] [name...]
Copy after login

Parameters:

  • -a Display all files and directories (hidden files starting with . will also be listed)

  • -l In addition to the file name, the file type, permissions, owner, file size and other information are also listed in detail

  • -r Replace the file with Display in reverse order (originally in English alphabetical order)

  • -t List the files in order of creation time

  • -A Same -a, but do not list "." (current directory) and ".." (parent directory)

  • -F Add a symbol after the listed file name; for example, you can Add "*" to the executable file, and "/"

  • -R for the directory. If there are files in the directory, the following files will also be listed in sequence

Example

List all directories under the root directory (\):

# ls /
bin               dev   lib         media  net   root     srv  upload  www
boot              etc   lib64       misc   opt   sbin     sys  usr
home  lost+found  mnt    proc  selinux  tmp  var
Copy after login

List all files in the current working directory whose names begin with s, the newer the files, the more recent they are. Behind:

ls -ltr s*
Copy after login

Related recommendations: "Linux Video Tutorial"

The above is the detailed content of What does ls 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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template