Last active
June 28, 2022 07:00
-
-
Save auwsom/0c80eb8503cd8ddf4fe7677b7a32de6d to your computer and use it in GitHub Desktop.
linux1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**emacs bash | |
ctl-e end | |
ctl-u clear to beg | |
ctl-w delete word backward | |
alt-d delete word forward | |
**history | |
*! susbtitution | |
!$ last word | |
!42:p print, edit see histverify | |
**history settings | |
help history | |
alias h='history' >> .bashrc | |
HISTCONTROL=ignoreboth:erasedups >> .bashrc | |
shopt -s histverify >> .bashrc | |
reload bashrc: source ~/.bashrc, or . ~/.bashrc | |
off: set +o history, on: set -o history | |
sudo vim $HISTFILE | |
history -a ppend to file, -c lear list, -r read and append to list, -d elete, | |
-n read update from file?, -s save args to list | |
history -p rint \!88 \!89 >> cmd | |
* so print to cmd file, and then clear and read in to list | |
**running commands from file | |
sed -n '<#> p' | bash | |
history -s "$(sed -n '<#> p')" | |
vim :set number | |
**jobs | |
fg, bg, ctl-Z | |
kill %1 | |
jobs -l | |
kill <pid> -9 | |
**special | |
sed: Stream editor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment