Bash features-command history command line editing, bash command line

Source: Internet
Author: User

Bash features-command history command line editing, bash command line

Bash:

GUI: Gnome, KDE, XFCE

CLI: sh, csh, bash, ksh, tcsh, zsh

Shell, sub-shell

 

Tree: view directory tree

Pstree: view the process directory tree

 

Bash:

1. Command history and command completion

2. Pipelines and redirection

3. Command alias

4. Edit the command line

5. Expand the command line

6. File Name Configuration

7. Variables

8. Programming

 

Edit command line:

Cursor jump:

Ctrl + a: Jump to the beginning of the command line

Ctrl + e: jump to the end of the command line

Ctrl + u: Delete the content from the cursor to the beginning of the command line

Ctrl + k: Delete the content from the cursor to the end of the command line

Ctrl + l: clear screen

 

Command history: history

Save command history to memory buffer

View command history: history

-C: cleared: clears the command history.

-D OFFSET: Command to delete a specified position

-W: write: Save the command history to the historical file.

 

Environment Variable

PATH: command search PATH

HISTSIZE: the size of the command history buffer.

 

Usage tips for command history:

! N: The Nth command in the execution history.

! -N: The last n commands in the command history.

!! : Execute the previous command

! Str: the most recent command in the execution history that starts with a specified string.

! $: Reference the last parameter of the previous command

 

Command completion: PATH environment variable, search under command search PATH

Path completion:

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.