Submitted by twovests in programming (edited )
- Ctrl+Q. When you ctrl+S, it pauses the terminal! Ctrl+Q unpauses it.
- Tab: auto-complete.
- Up-arrow to see previous commands.
-
^
to do replacements. (E.g.cp my_fiel.jpg; ^fiel^file
) -
!!
The the previous command. (E.g.sudo !!
) -
history | grep
term
` To search my command history for a command I ran before. - Making the history size larger in your bash profile.
-
!1234
: To re-run the 1234th command in your history. -
!ls
: To re-run the lastls
command -
!?ls/hmoe/home/
Re-run the lastls
command, replacinghmoe
withhome
-
cd ..
to move up a directory. -
cd -
to move to your previous directory. -
ls -lth
to show a list, sorted by time, with human-readable filesizes. (E.g. 4.0K instead of 4096). (ls -lht also works) -
clear; python
: I like to have as much vertical space as possible when I start with Python. - Ctrl+C; Ctrl+D : Both tell a program to exist
- Ctrl+Z: Suspends a program. (Useful for returning to it)
-
jobs
: Shows lists of suspended jobs (as suspended by Ctrl+Z) -
fg 1
: Starts job 1 back up. -
kill %1
: Kills job 1. -
*
: Wildcard expansion. E.g.rm archive-*.zip
will delete archive-0.zip, archive-1.zip, etc. Be careful with this! -
!$
: Represents the arguments to the last command you ran. E.g.mkdir /etc/lib/var/usr/home/bin/very/long/nested/directory; cd !$
-
~
: Stands for your home directory. -
sl
: Choo-choo! -
sl-h
: Choooooo-chooooo!
mm_ wrote
ayy thanks for these