Use the last command to quickly operate the AIX command

xiaoxiao2021-03-06  69

Use the command you have used under AIX

Used under AIX, the default shell is KSH, and the BASH under Linux is the same, he can't use the key under the DOS that we have already familiar with, or the shortcuts we have already used by our last time. Command, such as in the DOS command state (I am listed in my own shortcut, maybe other, slowly add), you can get the not repeated in the current DOS window through F7. Command (Windows sorts yourself in the current window order, numbered 0, 1, 2 ...), f1 repeat the character in the same location, F3 repeats all commands last time, F5 and F8 turns up the command I have entered, F9 is the number of non-duplicated command IDs you want to display (for example, after entering a DOS window, I entered two commands in turn: DIR and CD Test Then, then the 0th command of this window is DIR, and the class is pushed. When I press F9, the system prompts me "Enter the command number". At this time, I will enter the sequence number in the last input, such as choosing 0. This time is DIR command, this function and F7 function is consistent, just F7 can be selected, F9 can be input directly, which is more useful when you entered the commands). To use the previous command you have already used under AIX, you can use the following methods: 1, under KSH, run set -o vi, this time the entire command state is the VI editor, the method and VI The editor is like touching, to repeat the last command, press Esc under the current status bar, then enter K, you can see the next command, press K to query the last command, H can be in the current line Before moving a character, L can move a character after the current line, of course, this time is equivalent to a VI state, all of all commands in the VI state can be used. After editing, press it directly to press it. 2, if it is not in KSH, then you can run the Ksh -o Vi, other commands, the other commands, and set Editor = Vi in the environment variable of KSH, that is, the method of modifying Add editor = vi directly in .profile; Export Editor. 4. Delete the history command, you can query one .sh_history file in the main directory of the current user, record all your commands entered in the current user. You can edit this file and then delete the commands. Of course, you can put your favorite command or a longer command, you can call it directly. Of course, from this file, you can see that the above-mentioned command to get the last command, in fact, KSH is the information in this file. 5, the following tips: a, repeat the last command can enter R b directly in the KSH state, you can execute RA = B in the KSH state, means that the A character in the last command will be replaced with B characters, then run.

At present, I am more habits is above.

(to be continued...)

Related links: first knowledge AIX5.2 i 1ware AIX5.2 II

转载请注明原文地址:https://www.9cbs.com/read-88305.html

New Post(0)