Intro 6 Flashcards

1
Q

644

A

user: read/write
group, other: read

used for files

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

600

A

user: read/write
group, other: none

used for files

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

755

A

user: read/write/execute
group, other: read/execute

used for directories, programs

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

700

A

user: read/write/execute
group, other: none

used for directories and programs

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

711

A

user: read/write/execute:
group, other: execute

used for directories

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

You can list the contents of a directory if it’s readable, but you can only access a file in a directory if the directory is _______.

A

executable

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

Your system may have links that point to other links, which are called _______.

A

chained symbolic links

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

Symbolic links can cause headaches when you don’t know that they exist. For example, you could ____

A

easily edit what you think is a copy of a file, but is actually a symbolic link to the original.

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

Don’t confuse the syntax of symbolic link creation!

A

ln -s target linkname

not

ln -s linkname target!

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

How do you uncompress file.gz and remove the suffix?

A

gunzip file.gz

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

How do you compress a file with GNU Zip?

A

gzip file

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

Unlike the zip programs for other operating systems, gzip does not _______.

A

create archives of files

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

tar extract mode flag

A

x

e.g. tar xvf archive.tar

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

When using extract mode, remember that tar does not ______ after extracting its contents

A

remove the archived .tar file

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

table of contents mode for tar

A

t

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

When unpacking, consider using the _ option to preserve permissions.

A

p

17
Q

The p option is the default when working as the superuser. If you’re having trouble with permissions and ownership when unpacking an archive as the superuser, make sure that you _____________. Although you may only want to extract a small part of an archive, _____________, and you must not interrupt the process because _____

A

are waiting until the command terminates and you get the shell prompt back
tar must run through the whole thing
it sets the permissions only after checking the entire archive

18
Q

What two commands unzip compressed tarballs?

A

gunzip file.tar.gz

tar xvf file.tar

19
Q

How can you unpack a compressed archive with one line using zcat?

A

zcat file.tar.gz | tar xvf -

20
Q

What is the zcat command?

A

The same as gunzip -dc where the -d decompresses and the -c sends the results to standard output

21
Q

What is a .tgz file extension?

A

The same as a .tar.gz file (it’s meant to fit into FAT (MS-DOS-based) filesystems.

22
Q

____, while marginally slower than gzip, often compacts _____ a little more, and it is therefore increasingly popular in the distribution of source code.

A

bzip2

text files

23
Q

What is the decompressing program from bzip2?

A

bunzip2

24
Q

What is the bzip2 compression/decompression option for tar?

A

j

25
Q

A new compression program named __ is also gaining popularity. The corresponding decompression program is ___.

A

xz

unxz

26
Q

If you encounter a file that ends in .Z, ____.

A

you have found a relic created by the compress program, which was once the Unix standard.

27
Q

What are the nine subdirectories of root?

A
bin
dev
etc
usr
home
lib
sbin
tmp
var
28
Q

What are the two subdirectories of var?

A

log

tmp

29
Q

What are the six subdirectories of usr?

A
bin
man
lib
local
sbin
share