How to change your command line prompt

Your command line welcomes you with a prompt. Default OSX terminal may look like this. PS1 is the variable used by your shell to determine your command line prompt RPS1 determines your right hand prompt. Note, you can always `echo` this variable to see what these are currently set to. By default, mine is set to…

Delete files by filename with “find”

When you upload photos multiple times, the computer can start numbering the photos. IMG_A becomes IMG_A 1 and IMG_A 2 and IMG_A 3. Using a wildcard * and specifying the ending space and number will help you select the files. For example: Find all the files that end in “space”1.JPG find -name ‘* 1.JPG’ * Have a look at the…

Set up your programming environment

*wip Must have for your Mac Get homebrew – no longer drag an icon to install Homebrew – “the missing package manager for macOS” will make it so much easier to download, upgrade and maintain your packages. It will install packages super transparently in /usr/local/Cellar/* and symlink commands to /bin. Must have for node.js nvm a…

Intro to OSX File Management Commands

Filenames can have spaces! So when you deal with them either surround the filename with apostrophes like this: “my file name.txt” or escape the spaces my\ file\ name.txt. Otherwise, don’t create new file names with spaces or escape characters to keep your sanity. Wildcards * greedy wildcard ? single character wildcard [] single character list of wildcards {} pattern list of…

Mac Unix Command Basics for Beginners

These are useful unix commands that are entered through a Terminal shell prompt. These commands are actually names of Unix programs that usually sit in a folder called /bin where am i? pwd How to check the current directory $ pwd learn more about anything – man How to bring up the manual page for a command:…

Top 10 bash_profile aliases

You are operating with limited time and limited brain power to finish your programs with enough time to go outside and breath fresh air Knowing this, its way too tedious to type out commands like git diff –cached which can be shortcut to gdc with an alias. An alias will allow you to create shortcuts with your own command…