Ch.3 Exploring the System Flashcards

1
Q

What does the command file do?

A

Determine file type

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

What does the command less do?

A

View file contents

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

How do you specify the directory to list?

A

ls /usr

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

if ls is commanded what does it list?

A

The contents of the current directory

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

How do you list multiple directories at once?

A

ls /usr ~ /usr/bin

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

How do you change the list command output to the long format?

A

ls -l

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

What do commands kind of look like?

A

Command -options arguments

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

What do most commands use?

A

options with consist of a single character preceded by a dash. i.e. -l

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

What are GNU Project options called and how do they look?

A

They are called long options, and they consist of a word preceded by two dashes

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

What option will list all files, even those with names that begin with a period, which are normally not listed (That is, hidden)?

A

-a, –all

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

What lists everything but the . and ..?

A

-A, –almost-all

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

Use this option in conjunction with the -l option to see details about the directory rather than its contents

A

-d, -directory

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

This option will append an indicator character to the end of each listed name.

A

-F, –classify

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

In long format listings, display file size in human readable format rather than in bytes

A

-h, –human–readable

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

Display the results in reverse order. Normally, ls displays its results in ascending alphabetical order.

A

-r, –reverse

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

sort by modification time

A

-t

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

What seven things are contained in the ls Long Listing Fields?

A
  1. Access rights to the file
  2. File’s number of hard links 3. username of the file’s owner 4. name of the group that owns the file 5. size of the file in bytes 6. Date and Time of the file’s last modification 7. Name of the file
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What does ASCII stand for and what is it?

A

(AS-KEY) American Standard Code for Information Interchange. It is a simple encoding scheme first used on teletype machines to may keyboard characters to numbers.

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

Why would we want to examine text files

A

Many of the files that contain system settings are stored in this format, and being able to read them gives us insight about how the system works.

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

How is the less command used?

A

less filename

i.e. less /etc/passwd

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

less action to scroll back one page

A

Page Up or b

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

less action to scroll forward one page

A

Page Down or space

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

less action to scroll up one line

A

Up arrow

24
Q

less action to scroll down one line

A

Down arrow

25
Q

less action to move to the end of the text file

A

G

26
Q

less action to move to the beginning of the text file

A

1G or g

27
Q

less action to search forward to the next occurrence of characters

A

/characters

28
Q

less action to search for the next occurrence of the previous search

A

n

29
Q

less action to display help screen

A

h

30
Q

less action to quit less

A

q

31
Q

explain the meaning behind less is more

A

less is a replacement of more. it falls into the class of programs called “pagers”, programs that allow the easy viewing of long text documents in a page by page manners. More could only page forward.

32
Q

how would you determine the contents of an interesting file?

A

file filename

i.e. file john.txt

33
Q

What is the copy and paste trick?

A

If you are using a mouse, you can double click on a filename to copy it and middle click to paste it into commands

34
Q

The Root directory. Where everything begins

A

/

35
Q

contain.s binaries (programs) that must be present for the system to boot and run

A

/bin

36
Q

contains the linux kernel, initial RAM disk image (for drivers needed at boot time), and the boot loader.

A

/boot

37
Q

This is a special directory that contains device nodes. “Everything is a file” also applies to devices. Here is where the kernel maintains a list of all the devices it understands.

A

/dev

38
Q

this directory contains all of the system-wide configuration files. It also contains a collection of shell scripts that start each of the system services at boot time. Everything in this directory should be readable text.

A

/etc

39
Q

Contains shared library files used by the core system programs.

A

/lib

40
Q

Each formatted partition or device using a linux file system such as ext4, will have this directory. it is used in the case of a partial recovery from a file system corruption event.

A

/lost+found

41
Q

On modern linux systems this directory will contain the mount points for removable media such as USB drives, CD-Roms, etc. that are mounted automatically at insertion.

A

/media

42
Q

This directory is used to install “optional” software. This is mainly used to hold commercial software products that might be installed on the system

A

/opt

43
Q

This directory is special. It’s not a real file system in the sense of files stored on the hard drive. Rather, it is a virtual file system maintained by the Linux kernel. The “files” it contains are peepholes into the kernel itself. The files are readable and will give us a picture of how the kernel sees the computer

A

/proc

44
Q

This directory contains “system” binaries. These are programs that perform vital system tasks that are generally reserved for the superuser.

A

/sbin

45
Q

This directory is intended for the storage of temporary, transient files created by various programs. Some configurations cause this directory to be emptied each time the system is reboooted

A

/tmp

46
Q

This directory tree is likely the largest one on a linux system. It contains all the programs and support files used by regular users.

A

/usr

47
Q

This directory contains the executable programs installed by the Linux distribution. It is not uncommon for this directory to hold thousands of programs.

A

/usr/bin

48
Q

The shared libraries for the programs in /usr/bin

A

/usr/lib

49
Q

Where programs compiled for source code are normally installed

A

/usr/local/bin

50
Q

On a newly installed Linux system, this tree exists, but it will be empty until the system administrator puts something in it. This tree is where programs that are not included with the distribution but are intended for system wide use are installed.

A

/usr/local

51
Q

Contains more system administration programs.

A

/usr/sbin

52
Q

This tree contains all the shared data used by programs in /usr/bin. This includes things such as default configuration files, icons, screen backgrounds, sound files, etc.

A

/usr/share

53
Q

Most packages installed on the system will include some kind of documentation. In this tree we will find documentation files organized by package.

A

/usr/share/doc

54
Q

This contains log files, records of various system activity. These are important and should be monitored from time to time.

A

/var/log

55
Q

The most useful /var/logs

A

/var/log/messages and /var/log/syslog

56
Q

With the exception of /tmp and /home, the directories we have looked at so far remain relatively static, that is, their contents don’t change. This directory tree is where data that is likely to change is stored. Various databases, spool files, user mail, etc. are located here

A

/var