BriefAgain to knock that long to have no friend's order, really no longer love ...With the history of this order I think we can love again!>historySyntax: History [n |-c |-raw Histfile]n--number that represents the most recent N-pen command-c--means clearing everything in history (essentially cleaning up the content saved in $histfile)-a--means to save the curren
-11-02 16:35:37 history 3 1047 14-11-02 16:35:48 history 3 1048 14-11-02 16:35:52 history 3shell > !headhead ~/.bash_history #1414484377cd update/#14144843772. Modify history configuration
Number of history records
shell > echo $HISTSIZE1000shell > By default, the configur
defined environment variable value is more than one word (including space or tabulation Key ), quotation marks are required.
Reference detailsFor more information about how to use quotation marks in bash, see the reference section on the bash help page. The special character sequence is expanded (replaced) by other values to make string processing complicated in
I have shared the code for a long time. I found one today. This is quite good. You can display the username and time of user login/logout in the log, this is an online copy of the time/who used the computer for help:
#!/usr/bin/python# extracts
History command: history, history command history
[Root @ linux ~] # History [n][Root @ linux ~] # History [-c][Root @ linux ~] # History [-raw] histfilesParameters:N: Number, which ind
values of the shell options and positional parameters.5. Position variablesCalling parameters passed to the script from the command line in the script$, $ ... : corresponding to the command line of the 1th, 2nd ... A parameter$: Command itself$*: All parameters passed to the script, all parameters as a whole[Email protected]: All parameters passed to the script, each parameter is independent$#: Number of arguments passed in a scriptShift [n]: Kicks out n parameters6. Logic operation:: With|| :
6 Bash features
This section describes the unique features of Bash.* Call Bash: command line options acceptable to Bash.* Bash Startup File: When and how to execute the script in Bash.* Interactive Shell: What is an interactive sh
-in commands" section)
7. The command history (see the Bash History tools Section) and History extension (see the history interaction section) are enabled by default. When the Interactive Shell exits, bash saves the command
. There will be a prompt to search for bash history based on the keyword you entered
Ctrl + m: Enter
Ctrl + I: Enter the tab
Ctrl + [: Enter esc
Others
Ctrl + h: Delete the character before the cursor, which is the same as the backspace key.
Alt + p non-incremental reverse search history
Alt +> the last command line in the H
I don't know if there's anything to clean up. A directory history file needs to be cleaned. There will probably be a lot of other places to clean up the history files, which may be used.
I spent the past two days writing a script, cleaning more convenient, there will be a large number of historical documents to clean up the words can be used.
The commands used in scripts are only Linux, and are not support
to the bash shell again. The number of command history records will change to 450:# Vi ~ /. Bash_profileHistory Size = 450Histfilesize = 450
Use histfile to change the name of a historical fileBy default, the command history is stored in ~ /. Bash_history file. Add the following content to the. bash_profile file and log on to the
Help for Power Users and SYS adminsbash pocket reference
If you want to get to the heart of Mac OS X, Linux, and other UNIX systems, you need to know how to work with the bash shell.
If you want to learn more about Mac OS X, Linux, or other UNIX systems, you must understand how to deal with Bash.
This concise little book puts all of the essential information about Bash
:35:48 history 3 1048 14-11-02 16:35:52 history 3shell > !headhead ~/.bash_history #1414484377cd update/#14144843772. modify the number of lines in the history record in the history configuration.
shell > echo $HISTSIZE1000shell > By default, the configuration file of Line 1 is modified in/etc/profile.
HISTSIZE=1000ex
There are multiple types of Shell in Linux, the most common of which are Bourne shell (SH), c shell (CSH), and Korn shell (Ksh ). Each of the three shells has its own advantages and disadvantages. The Bourne shell is the original shell used by UNIX and can be used on every UNIX. Bourne shell is excellent in shell programming, but it is inferior to several other shells in dealing with user interactions. The default shell in Linux is the Bourne again shell, which is an extension of the Bourne shel
Set bash options with built-in set and SHOPT commandsThe set command can be used to customize the shell environment, using the option "O" to turn options on or off. For example, open the options: Set-o option, close the Select item: Set +O option.For example, to open the VI Interactive command-line edit, the following:
[Email protected] ~]#Set-o#查看当前设置情况Allexport offBraceexpand onEmacs onErrexit offErrtrace offFunctrace offHashall onHiste
The author of this book, Shi jingqian, is an overseas Chinese historian. The original book is in English and the translator is a Chinese PhD student. The translation is quite good. If you do not speak of it, it cannot be seen as a translation.
The book is basically written in academic habits, and each section of history comes from credible historical materials. However, the authors and translators can easily read the text.
The author's description o
Linux Bash severe vulnerability emergency repair solution, bash severe vulnerability
Recommendation: 10-year technical masterpiece: High-Performance Linux Server build Practice II is released across the network, with a trial reading chapter and full-book instance source code download!
Today, a Bash security vulnerability has been detected.
[Root @ linux ~] # History [n] [root @ linux ~] # History [-c] [root @ linux ~] # History [-raw] histfiles parameter: n: number, meaning "list of the last n commands! -C: delete all history content in the current shell.-a: add the newly added history Command to [root @ linux
under the MacFor Linux systems in the Debian class, the common Apt-get Class command can be aliasAlias update= "sudo apt-get update"Alias upgrade= "sudo apt-get upgrade | Tee ~/documents/' date +%f_%h:%m:%s '-upgrade.log "Alias dist-upgrade= "sudo apt-get dist-upgrade | Tee ~/documents/' date +%f_%h:%m:%s '-dupgrade.log "Alias remove= "sudo apt-get remove"Alias install= "sudo apt-get install"Alias purge= "sudo apt-get purge"...and add Update,upgrade,dist-upgrade to the Histignore.
Histsiz
Bash concise tutorial -- variables, bash concise tutorial Variables
1. Preface
Bash is a popular scripting language in * nix systems. As a scripting language, variables are the basic elements of a language. In this tutorial, we will learn how variables are represented in Bash and some syntax rules related to variables.
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.