CSCI 344: Spring 2023

Advanced Web Technology

CSCI 344: Spring 2023

UNCA Logo

Command Line Resources

In this class, you will be working on the command line a fair bit. Here is a little cheatsheet to help you get familiar with navigating on your command line. Django Girls is also a good resource.

Note that Windows and Mac / Linus have different conventions, so make sure you’re executing the commands associate with your operating system.

  DOS (Windows) Shell (Mac / Linux)
What directory am I in? > cd $ pwd
Change directories > cd $ cd
List files & directories > dir
> tree # lists subdirectories
$ ls
$ ls -l
Navigate to parent directory > cd .. $ cd ..
Navigate into child directory > cd cs110 $ cd cs110
Navigate into descendant directory > cd lectures\lecture_03 $ cd lectures/lecture_03
Navigate to sibling directory > cd ..\lecture_02 $ cd ../lecture_02
Navigate to ancestor directory > cd ..\..\ $ cd ../../
Navigate to home directory   $ cd
Command history > doskey /HISTORY $ history

Other optional commands you may find useful…

  DOS (Windows) Shell (Mac / Linux)
Create a new file > echo . > my_file.txt $ echo . > my_file.txt
$ touch my_file.txt
Append to a file > echo "some text" >> my_file.txt $ echo "some text" > my_file.txt
Save history to a file > doskey /HISTORY > my_history.txt $ history > my_history.txt
Move a file > move my_history.txt Documents/. $ mv my_history.txt Documents/.
Make a folder > mkdir my_folder $ mkdir my_folder
Delete a file > del my_history.txt $ rm my_history.txt
Delete a folder > rmdir my_folder $ rm -r my_folder