Whether you are a Linux command line newbie or a veteran, these tips can help you improve, save time, improve efficiency, increase Interest ….
History Commands
These techniques are mostly using the history command. We first enter
history
and then you will see something like the following < Br>
To execute a command in history, just use ! plus the line number before the command.
!510
You You can also see when a command was executed. Let's see what the commands are before the 3 commands.
!-3
Quick replacement
Assuming you I want to execute the previous command. Just enter two exclamation points directly. (Translator's Note: This may not be as convenient as the arrow keys, but the following is the real effect). When you execute a command, you find that you forgot to add sudo. This command works.
sudo !!
Assuming you want to run a command, the parameters of this command are already in the previous command, but you can type it again. It’s too much trouble, well, use it directly!$ You can use it.
cd !$
If you have already run a command with two parameters, but you want to use the first parameter, you can use !^ Command, this command is very useful when you back up a file and then want to edit the original file again.
nano !^
(note the last command in the figure)
< Next, let us search for a specific command from your history. Press Ctrl+R, when you type, it will automatically search. You can use the arrow keys to find the command you want.
If you know the specific keywords of the commands you have run, you can skip the search step and find them directly.
!keyword(keyword can be changed to your keyword)
Clear History
If you want to clear the history, use the following command
history –c
If you want to disable the history command, use the following command
HISTSIZE=0
If you want to enable it again, you can change 0 to a certain value. (The default value is usually 500 or 1000.) Use the following command to make the history ignore commands starting with spaces.
HISTCONTROL=ignorespace
Under In the fourth line, the cd is preceded by a space, so the history ignores
Remove the duplicate
Use the following command to ignore the repeat command.
HISTCONTROL=ignoredups
If you want to ignore spaces and want to ignore duplicates, use the following command
HISTCONTROL=ignoreboth
Tizen 1.0 was released, and Taize is a Linux-based open source software platform that runs on smartp
A.Linux files can be divided into four types: ordinary files, directory files, link files, and devi
1. Install Oracle VM virtualBox, I am using version 4.0. The official download address is here. 2.
How to set IP and MAC binding on Linux routing
Linux operating system sound card driver installation and configuration
How to check the current version of the network card under the Linux operating system
Linux device driver summary: the basic concept of the kernel
Linux history (history) command usage detailed
Linux network can not start to solve
Linux system JDK installation and configuration basic tutorial
Linux prohibits a user from logging in to the system.
Redirect command application and its syntax under Linux operating system
Postfix+dovecot+maildrop+mailscanner+clamav+spamassassin build
How to disable Win8.1 system help tips
Automated advanced application skills that let XP run
After the WP8.1 preview, the headset becomes mono
Win10 new application mobile phone companion support mobile phone computer free synchronization
How does the Win10 system view the boot time? Windows10 system to view two ways of boot time
How to solve Windows XP boot black screen and prompt "loader error 3" problem
Windows 8 crack version removes the lower right corner watermark method
What should I do if the text font of the Win10 desktop icon is too large?
Do it yourself to create a personalized theme under Windows 7