Word processors: MSword, Google docs, Apple pages, Wordperfect, etc.
Code editors: GitHubs Atom, VS code, Visual Studio, NotePad++, Vim, Emacs, Nano, etc.
What exactly is a command line/terminal?
It’s a way to directly request information from your computer by simply entering simple text commands/requests. It then responds to your request with simple text information.
There are two types of file explorers; The standard ‘find files by point and click,’ or using a terminal. They each have similar tasks but using the Terminal can do so much more by using a command line.
File Explorer Tasks:
Terminal Tasks:
Relative path
: A file or directory location relative to where we currently are in the file system.
Absolute path
: A file or directory location in relation to the root of the file system.
| Command | Task |
|---|---|
| cd . | To go back one directory |
| mkdir new-folder | To create a new folder |
| cd new-folder, pwd, new-folder: touch myfile.md | To create a new file in that folder |
| cd | To go back to the home directory |
| clear | clear your screen |
| cd p(plus the tab) | To search files by letter names |
| tree command | To get a branch diagram of all your folders |
| cntrl plus c | To stop a command from running |
| code . | To switch over to VScode |
Changing to a new directory: cd (change directory), use “ cd projects” ,use with pwd, then ls to list
Using the up/down arrows- will cycle through your previous commands
To search files by letter names: cd p(plus the tab) - will show all the folders starting with p, add pr and get the projects.
To get a branch diagram of all your folders: tree command (only do this for a direct folder not the whole computer
To stop a command from running: cntrl button plus c
To chain together a path you need use fwd/: for example- cd projects/courses/102
What are four important features to look for in a text editor?
What do the following commands do?
‘pwd’: print working directory (you are here command)
‘ls’: list (shows the list of all the folders)
‘cd’: change directory (by using dots after the cd, you can move between directories)
‘mkdi’r’: make directory (make a new directory)
‘touch’: creates new, empty files. It is also used to change the timestamps.
Can you explain what is happening in the following scenario if these commands and arguments are entered into the command line? (Arguments are extra instructions given to a command.)
‘cd projects’: this will show all the folders named projects.
‘mkdir new-project’: this will open/start a new project folder.
‘touch new-project/newfile.md’: this will make a new empty file under the new-project folder, named newfile.md (markdown file)
‘cd ..’ : this will take your back 2 directories from where you currently are.
‘ls projects/new-project’: this will pull a list of all the files related to the projects/new-project.