<<

Intro to Workshop – Cheat Sheet working (current) directory man manual $ man show manual for ls command change directory permissions special directories r read / the root directory ~ your home directory x execute (run) . current directory .. parent directory ls ‐l /bin/bash ‐rwxr‐xr‐x 1 root wheel [ … ] /bin/bash ls list directory contents rwx owner (root) ls –a list all directory contents r‐x group (wheel) ls –l long listing r‐x everyone else date print the date and (or rename) remove sort the lines of a file directory print lines matching a pattern remove directory (must be empty) $ grep error myfile show lines containing “error” in myfile print file(s) to standard output (usually your screen) redirection and pipes $ date > myfile write date to myfile print user ID $ date >> myfile append date to myfile am I print user information $ sort < myfile use myfile as input to groups print user groups sort id print user ID and groups $ sort myfile | grep error sort myfile and send output to grep who information about logged‐in users w information about logged‐in users file reader [space] next page bash previous page ←→ move left/right on line g go to end of file ↑↓ previous/next command in / search ^a go to beginning of line ? search backwards ^e go to end of line n repeat search ^k delete to end of line ^g show location in file nano editor $ nano myfile edit myfile ←→ move left/right on line ↑↓ previous/next command in history ^a go to beginning of line ^e go to end of line ^k delete line ^o save file ^x 10 sleep 10 seconds hi print hi exit exits session logout exits session ^d exits session

^c stop running command list processes ps –e list every ps ‐aux list every process with show processes q quit top