Cole Geissinger
Senior Web Engineer at 10up. PHP, JavaScript, technology, musician and enjoys a good sandwich.
Cole Geissinger
Senior Web Engineer @ 10up
@colegeissinger
NOTE: Focuses on the command line using unix based commands.
A means of interacting with a computer program where the user issues text based commands to the program in the form of successive lines of text
- Wikipedia
Photo Credit: Tailord4WP photo by Florian Ziegler
↖
↓
OUR FIRST STEPS
$ echo "Hello World"
Example
Hello World
Outputs
NAVIGATING THE PROMPT
CONTROL + A
MOVES CURSOR TO THE BEGINNING OF THE PROMPT
CONTROL + E
MOVES CURSOR TO THE END OF THE PROMPT
TAB COMPLETION = WIN
Pressing the tab key will perform an auto complete
UP ARROW TO GO
BACK IN HISTORY
COMMAND + K TO CLEAR THE SHELL
'MAN' COMMAND
LS ALL THE THINGS
List current directory contents
OUTPUT CURRENT PATH
USING THE COMMAND 'PWD' TO PRINT THE WORKING DIRECTORY
CHANGE DIRECTORY
USE THE 'CD' COMMAND TO MOVE AROUND
OPEN IN FINDER
USING THE 'OPEN' COMMAND TO OPEN ITEMS IN FINDER
$ open .
Open current directory
$ open FILENAME
Open file in current directory
$ open -a APP NAME
Open current directory
$ open -R FILENAME
Open file with preview pane open
SEARCHING
USE THE 'FIND' COMMAND TO SEARCH YOUR COMPUTER
$ find . -type f
Searches for all files in current path
$ find . -name "FILENAME"
Searches for that exact file name
$ find . -iname "NameCaseInsensitive"
Open current directory
$ find . -type f -name "FILENAME"
Open file with preview pane open
TIP: Change the period "." after find to your search term
CREATE FILES WITH 'TOUCH'
EDITING FILES
USING TOOLS LIKE NANO OR VIM
CREATE A NEW DIRECTORY
USING THE 'MKDIR' COMMAND
COPY FILES
USING THE 'CP' COMMAND
MOVE FILES
USE MV TO MOVE FILES
REMOVE FILES
RM COMMAND TO REMOVE FILES
OR RM -R FOR DIRECTORIES
@colegeissinger
colegeissinger.com
10up.com
Questions?
By Cole Geissinger
Senior Web Engineer at 10up. PHP, JavaScript, technology, musician and enjoys a good sandwich.