Linux Chapter 1 Flashcards

1
Q

$ vs # on bash

A

means root

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

Command quiz : df

A

Current amount of free space on our disk drive

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

Command quiz : free

A

Current amount of free memory

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

Command quiz : pwd

A

Print Working Directory

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

Do file extensions matter on Linux?

A

Nope. Contents and purpose of files are determined through other means.

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

Command quiz: cd with no arguments

A

Changes the working directory to your home directory.

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

Command quiz: cd ~user_name

A

Changes the working directory to the home directory of user_name. For example, typing cd ~bob will change the directory to the home directory of user “bob.

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

List contents of multiple directories

A

ls ~ /etc

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

Command quiz: ls -l

A

List files, but with more details (long)

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

What is the general format of commands?

A

command -option arguments.
Multiple options can be strung together. There are “long options” as well, which are options preceded by two dashes instead of one. Some short options have a long option version. For example, “ls -a” is the same as ls “–all”.

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

Command quiz: ls -dl

A

Ordinarily, if a directory is specified, ls will list the contents of the directory, not the directory itself. Use this option in conjunction with the -l option to see details about the directory rather than its contents.

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

Command quiz: ls -F

A

This option will append an indicator character to the end of each listed name. For example, it will append a forward slash (/) if the name is a directory.

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

Command quiz: ls -hl

A

In long format listings, display file sizes in human-readable format rather than in bytes.

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

Command quiz: ls -S

A

Sort results by file size.

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

Command quiz: ls -t

A

Sort by modification time.

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

What is the meaning of each category in the long format?

-rw-r–r– 1 root root 3576296 2017-04-03 11:05 Experience ubuntu.ogg

A

-rw-r–r–
Access rights to the file. The first character indicates the type of file. Among the different types, a leading dash means a regular file, while a d indicates a directory. The next three characters are the access rights for the file’s owner, the next three are for members of the file’s group, and the final three are for everyone else. Chapter9 discusses the full meaning of this in more detail.

1
File’s number of hard links. See “Symbolic Links” on page 21 and “Hard Links” on page 22.

root
The username of the file’s owner.

root
The name of the group that owns the file.32059Size of the file in bytes.

2017-04-03 11:05
Date and time of the file’s last modification.

oo-cd-cover.odf
Name of the file.

17
Q

Command quiz: file hello.jpg

A

The file command will print a brief description of the file’s contents.