DIGITAL RESEARCH INSTITUTE Command Line. Cheat Sheet pwd  (print working directory) to show what folder you are in  ls (list) to show the content of the folder cd  to change directory  cd ..  to go up one directory  cd ~ gets you to your user folder, home touch to update the time on a file, and create a new file if it doesn’t exist mkdir - creates a new folder  echo to print plain text  > (redirect symbol) to print into a specific file  overwriting it, e.g.  echo “This is my cheat sheet”  > cheat-sheet.txt (creates a new file if it doesn’t exist) >> (append) to add new file without overwriting, e.g.  echo “append is used to print more text” >> cheat-sheet.txt cat - prints the file  | (pipe) allows to take the output of a command and use it as the input for the next command. wc -word count  sort  to organize the content of the file in alphabetically by line mv – to move files  control + C to interrupt the last command by stop running it less to ge a paginated view of the data. To navigate this use: f for forward, b for back, q for quit - this is not “control + C” because ‘less’ waits for user input head to only see the first part of the file, e.g. head nypl_items.csv tail to only see the last part of the file, e.g. tail nypl_items.csv uniq (stands for unique) to print repeat lines only once grep stands for “global regular expression print’  FLAGS: marked with hyphens to indicate specifications to the commands wc -w ask to print the number of words sort -f to make sort non case sensitive ls -l to show the long list (the details of the content) wc -l to show the number of lines wc -m to count the number of characters  head -n # to show a specific number of lines of the head, e.g. head -n 1 nypl_items.csv  tail-n # to show a specific number of lines of the head, e.g. tail -n 3 nypl_items.csv TIPS UP and DOWN arrows to navigate previous commands tab for completion