Basic Commandline
October 24, 2017
San Francisco, CA
Learning version control and git can be learned through many GUI apps that make it easy for first-timers to learn the basics, but at a certian point you might want to devel into the command line way of doing things.
There are some advantages and certian disadvantages at I've found over time when using command line, but overall its been a positive experience for me. I actually find its easier to navigate directories and find files and open apps with command line
Here is a short list of basic commands
To LIST out a directory's files and folders use
User$ LS
Here is the result
index.html
page1.html
page2.html
styles.css
images
Note that "images" has no file extension, therefore is a folder
To CHANGE DIRECTORY and go into a folder use
User$ CD *name-of-folder*
To CHANGE DIRECTORY and go OUT a folder use
User$ CD ..
To MAKE a DIRECTORY use
User$ MKDIR *name-of-directory-to-delete*
To REMOVE a DIRECTORY use
User$ RMDIR *name-of-new-directory*
This only works for an empty folder, to delete a non-empty folder use
User$ RM -R *name-of-directory-to-delete*
To create a new file use
User$ TOUCH name-of-new-file.txt
Make sure to include the files extension and this will create a new file in the dicrectory you are currently in, you can check with LS to list out the directory to see if the file has been created
To REMOVE a file use
User$ RM name-of-file-to-delete.txt
A really good resources to learn more about command line is Github terminal-mac-cheatsheet by 0nn0, check it out! :)