One, ls command usage:
ls List all files under current directory /home list all files in/home directory
Second, ls command parameters
-a View all files (including hidden files)
-d lists the directory itself instead of files within the directory when the directory is encountered (with-L)
-l Display as long list (details)
-r recursively displays subdirectory information
-h with-L, Output file size in an easy-to-read format (e.g. 1K 234M 2G)
-t Sort by modified time (newest in front)
-r reverse order
-f displays the file type while listing the list of files. These symbols include: "/" indicates a directory, "@" indicates a symbolic link to another file, "*" indicates an executable file, "|" Indicates that a FIFO named pipe file, "=" indicates a socket file, and nothing behind the normal file is added
ls–a // View All Files .. bash_history. Bash_profile. CSHRC . Bash_logout. Viminfo. bashrc. TCSHRC
// in Linux, all files that begin with. are hidden files, and the "." Represents the current directory, "..." Represents the previous level of the directory, in all directories, there will be "." and ".." These two hidden directories
Three, Ls-l detailed
Description: The role of ls–l is to view the file details
Total Usage: The number following the total amount refers to the sum of space (in bytes) of all the files in the current directory.
The file attribute field has a total of 10 letters, and the first character represents the type of file
Green----> represents executable file, red----> For compressed file, dark blue----> representative directory; light Blue-----> on behalf of linked files; Gray----> For other files
File type: the
-plain files, binaries
d directory
l Link file
b block device file (block), such as hard disk, CD-ROM, etc.
c character device files (character), such as keyboards, monitors, character terminals, etc.
p command pipeline file. Files related to shell programming.
s sock file. Files for interprocess communication, which are related to shell programming
Lrwxrwxrwx. 1 root root 7 November 18:07 RC--RC.D/RC
The 9 letters after the 1th character indicate the permission bit of the file or directory
R table is read (read), W for write (write), X for Execute (EXECUTE)
The first three bits are the owner (user), the middle three is the owning group, and the last three bits are other users (others)
lrwxrwxrwx 1 root root 4 08-03 08:27 bexit-> Exit
1 is a file, if it is a directory, it indicates the number of subdirectories contained in the directory
lrwxrwxrwx 1 Root root 4 08-03 08:27 bexit-> Exit
This field indicates which user this file belongs to
lrwxrwxrwx 1 root root 4 08-03 08:27 bexit-> Exit
The group where the file (directory) owner resides
lrwxrwxrwx 1 root root 4 08-03 08:27 bexit-> Exit
Space occupied by the file (in bytes)
lrwxrwxrwx 1 root root 4 08-03 08:27 bexit-> Exit
File (directory) last accessed (modified) time
Drwxr-xr-x. 2 root root 4096 November 18:12 rpm
File name (if it is a symbolic link, then there will be a "-" arrow symbol, followed by the root of the file it points to, equivalent to a hyperlink)
Linux command: LS