Linux Basic common commands ls detailed (including date,cal)

Source: Internet
Author: User

"1" displays the date of the instruction: date
Example:
(1) #date +%y/%m/%d
Results: 2018/02/27
(2) #date +%h:%m
Result: 10:48
"2" displays the calendar's instructions: Cal
format:
Cal [Month] [year]
Example:
(1) #cal 2 2018
(2) #cal 13 2018
Results: Cal:illegal Month Value:use 1-12
"3" File and directory view: LS
format:
ls [-aadffhilnrrst] file name or directory name
ls [--color=[never,auto,aiways]] file name or directory name
ls [--full-time] file name or directory name
options and Parameters:
-A: All files are listed together with the hidden file
-A: All files, but not included. With the. That means the current directory and home directory
-D: Lists only the directory itself, not the file data in the directory
-F: List results directly without sorting
-F: To give additional data display according to the information such as file, directory, for example (*): On behalf of executable file; (/): representative directory; (=): represents socket file; (|): Represents FIFO file
-H: List the file capacity in an easy-to-read manner (e.g. GB,KB, etc.)
-I: List inode numbers
-L: Long data format, including information such as properties and permissions for files
-N: Lists UID and GID numbers instead of user and group names
-r: Reverse output of the sort results, for example: original file name from small to large, reverse is from big to small
-r: List all the contents of subdirectories together
-S: Sort by size of file content, not by filename
-T: Sort by time rather than by file name
--color=never: Do not give color display based on file characteristics
--color=always: Display Color
--color=auto: Let the system decide whether to give the color according to the setting
--full-time: Includes year, month, day, hour, and minute outputs in full time mode
--time=[atime,ctime]: Output access time (atime) or Change permission attribute time (CTime) instead of content change time

Example:
(1) Ls-al ~
List all the files in the home directory, including attributes and hidden files
(2) Ls-alf--color=never ~
List all the files in the home directory, including properties and hidden files, show the type of the file, do not display the color
(3) Ls-al--full-time ~
List all the files in the home directory, including properties and hidden files, and display the full file modification time

Linux Basic common commands ls detailed (including date,cal)

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.