Prework Flashcards
(92 cards)
Command, regardless of where we currently are, will take us to our home folder
cd ~
Command to create a file
touch file.txt
Command to open a file
open joke.txt
Command to see whats in a file without opening it
cat file.txt
Command to create a folder
mkdir folder
command to move a file into a folder
mv joke.txt funny_things/
command for remove
rm
options to commands format
Options to commands are always of the format –word or
-letter
Command for copying folders
cp -r folder copy_of_folder
Command Line
A text-based interface.
Synonyms: command-line interface (CLI), console
Terminal
An OSX application that provides text-based access to the operating system;
Any device or application used for data entry and display in a computer system
Synonyms: client, computer terminal, terminal emulator
File System
A file system is a systematic way to control how information is stored and retrieved. It describes where one piece of information stops and where the next one begins. Each file system has its own structure and logic.
Synonyms: NTFS (Windows’ File System), HFS+ (Apple’s File System), file allocation table, GFS (Global File System)
Directory
An organizational unit, or container, used to organize computer files into a hierarchical structure.
Synonyms: folder, catalog, drawer
Path
A sequence of symbols and names that identifies a file or directory. The path always starts from your working directory or from the root directory, and each subdirectory is followed by a forward slash.
An absolute or full path begins with the root directory and specifies every directory above the terminating file or directory name.
A relative path does not include the root or parent directory names, and refers to a file or directory directly below the current working directory.
Synonyms: pathname
Command
The action we want the computer to take; always a single word.
Synonyms: utility
Option
Follows the “command” in a command line, to modify the behavior of the command in some way.
Synonyms: flag
Argument
Follows the “command” and “options” (if any) in a command line, and is used to explain what we want the command to act on.
The number of arguments used generally depends on the command: some don’t need arguments, some require exactly one argument, some require lots of arguments, and some are flexible in the number they can take.
Prints the working directory; returns the absolute path name of the current directory.
pwd -options
Lists directory contents.
ls [-options] [path/to/directory]
Changes the current working directory to the specificed directory.
cd [-options] [path/to/directory]
Makes a new directory
mkdir [-options] [path/to/directory]
Removes directories or files permanently
rm -r [path/to/file] [path/to/file] …
Moves directories or files to a new local
mv [-options] [path/to/file] [path/to/directory]
Renames a file or directory.
mv [-options] [path/to/file] [NEW_FILE_NAME]