Chapter 2 - Access the Command Line Flashcards

1
Q

Shell

A

The interpreter that executes commands that are typed as string

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Prompt

A

The visual cue that indicates that an interactive shell is waiting for the user to type a command

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Command

A

The name of a program to run

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Option

A

The part of the command line that adjusts the behavior of a command

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Argument

A

The part of the command line that specifies the target that the command should operate on

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Physical Console

A

The hardware display & keyboard to interact w/ a system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Virtual Console

A

One of multiple logical consoles that can each support an independent login session

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Terminal

A

An interface that provides a display for output & a keyboard for input to a shell session

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

“tail -n 5 /var/log/messages”

A

Displays the last five lines of the /var/log/messages file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Semicolon ;

A

Separates commands on the same line

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

“passwd”

A

Used to change a user’s password

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

“file”

A

Displays the file type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Pressing Tab

A

Completes commands, file names, & options

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

“!number”

A

Re-executes a specific command in the history list

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Ctrl+A

A

Jumps to the beginning of the command line

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

“history”

A

Displays the list of previously executed commands

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Esc+

A

Copies the last argument or previous commands

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Contains persistent, system-specific configuration data

A

/etc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

is the top of the system’s file-system hierarchy

A

/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

contains user home directories

A

/home

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

contains files to boot the system

A

/boot

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

contains system files to access hardware

A

/dev

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

is the administrative superuser’s home directory

A

/root

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

contains regular commands & utilities

A

/usr/bin

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
contains non-persistent process runtime data
/run
26
contains installed software programs & libraries
/usr
27
a world-writable space for temporary files
/tmp
28
system-specific variable data should persist b/t boots
/var
29
displays the full path name of the current working directory for that shell
"pwd"
30
lists directory contents for the specified directory, or, if no directory is given, for the current working directory
"ls"
31
change your shell’s current working directory
"cd"
32
changes to the previous directory, where the user was previously to the current directory
"cd -"
33
uses the hidden directory to move up one level to the parent directory w/o needing to know the exact parent name
"cd .."
34
specifies the current directory on commands where the current location is either the source or destination argument
"cd ."
35
displayed when your current working directory is your home directory
"~"
36
updates the time stamp of a file to the current date & time w/o otherwise modifying it
"touch"
37
long listing format
"ls -l"
38
all files, including hidden files
ls -a"
39
recursive, to include the contents of all subdirectories
"ls -R"
40
refers to the current directory
"."
41
refers to the parent directory
".."
42
Which command returns to your current home directory, assuming that the current working directory is /tmp & your home directory is /home/user?
"cd"
43
Which command displays the absolute path name of the current location?
"pwd"
44
Which command returns you to the working directory before the current working directory?
"cd -"
45
Which command changes the working directory up two levels from the current location?
"cd ../.."
46
Which command lists files in the current location, with a long format, & including hidden files?
"ls -al"
47
Which command creates an empty file called “helloworld.py” in the “user” home directory, assuming that your current directory is “/home”?
"touch ~/helloworld.py"
48
Which command changes the working directory to the parent of the current location?
"cd .."
49
Which command changes the working directory to “/tmp” if the current working directory is ‘/home/student?
“cd ../../temp”
50
What shows subdirectories?
"/"
51
Displays the full path name of the current working directory for that shell o Helps to determine the syntax to reach files by using relative path names
"pwd"
52
lists directory contents for the specified directory, or, if no directory is given, for the current working directory
"ls"
53
change your shell’s current working directory
"cd"
54
changes to the previous directory, where the user was previously to the current directory
"cd -"
55
uses the hidden directory to move up one level to the parent directory w/o needing to know the exact parent name
"cd .."
56
specifies the current directory on commands where the current location is either the source or destination argument
"cd ."
57
displayed when your current working directory is your home directory
"~"
58
updates the time stamp of a file to the current date & time w/o otherwise modifying it
"touch"
59
Long listing format
"ls -l"
60
All files, including hidden files
"ls -a"
61
recursive, to include the contents of all subdirectories
"ls -R"
62
refers to the current directory
One dot (.)
63
refers to the parent directory
Two dots (..)
64
creates one or more directories or subdirectories
"mkdir"
65
creates any missing parent directories for the requested destination
"mkdir -p" (parent)
66
copies a file, & creates a file either in the current directory or in a different specified directory
"cp"
67
copies directories & their contents
"cp -r"
68
moves files from one location to another
"mv"
69
displays a detailed output of the command operations
"mv -v"
70
removes files, does NOT remove directories
"rm"
71
enables the “rm” command to remove directories & their contents
"rm -r"
72
interactively prompt for confirmation before deleting
"rm -i"
73
determines whether 2 files are hard linked
"ls -i"
74
can determine whether a file has multiple hard links; lists the inode number
"ls -i"
75
lists the directories that are on different file systems
"df"
76
creates a symbolic link, aka “soft link”
"ln -s"
77
indicates that the file is a symbolic link & not a regular file
"l"
78
updates current working directory by using the name of the symbolic link rather than the name of the actual directory
"cd"
79
80
Which command returns to your current home directory, assuming that the current working directory is /tmp & your home directory is /home/user?
"cd"
81
Which command displays the absolute path name of the current location
"pwd"
82
Which command returns you to the working directory before the current working directory?
"cd -"
83
Which command changes the working directory up two levels from the current location?
"cd ../.."
84
Which command lists files in the current location, with a long format, & including hidden files?
"ls -al"
85
Which command creates an empty file called “helloworld.py” in the “user” home directory, assuming that your current directory is “/home”?
“touch ~/helloworld.py
86
Which command changes the working directory to the parent of the current location?
“cd ..”
87
Which command changes the working directory to “/tmp” if the current working directory is ‘/home/student?
“cd ../../temp”
88
Which pattern matches only file names that end with “b”?
“*b”
89
Which pattern matches only file names that begin with “b”?
“b*”
90
Which pattern matches only file names where the first character is not “b”?
“[!b]*”
91
Which pattern matches all file names that contain a “b”?
“*b*”
92
Which pattern matches only file names that contain a number?
“*[[:digit:]]*”
93
Which pattern matches only file names that begin w/ an uppercase letter?
“[[:upper:]]*”
94
Which pattern matches only file names w/ at least 3 characters?
“???*”
95
can nest command expansions inside each other
“$(command)”
96
stops all shell expansion
Single quotation mark (‘)
97
stops most shell expansion
Double quotation mark (“)