cli_reference

Reference: Command Line Interface (CLI)

Challenge: quick reference for useful CLI commands. (Note: in creation of this post, many of these commands became ingrained, and as a result, used more frequently. Learning!)

look at CLI history

mv old_directory_name new_directory_name

look at CLI history

history

and run one of the cmds

!#

view file sizes

ls -sh

jump word navigate

esc + f, esc + b

ctrl + [, release, b or f

discover internet

sudo ifconfig

view logs

tail [options] [filename]

tail --lines=1000 file.ext

tail -f thin.log

view Heroku logs

Heroku logs --tail

test URL accessibility

ping URL

ping 127.0.0.1

multiple terminals

csshx

search package manager brew

brew search app_name_string

view/edit bash profile

open ~/.bash_profile

editing configs

nano ~/.gitconfig

nano ~/.bash_profile

reload after edit

source ~/.gitconfig

exec bash

show current pathway (print working directory)

pwd

jump to home directory

cd

create new file

touch file_name

rename file

mv old_name new_name

delete file

rm file

delete directory with files

rm -rf directory

copy / secure copy

cp /tmp/file_name .

scp file_name server.location:/tmp

 

iTerm2 Shortcuts

split screen vertically (two panes)

cmd + d