Created
April 8, 2019 14:11
-
-
Save DallasO/d0bffd71709f3e7fa6fb4837bacfaccf to your computer and use it in GitHub Desktop.
Under-utilized Linux commands. From https://github.com/engineer-man/youtube/blob/master/058/commands.sh
This file contains hidden or 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
# 1. redo last command but as root | |
sudo !! | |
# 2. open an editor to run a command | |
ctrl+x+e | |
# 3. create a super fast ram disk | |
mkdir -p /mnt/ram | |
mount -t tmpfs tmpfs /mnt/ram -o size=8192M | |
# 4. fix a really long command that you messed up | |
fc | |
# 5. tunnel with ssh (local port 3337 -> remote host's 127.0.0.1 on port 6379) | |
ssh -L 3337:127.0.0.1:6379 [email protected] -N | |
# 6. intercept stdout and log to file | |
cat file | tee -a log | cat > /dev/null | |
# bonus: exit terminal but leave all processes running | |
disown -a && exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment