Linux Common Commands--ls

Source: Internet
Author: User
ls list 列出目录的内容及其属性

Syntax format: mkdir "option" "File" ls [option] [file or directory]
Attention:
1.mkdir commands and subsequent options and directories, each of which must have at least one space between each element
2. The options and directory files following the command can be omitted, indicating the file information for viewing the current path
Parameter options:-l,-a,-t,-r,-d,-h
Learn:-p,-f can filter directories.
-P Add "/" to the directory to differentiate the directory
-F Add a different identity to different types of files
Ls-la Show details that contain hidden files

LS-LD data shows the details of this directory, not the

LS-LH display the size of a file or directory in a direct, readable form

ls命令输出内容的属性,以 -lhi 为例

Ls-lhi find a set of detailed information with explicit size and inode values

First column: Inode index node label
Second column: File types and Permissions
Column three: number of hard links
Column Fourth: The user to which the file or directory belongs
Fifth column: The group to which the file or directory belongs
Sixth column: Size of the file or directory
第七、八、九 column: File or directory modification time
Tenth column: file or directory name
Case one:
Find files that have been recently updated
Ls-lrt/home

Without flipping the screen, the last line of the last screen is the file you need to find
Case TWO:
Show full Time Properties
Ls-l--time-style=long-iso

Long-iso as a format for displaying time
Case THREE:
Delete garbage that occupies inode nodes
ls | Xargs rm-f
The reason is that if the file is very much used directly RM-RF * is not deleted

Linux Common Commands--ls

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.