History command Usage

Source: Internet
Author: User

history shows command histories

Introduction:

Display the command history list by number, add each command history to the newest entry, continuous N the same command shows only one bar

"Built-in Commands"

Command History file : ~/.bash_history

Login Shell , the command that is recorded in the command history file is read: ~/.bash_history

Login into Shell The newly executed commands are only recorded in the cache, and these commands are "appended" to the command history file when the user exits;

Main parameters:

-A manually append command to the command history file

-D Delete the command history cache for the specified number

-C Empty command history cache

-W manually writes the command history cache to the history file

Quick action:

!! executes the previous command

! # Call history in the execution history of the # # Command

! -# Call to execute history in the penultimate # command History

! string: Call a command that starts with string

Esc. call the arguments of the previous command

ALT +, call the arguments of the previous command

!$ calling arguments to the previous command

Environment variables:

command history file $HISTFILE

command History cache size $HISTSIZE


This article is from the "8079848" blog, please be sure to keep this source http://8089848.blog.51cto.com/8079848/1685059

History command Usage

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.