Bash Commands
mkdir filename -> creates a directory (file) named filename in the current directory - stands for make directory as you are creating a sub-directory
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cd filename -> changes your directory to filename = change directory
cd -> send you to home directory
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ls filename -> list all the files in the current directory = list
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
mv filename1 filename2 -> renames the file = move
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
rm filename -> deletes file = remove
rm -i filename -> ask for confirmation then deletes file = remove
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
pwd -> gives your current location = Print Working Directory
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
vim filename.cc -> opens up or creates a C++ file in vim =
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
g++ filename.cc
g++ filename.cc -o newfilename
VIM Commands
i -> puts you into "insert mode" and allows you to edit the text
esc key -> to exit "insert mode" and enter "command mode" use the esc on your keyboard. You can now use some vim commands
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
:x -> saves and exits VIM = exit
:q! -> exits VIM without saving = quit
:w -> saves without exiting = write
:wq -> saves and exits VIM = write and quit
:X -> ask you to encrypt your file! Why would you do this?! Try not to do this as you try and exit. You can get locked out your file.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------