how to change directory in terminal mac code example

Example 1: move a directory in terminal mac

mv source_folder destination_folder
# eg
mv /Users/juan/Documents/Coding /Users/juan/Desktop

Example 2: how to step back in the path in temrinal

cd ~ or cd -

Example 3: how to change directory in terminal mac

cd <FolderName>

Example 4: terminal change directory

// change directory in terminal
cd folder_name/subfolder_name

// go up one directory level
cd ..

// back to previous directory
cd -

// return to home directory
cd