Differences between ll and ls in linux

Source: Internet
Author: User
The results listed in ll are detailed, including time, whether the data can be read or written, like in windows, the detailed information ls only lists the file name or directory name, just like in windows, the list ll-t is in descending order, ll-t | tac is in ascending order ll is not a command, is the alias of ls-l www.2... information
The results listed in ll are detailed, including time, whether the data can be read or written, like in windows, the detailed information ls only lists the file name or directory name, just like in windows, the list ll-t is in descending order, ll-t | tac is in ascending order ll is not a command, is the alias of ls-l www.2cto.com ls command. it can be said that it is one of the most commonly used commands in linux. -A lists all files in the directory, including hidden files starting. -B lists non-output characters in the file name in the form of a backslash and a character number (just like in C. -C: The time when the I node of the output file is modified and sorted accordingly. -D: Display the directory like a file instead of the file under it. -E outputs all the information of the time, rather than the brief information. -F-U does not sort the output files. -G is useless. -I: index information of the I node of the output file. -K indicates the file size in the form of k bytes. -L list the details of a file. -M horizontal output file name, with "," as a grid character. -N is replaced by the UID and GID of the number. -O displays the details of the file except the group information. -P-F attaches a character to each file name to indicate the file type. "*" indicates an executable normal file, and "/" indicates a directory; "@" indicates the symbolic link; "|" indicates the OS; "=" indicates the intercept (sockets ). -Q used? Replace non-printable characters. -R sorts directories in reverse order. Www.2cto.com-s outputs the file size after each file name. -T is sorted by time. -U is sorted by the time when the file was last accessed. -X is output by column and sorted horizontally. -A displays all files except "." and. -B does not output "~" End of the backup file. -C is output by column and vertically ordered. -G indicates the group information of the output file. -L list the link file names instead of the linked files. -N does not limit the file length. -Q: enclose the output file name in double quotation marks. -R: list all files in subdirectories. -S is sorted by file size. -X is sorted by the file extension (the character after the last. -One line outputs only one file. -- Color = no: the color file name is not displayed. -- help displays help information on the standard output. -- Version outputs the version information on the standard output and exits. List only subdirectories 1. ls-F | grep/$ or alias sub = "ls-F | grep/$" (linux) 2. ls-l | grep "^ d" or ls-lL | grep "^ d" (Solaris) calculates the number of files and directories in the current directory.
The following command calculates the number of files and directories in the current directory respectively: # ls-l * | grep "^-" | wc-l ---- to count files # ls-l * | grep "^ d" | wc-l ----- to count dir display color directory list www.2cto.com open/etc/bashrc, add the following line: alias ls = "ls -- color"
The color directory list will be displayed as shown in Slackware when bash is started next time. the color meanings are as follows: 1. blue --> directory 2. green --> executable file 3. red --> compressed file 4. light blue --> link File 5. gray --> Other files ls-tl -- time-style = full-iso sshd ls-ctl -- time-style = long-isolinux ll and ls difference author cppmule

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.