03 Exploring The System Flashcards

(53 cards)

1
Q

What command does ‘ls’ invoke?

A

Lists the contents of the current or specified directory.

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

Describe the output of the command “ls -l”:

A

Provides the “long listing” (the details) of the current or specified directory.

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

The command ‘ls -l’ was performed and generate the following output. Describe the output:

Total 56
Drwxrwxr-x 2 me wheel 4096 2018-08-07 17:05 myfile.txt

A
Drwxrwxr-x : File permissions
2: Number of hard links to file
Me: owner
Wheel: owner group
4096: File size
2018…: last modified time
Myfile.txt: file name
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

“Commands are often followed by one or more [blank] that modify their behavior, & further by one or more [blank].

A

Options / arguments

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

“Commands are often followed by one or more options that modify their behavior, & further by one or more arguments.”

What is meant by ‘arguments’ in the above statement?

A

‘Arguments’ refers to the items on which the command option(s) act.

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

Describe the options and long options for the following description of the ‘ls’ command.

“Lists all files, even those that begin with a period, which are normally hidden.”

A

-a / - - all

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

Describe the options and long options for the following description of the ‘ls’ command.

“Output is like ‘-a’, although ‘.’ & ‘..’ are hidden.”

A

-A / - -almost-all

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

Describe the options and long options for the following description of the ‘ls’ command.

“Normally, if a directory is specified, ls will list the contents of the directory. Supplying this argument will list details about the directory instead.”

A

-d / - -directory

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

Describe the options and long options for the following description of the ‘ls’ command.

“Append an indicative character to the end of output, for example, a ‘/‘ at the end of directories.”

A

-F / - -classify

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

Describe the options and long options for the following description of the ‘ls’ command.

“Displays file size in a human-readable format as opposed to bytes.”

A

-h / - -human-readable

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

Describe the options and long options for the following description of the ‘ls’ command.

“Displays results in long format.”

A

-l / [no long option]

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

Describe the options and long options for the following description of the ‘ls’ command.

“Displays results in reverse order.”

A

-r / - -reverse

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

Describe the options and long options for the following description of the ‘ls’ command.

“Sort files by file size.”

A

-S / [no long options]

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

Describe the options and long options for the following description of the ‘ls’ command.

“Sort output by modification time.”

A

-t / [no long options]

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

Which command would you use to determine the type of a given file?

A

file

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

True or False: filenames in Linux are required to describe the file type, eg: ‘foobar.pdf’

A

False. Extensions are not required, and if present, do not have to indicate the file type.

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

True or false: In Linux, “Everything is a file”.

A

True

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

What is the purpose of the program ‘less’?

A

It is a “pager” used to view text files.

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

With regard to the ‘less’ program, how do you…

Go back one page?

A

[Page up] or b

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

With regard to the ‘less’ program, how do you…

Go forward one page?

A

[Page down] or [space]

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

With regard to the ‘less’ program, how do you…

Scroll up one line?

A

[up arrow]

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

With regard to the ‘less’ program, how do you…

Scroll down one line?

23
Q

With regard to the ‘less’ program, how do you…

Move to the end of the file?

24
Q

With regard to the ‘less’ program, how do you…

Move to the beginning of the file?

25
With regard to the ‘less’ program, how do you… Search the file for the next occurrence of *characters*?
/characters
26
With regard to the ‘less’ program, how do you… Search for the next occurrence of the previous search?
n
27
With regard to the ‘less’ program, how do you… Display the help screen?
h
28
With regard to the ‘less’ program, how do you… Quit ‘less’?
q
29
# Define the given directory as described by the Linux Filesystem Hierarchy Standard: /
The root directory.
30
# Define the given directory as described by the Linux Filesystem Hierarchy Standard: /bin
Binaries that must be present for the system to boot. Fundamental utilities such as ‘ls’ and ‘cp’.
31
# Define the given directory as described by the Linux Filesystem Hierarchy Standard: /boot
Contains the kernel, boot loader, and initial RAM disk image (drivers needed at boot time)
32
# Define the given directory as described by the Linux Filesystem Hierarchy Standard: /dev
Contains “device nodes”, a list of devices that the kernel understands.
33
# Define the given directory as described by the Linux Filesystem Hierarchy Standard: /etc
Contains system-wide configuration files & shell scripts that start system services.
34
# Define the given directory as described by the Linux Filesystem Hierarchy Standard: /home
Contains user home directories.
35
# Define the given directory as described by the Linux Filesystem Hierarchy Standard: /lib
Contains essential shared libraries used by core system programs.
36
# Define the given directory as described by the Linux Filesystem Hierarchy Standard: /lost+found
Used in cases of partial filesystem corruptions.
37
# Define the given directory as described by the Linux Filesystem Hierarchy Standard: /media
On modern Linux systems, mount points for removable media devices that are mounted automatically.
38
# Define the given directory as described by the Linux Filesystem Hierarchy Standard: /mnt
On older Linux systems, used as a temporary mount point.
39
# Define the given directory as described by the Linux Filesystem Hierarchy Standard: /opt
Contains locally installed software, one sub directory per package.
40
# Define the given directory as described by the Linux Filesystem Hierarchy Standard: /proc
A virtual filesystem maintained by the kernel that describes how the kernel “sees” the computer.
41
# Define the given directory as described by the Linux Filesystem Hierarchy Standard: /root
The home directory for the root user.
42
# Define the given directory as described by the Linux Filesystem Hierarchy Standard: /shin
Stands for “system (or super user) binaries” and contains fundamental utilities, usually needed to start, maintain, or recover the system.
43
# Define the given directory as described by the Linux Filesystem Hierarchy Standard: /tmp
Contains temporary, transient files not expected to survive a reboot.
44
# Define the given directory as described by the Linux Filesystem Hierarchy Standard: /usr
Contains programs and support files used by regular system users.
45
# Define the given directory as described by the Linux Filesystem Hierarchy Standard: /usr/bin
Contains all programs installed by the distribution.
46
# Define the given directory as described by the Linux Filesystem Hierarchy Standard: /usr/lib
Contains shared libraries used by programs in /usr/bin
47
# Define the given directory as described by the Linux Filesystem Hierarchy Standard: /usr/local
Location where programs not installed by the distribution (but intended for system-wide use) are installed.
48
# Define the given directory as described by the Linux Filesystem Hierarchy Standard: /usr/local/bin
Contains programs that are compiled from source code.
49
# Define the given directory as described by the Linux Filesystem Hierarchy Standard: /usr/bin
Additional system administration programs
50
# Define the given directory as described by the Linux Filesystem Hierarchy Standard: /usr/share
Contains all shared data used by programs in /usr/bin, such as backgrounds, icons, sound files, etc.
51
# Define the given directory as described by the Linux Filesystem Hierarchy Standard: /usr/share/doc
Documentation files organized by package
52
# Define the given directory as described by the Linux Filesystem Hierarchy Standard: /var
Location where data that is likely to change is stored, for example, databases, spool files, user mail
53
# Define the given directory as described by the Linux Filesystem Hierarchy Standard: /var/log
Contains system log files