Common Linux commands (Others)-General Linux technology-Linux technology and application information. For details, refer to the following section. Echo command
The echo command is used to display a piece of text on the monitor, which generally serves as a prompt.
The general format of this command is echo [-n] string.
Option n indicates that the output text does not wrap. Strings can be enclosed by quotation marks or no quotation marks. When you use the echo command to output a string with quotation marks, the string is output as is. When you use the echo command to output a string without quotation marks, each word in the string is output as a string, each string is separated by a space.
Cal command
The cal command displays the calendar of a month.
The common format of this command is cal [Option] [month [year]. The meaning of each option in the command is:
-J indicates that each day in a given month is the day of the year (from January 1, January 1 ).
-Y: displays the calendar of the entire year.
Date command
The date command displays and sets the system date and time.
The general format of this command is: date [Option] display time format (starting with +, followed by format)
Date: set the time format
The meanings of the options in the command are as follows:
-D datestr, -- date datestr displays the date described by datestr
-S datestr, -- set datestr to set the date described by datestr
-U, -- universal Display or set the universal Time
Time Domain
% H hour (00 .. 23)
% I hour (01 .. 12)
% K hour (0 .. 23)
% L hour (1 .. 12)
% M (00 .. 59)
% P displays AM or PM
% R time (hh: mm: ss AM or PM), 12 hours
% S number of seconds that have elapsed since 00:00:00, January 1, January 1, 1970
% S seconds (00 .. 59)
% T time (in 24-hour format) (hh: mm: ss)
% X display time format (% H: % M: % S)
% Z Time Zone Date Field
% A abbreviation of the day of the week (Sun .. Sat)
% A full name of the day of the week (Sunday... Saturday)
% B (Jan .. Dec)
% B FULL NAME (January... December)
% C date and time (Mon Nov 8 14:12:46 CST 1999)
% D the day of the month (01 .. 31)
% D Date (mm/dd/yy)
The options % h and % B are the same.
% J the day of the year (001 .. 366)
% M month (01 .. 12)
% W the day of a week (0 represents Sunday)
% W the week of the year (00 .. 53, Monday is the First Day)
% X display Date Format (mm/dd/yy)
% Y the last two digits of the year (1999 is 99)
% Y (for example, 1970,1996)
Note: Only Super Users have the permission to use the date command to set the time. Generally, users can only use the date command to display the time.
Clear command
The clear command is used to clear information on the screen. It is similar to the cls command in DOS. After the screen is cleared, the prompt is moved to the upper left corner of the screen.
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