ls command
Use
LS is the short name of the list, listing all subdirectories and files in the target directory, and the default target directory prints out the current directory.
Usage
ls [options] [directory name]
-a,–all lists all files under the directory, including the. The beginning of the implied file-h,–human-readable the file size in an easy-to-understand format (for example, 1K 234M 2G)-h,–dereference-command-line Use the symbolic link in the command column to indicate the true destination-i,–inode Prints the inode number of each file,-K, as –block-size=1k, which represents the size of the file in K-byte form. -l lists the permissions, owner, file size, and so on, in addition to the file name. -r,–reverse in reverse order-r,–recursive lists all subdirectory tiers-s,–size the size of all files in block size-s sort by file size-T is sorted by file modification time-U is not sorted; Lists items in the original order of the file system-1 (number 1) list only one file per line
Example
1, Ls-t according to the file modification time order list file list. To reverse the order, add the-r option, namely: Ls-rt.
2, Ls-h/home/hejianchao/demo/*abc in a person easy to understand the size of the file to display the/home/hejianchao/demo directory of the list of files ending with ABC.
I usually use the ll simplified method to execute the LS command directly, LL, according to my settings, is equivalent to Ls-l.
Here's the way to learn about alias usage. Alias is used to set the alias for the command:
Command Line input: Alias ll= ' Ls-l ' then in this terminal you can replace the ls-l with LL (will not be effective on other terminals). If you want to take the current account for a long time, you can
Add alias ll= ' Ls-l ' to the home directory of your current account. barsh_profile files are valid for the current account for a long time.
Add alias ll= ' Ls-l ' to the/ETC/.BASHRC file then take effect for all accounts
Command line input Unalias ll temporarily cancel this alias setting
Delete or comment out the alias configuration value in the configuration file permanently delete command line input alias view current user settings alias command
Linux-ls (LL)-alias