Operation of Linux base commands (time and date, calendar, Calculator)

Source: Internet
Author: User
Tags time and date

Time and date

If you want to know the current time of the Linux system, use the date command to display it .

The time shown is January 24, 2017, Tuesday, 18 points 50 minutes 26 seconds. CST is the time zone abbreviation for Chinese standard Time.

If you want to display only the date of the year, you can use the command date +%y/%m/%d

Of course, if you just want to know what time it is, you can use the command date +%h:%m:%s to display it separately.

Calendar

If you want to see this month's calendar, you can use the cal command to view it.

Displays the January 2017 calendar and highlights today's date.

If you want to know the calendar for a year, you can use the cal + year to view it.

If you want to know the October 2017 calendar, you can check it using cal .

Calculator

If you want to do some simple calculations, you can use the BC command to achieve,BC similar to the basic calculator, using this calculator can do basic mathematical operations.

As shown, after entering BC , the version information and copyright of the calculator are displayed back, and then the stage of waiting for the input instruction is entered.

So how do you use it? As with normal calculator usage, enter the numbers and operators that you want to operate on.

+ Addition

-Subtraction

* Multiplication

/Division

^ Index

% take-up

As shown, in the case of 10÷100, should be output 0.1, the result output is 0, because the default output of the BC under the integer, if you want to output decimals, then you can use the scale= number (after a few decimal points) to achieve.

Operation of Linux base commands (time and date, calendar, Calculator)

Related Article

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.