Skip to content

Instantly share code, notes, and snippets.

View anonRegions's full-sized avatar

anonRegions

  • SelfSpunWebs
  • Brooklyn, NY
View GitHub Profile
@anonRegions
anonRegions / history.sh
Last active August 29, 2015 14:24 — forked from nahurst/history.sh
# set these in your .bash_profile, .bashrc, .zshrc first
HISTFILESIZE=100000 # how many lines to keep total
HISTSIZE=100000 # how many lines to keep for the current session
# oh-my-zsh will default to a reasonable 10000, but most bash defaults to a few hundred
# oh-my-zsh by default appends all commands to history after they are run instead of on session end
# search the history with control-r
# search for commands starting with the one you typed with alt-p
# if you don't want something to stay in your history, prefix the command with a space
# Using screen to maintain sessions on a remote machine. (This also just works locally).
# ssh into your remote host e.g. ssh user@host
# sets up a screen session called mysession
screen -S mysession
# Exiting the terminal (e.g. shutting your laptop) will "detach" the screen session (i.e. run it in the background).
# To see what screen sessions are running:
screen -ls
# To reconnect
screen -R mysession # resumes a detached session or creates one if it doesn't exist