Linux 官方文檔
Bash Shortcuts
Bash Shortcuts
- ^abc-^-123
- Run previous command, replacing abc with 123
- !!
- Repeat last command
- !*
- All arguments of previous command
- !abc
- Run last command starting with abc
- !abc:p
- Print last command starting with abc
- !$
- Last argument of previous command
- ALT-.
- Last argument of previous command
- CTRL-a
- Go to start of line
- CTRL-c
- Stop current command
- CTRL-e
- Go to end of line
- CTRL-k
- Cut to end of line
- CTRL-r
- Search history
- CTRL-u
- Cut from start of line
- CTRL-z
- Sleep program
ls Options
ls Options
- -1
- One file per line
- -a
- Show all (including hidden)
- -l
- Long listing format
- -m
- Comma--sep-arated output
- -Q
- Quoted output
- -R
- Recursive list
- -S
- Sort by file size
- -t
- Sort by last modified
Process Management
Process Management
- kill pid
- Kill process with id pid
- killall name
- Kill all processes with names beginning name
- pkill name
- Kill process with name name
- ps
- Show snapshot of processes
- top
- Show real time processes
Screen Shortcuts
Screen Shortcuts
- CTRL-A "
- Show current instances of terminals.
- CTRL-A A
- Rename the current instance.
- CTRL-A c
- Create a new instance of terminal.
- CTRL-A n
- Go to the next instance of terminal.
- CTRL-A p
- Go to the previous instance of terminal.
- screen
- Start a screen session.
- screen -list
- Show your current screen sessions.
- screen -r
- Resume a screen session.