All the Terminal commands and their functions
Commands | Description |
---|---|
mkdir [foldername] | Makes a Folder/ Directory |
rmdir [directoryname] | rm -d [dirname] | Removes A Directory (must be empty directory) |
touch [filename] | Creates a New File |
rm [filename] | Removes File Specified |
cd [foldername] | Changes current directory into the folder specified |
ls | Lists all the directorys and files in the current folder |
pwd | Prints current directory to the terminal |
cp filename1 filename2 | Copies a File and makes another with a different name |
find $(pwd) -type f | This gets every filepath in the current working directory. great for grabbing urls. |
Commands | Description |
---|---|
sudo | Running sudo before any command will give elevated privileges |
ls -l | Lists all the folder and file permissions in the current directory |
sudo chown | Chown command changes the user and/or group ownership of for given file. The syntax is: |
sudo chown -R your_user /usr/local | Changes access to full admin privileges in specified folder and subfolders |
Commands | Description |
---|---|
brew list | Shows all the packages installed by brew. |
brew --version | Prints Current version of brew |
brew update | Updates only brew |
brew upgrade | Updates All Packages installed by Brew |
brew install python | Installs Python using Brew |
brew upgrade python | Upgrades Python to newest version |
brew pin [packagename] | Prevents that package from being updated |
brew unpin [packagename] | unpins the package from being updated |
brew cleanup [packagename] | uninstalls old versions of that package (brew does not automactically uninstall old versions) |
brew cleanup | Uninstalls old versions of every package (brew does not automactically uninstall old versions) |
brew cleanup -n | Shows the packages that would be cleaned up in ther terminal |