03 Exploring The System Flashcards

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?

A

[down arrow]

23
Q

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

Move to the end of the file?

A

G

24
Q

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

Move to the beginning of the file?

A

1G or g

25
Q

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

Search the file for the next occurrence of characters?

A

/characters

26
Q

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

Search for the next occurrence of the previous search?

A

n

27
Q

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

Display the help screen?

A

h

28
Q

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

Quit ‘less’?

A

q

29
Q

Define the given directory as described by the Linux Filesystem Hierarchy Standard:

/

A

The root directory.

30
Q

Define the given directory as described by the Linux Filesystem Hierarchy Standard:

/bin

A

Binaries that must be present for the system to boot. Fundamental utilities such as ‘ls’ and ‘cp’.

31
Q

Define the given directory as described by the Linux Filesystem Hierarchy Standard:

/boot

A

Contains the kernel, boot loader, and initial RAM disk image (drivers needed at boot time)

32
Q

Define the given directory as described by the Linux Filesystem Hierarchy Standard:

/dev

A

Contains “device nodes”, a list of devices that the kernel understands.

33
Q

Define the given directory as described by the Linux Filesystem Hierarchy Standard:

/etc

A

Contains system-wide configuration files & shell scripts that start system services.

34
Q

Define the given directory as described by the Linux Filesystem Hierarchy Standard:

/home

A

Contains user home directories.

35
Q

Define the given directory as described by the Linux Filesystem Hierarchy Standard:

/lib

A

Contains essential shared libraries used by core system programs.

36
Q

Define the given directory as described by the Linux Filesystem Hierarchy Standard:

/lost+found

A

Used in cases of partial filesystem corruptions.

37
Q

Define the given directory as described by the Linux Filesystem Hierarchy Standard:

/media

A

On modern Linux systems, mount points for removable media devices that are mounted automatically.

38
Q

Define the given directory as described by the Linux Filesystem Hierarchy Standard:

/mnt

A

On older Linux systems, used as a temporary mount point.

39
Q

Define the given directory as described by the Linux Filesystem Hierarchy Standard:

/opt

A

Contains locally installed software, one sub directory per package.

40
Q

Define the given directory as described by the Linux Filesystem Hierarchy Standard:

/proc

A

A virtual filesystem maintained by the kernel that describes how the kernel “sees” the computer.

41
Q

Define the given directory as described by the Linux Filesystem Hierarchy Standard:

/root

A

The home directory for the root user.

42
Q

Define the given directory as described by the Linux Filesystem Hierarchy Standard:

/shin

A

Stands for “system (or super user) binaries” and contains fundamental utilities, usually needed to start, maintain, or recover the system.

43
Q

Define the given directory as described by the Linux Filesystem Hierarchy Standard:

/tmp

A

Contains temporary, transient files not expected to survive a reboot.

44
Q

Define the given directory as described by the Linux Filesystem Hierarchy Standard:

/usr

A

Contains programs and support files used by regular system users.

45
Q

Define the given directory as described by the Linux Filesystem Hierarchy Standard:

/usr/bin

A

Contains all programs installed by the distribution.

46
Q

Define the given directory as described by the Linux Filesystem Hierarchy Standard:

/usr/lib

A

Contains shared libraries used by programs in /usr/bin

47
Q

Define the given directory as described by the Linux Filesystem Hierarchy Standard:

/usr/local

A

Location where programs not installed by the distribution (but intended for system-wide use) are installed.

48
Q

Define the given directory as described by the Linux Filesystem Hierarchy Standard:

/usr/local/bin

A

Contains programs that are compiled from source code.

49
Q

Define the given directory as described by the Linux Filesystem Hierarchy Standard:

/usr/bin

A

Additional system administration programs

50
Q

Define the given directory as described by the Linux Filesystem Hierarchy Standard:

/usr/share

A

Contains all shared data used by programs in /usr/bin, such as backgrounds, icons, sound files, etc.

51
Q

Define the given directory as described by the Linux Filesystem Hierarchy Standard:

/usr/share/doc

A

Documentation files organized by package

52
Q

Define the given directory as described by the Linux Filesystem Hierarchy Standard:

/var

A

Location where data that is likely to change is stored, for example, databases, spool files, user mail

53
Q

Define the given directory as described by the Linux Filesystem Hierarchy Standard:

/var/log

A

Contains system log files