3.1 How Sweet is Terminal Flashcards
We are used to ______________, with their familiar icons, windows, buttons, and mouse pointers.
We are used to Graphical User Interfaces (GUIs), with their familiar icons, windows, buttons, and mouse pointers.
Using the command line is a critical skill. At different times, it may be:
- The only way to achieve a desired outcome. You may have to work with systems and tools that have no GUI interface.
- The fastest way to achieve a desired outcome.
- The most flexible way to achieve a desired outcome.
Virtual machines are programs that simulate ______________.
Virtual machines are programs that simulate entire computers.
- Virtual machines (VMs) can operate as entirely different computers than the one they are running on.
- We can run many different VMs on a single physical computer.
pwd
Display the current working directory (print working directory).
ls
List directories and files in the current directory.
cd
Navigate into a directory (change directory).
mkdir
Make a directory
rmdir
Remove directory
touch
Create an empty file
rm
Remove a file
clear
clear history
There are two types of file paths: _________ paths and _________ paths.
There are two types of file paths: absolute paths and relative paths.
What’s the difference between absolute and relative paths?
An absolute or full path points to the same location in a file system, regardless of the current working directory. To do that, it must include the root directory. By contrast, a relative path starts from some given working directory, avoiding the need to provide the full absolute path.
A _____________, starts at your current location in the directory and doesn’t require typing out the top directory.
A relative path, starts at your current location in the directory and doesn’t require typing out the top directory.
cd . . and cd . ./ . ./ does what
Move back a directory or multiple directories
What does each of these do?
- file path
- absolute path
- relative path
- cp
- mv
- Identifies a unique location in a file system.
- Starts at the top directory of the file system.
- Begins from the current directory.
- Copies files
- Moves files
What does this command do?
more
View a file page-by-page. Space bar moves you to the next page.
What does this command do?
less
Similar to more, but allows you to scroll up and down a file.
What will this command do?
head -40 file1.txt
Shows the first 40 lines of file1.txt
Used after head or tail to change the number of lines previewed.
True or False?
Cat combines files and displays the results.
True
Cat command stand for concatenate and combine files together.
To save the results of cat, you have to use either ____ or _____.
To save the results of cat, you have to use either > or»_space;
> Write to a file, overwriting the file if the file name already exists.
> > Write to a file, appending the file if the file name already exists.
The most common data streams are ________ and ________.
The most common data streams are stdin and stdout.
What does the head and tail commands do?
head and tail preview 10 lines by default. This number can be changed easily.
head -50 examplefile.txt