Command Line Flashcards
What if the UNIX Shell?
Both a command-line interface (CLI) and a scripting language
What is the function of the UNIX shell
A better GUI alternative that allows repetible tasks to be done automatically and fast. Tasks that takes the GUI hours will take the shell seconds.
What is the shell?
A program where users can type commands ranging from complicated climate modeling software to simple file creations
What is the most popular UNIX Shell
Bash (Bourne Again Shell)
What are scripts? Purpose?
Sequences of commands written using the grammar of a shell to improve the reproducibility of workflows.
Examples of the shell abilities?
Can be used to interact with remote machine and super computers. It can also be used to tackle scientific questions and computational challenges.
What is $? What to do and not?
This is the shell’s prompt typically. Do not type the prompt, only the commands after it. Press enter to execute it.
What is the [ls] command and what does it mean?
[ls] - short for listing. This lists the contents of the current directory
What happens when shells can’t find ur command?
$ (command): command not found
What are the shells main disadvantages?
The shell’s main disadvantages are its primarily textual nature and how cryptic its command and operations can be.
What is the file system?
The part of the OS responsible for managing files and directories.
Current working directory
Directories are like places. At any time we r using the shell we are exactly in one this.
Why knowing ur current working directory is important?
Command mostly read and write files in the current working directory
What is the [pwd] command?
Shows you where you are
What is the [cd] command?
Navigates you to ur home directory
[/]
Root directory that hold everything else it’s the leading slash in ur home directory
What other directories are inside the root directory?
[bin], [data], [Users], and [tmp] etc.
Function of the [bin]
This is where some built-in programs are stored.
Functions of [data]
(For miscellaneous data files)
Functions of the [Users] directories
It’s where the user’s personal directories are located.
Functions of the [tmp] directory ?
For temporary files that don’t need to be stored longterm
The seconding meaning of the slash?
When it appears inside a path, it’s just a separator
Where are user Imhotep files stored in?
They are stored in all user’s directory
[ -F] option
Tells [ls] to classify the output by adding a marker to file and directory names to indicate what they are.