Skip to content

Command Guide

Terminal commands

dir (To view the contents of a directory) 
ls To view the files as a list
cd (It is frequently useful to know in which directory you are currently working)
cd Desktop (To move between directories, use the cd command with the name of a directory example go to desktop is "cd Desktop")
mkdir (To create a new directory)
 cd - = back to previous folder
 CTRL - U" = remove text from prompt
 CTRL + A = goes to start of line
 CTRL + E = goes to end of line

Imagemagick terminal commands:

List formats:

convert -list format

Convert JPG to PNG:

convert input.jpg output.png

Convert all JPGs to PNGs:

mogrify -format png *.jpg

Convert SVG to PNG at 1000 DPI:

convert -density 1000 -units PixelsPerInch input.svg output.png

Compress JPG to quality 50% width 1000:

convert input.jpg -quality 50% -resize 1000 output.jpg

Compress all JPGs to quality 50% width 1000:

mogrify -quality 50% -resize 1000 *.jpg

Git commands

Commiting with Git

cd paula-alonsopalomar
git status (to tell you the files that have been modified, shows up a list)
git add *file name* (to add files to the staging area, intermediate area, not yet a commit)
git commit -m  "Add index file of my doc website" > Enter (to commit with a message describing what you are adding)
git log (after commiting to see what happened, extra info) 
git rm (in case you need to remove a tracked file)
git reset commit number (if you want to go back to a commit, copy the commit identifier)
git push (in order to push it to the gitlab repository)

You should see an output message = your local changes are uploaded in your repository.

Open GitLab > you will see the message you put for the update > click there or in the commit section > you see all the changes that have been done.

Other Git key commands:

git init: create to play with commands
git clone: how you pull a file from the server locally
git pull (for downloading the last copy of the repository of the server)
git merge (to have a working copy)
git config –global color.ui true (Set color in command line)
cat .gitconfig (Shows all the settings in the config file that just have been set)

Website commands:

CTRL + U to look at the coding of a website, source of the website
COMMAND + F (Mac) to search for a specific word in a website

Keyboard commands:

To show hidden files in Mac you have to press in your keyboard: COMMAND + SHIFT + PERIOD


Last update: May 28, 2021