Linux trivial knowledge (tue-aug-21-01)

Source: Internet
Author: User

View historical operations

History 10 (List the last 10 actions)

!105 (Repeat 105th command)

!! (Repeat the previous command)

!last (executes the last command that starts with the end)

History | More (historical instructions itemized)

History-c (Clear all history commands)

Log

/var/log/message system startup information and error log, which is one of the most commonly used logs in red Hat Linux
/var/log/secure Security-related log information
/var/log/maillog message-related log information
/var/log/cron log information related to timed tasks
/var/log/spooler log information related to UUCP and news devices
/var/log/boot.log Daemon starts and stops related log messages

UNAME-A # View kernel/Os/cpu information

[Email protected] ~]# cat-n/etc/issue
1\s
2Kernel \ R on \m
3
[Email protected] ~]# Cat-b/etc/issue
1\s
2Kernel \ R on \m

The difference between Cat-n and Cat-b is:-B: List line numbers, do line numbers for non-blank lines only, blank lines do not line numbers, and N: Print travel numbers, along with blank lines, with line numbers, unlike the-B option;

To view the CentOS version:

[email protected] etc]# cat *-release
CentOS Linux release 7.5.1804 (Core)
Name= "CentOS Linux"
version= "7 (Core)"
Id= "CentOS"
Id_like= "Rhel Fedora"
Version_id= "7"
Pretty_name= "CentOS Linux 7 (Core)"
Ansi_color= "0;31"
Cpe_name= "Cpe:/o:centos:centos:7"
Home_url= "https://www.centos.org/"
Bug_report_url= "https://bugs.centos.org/"

centos_mantisbt_project= "CentOS-7"
centos_mantisbt_project_version= "7"
redhat_support_product= "CentOS"
redhat_support_product_version= "7"

CentOS Linux release 7.5.1804 (Core)
CentOS Linux release 7.5.1804 (Core)

Linux trivial knowledge (tue-aug-21-01)

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.