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

24
Q

less action to scroll down one line

A

Down arrow

25
less action to move to the end of the text file
G
26
less action to move to the beginning of the text file
1G or g
27
less action to search forward to the next occurrence of characters
/characters
28
less action to search for the next occurrence of the previous search
n
29
less action to display help screen
h
30
less action to quit less
q
31
explain the meaning behind less is more
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
how would you determine the contents of an interesting file?
file filename | i.e. file john.txt
33
What is the copy and paste trick?
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
The Root directory. Where everything begins
/
35
contain.s binaries (programs) that must be present for the system to boot and run
/bin
36
contains the linux kernel, initial RAM disk image (for drivers needed at boot time), and the boot loader.
/boot
37
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.
/dev
38
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.
/etc
39
Contains shared library files used by the core system programs.
/lib
40
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.
/lost+found
41
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.
/media
42
This directory is used to install "optional" software. This is mainly used to hold commercial software products that might be installed on the system
/opt
43
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
/proc
44
This directory contains "system" binaries. These are programs that perform vital system tasks that are generally reserved for the superuser.
/sbin
45
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
/tmp
46
This directory tree is likely the largest one on a linux system. It contains all the programs and support files used by regular users.
/usr
47
This directory contains the executable programs installed by the Linux distribution. It is not uncommon for this directory to hold thousands of programs.
/usr/bin
48
The shared libraries for the programs in /usr/bin
/usr/lib
49
Where programs compiled for source code are normally installed
/usr/local/bin
50
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.
/usr/local
51
Contains more system administration programs.
/usr/sbin
52
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.
/usr/share
53
Most packages installed on the system will include some kind of documentation. In this tree we will find documentation files organized by package.
/usr/share/doc
54
This contains log files, records of various system activity. These are important and should be monitored from time to time.
/var/log
55
The most useful /var/logs
/var/log/messages and /var/log/syslog
56
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
/var