Linux-ls (LL)-alias

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.