Directory Listing Attributes Flashcards

1
Q

The beginning letter of attributes tells you what?

A

The type of file:

d = directory
l = link
- = regular file

examples:

drwxrw-rw-
lrw-rwxrwx
-rwxrwxrwx

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

What does the command chgrp do?

A

Changes the group of a file.

chgrp [group] [file]

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

What does the command chown do?

A

Changes ownership of a file.

chown user:group file

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

What is inode?

A

The number of a file on a hard disk.
Every time a file is created it is assigned a number to the file.

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

What is a soft link and how can you create one?

A

Link will be removed if the file is removed/renamed.
Command: ln -s
ln -s {source} {link}
ln -s /path/to/source /path/to/link

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

What is a hard link and how can you create one?

A

Deleting renaming or moving the original file will not affect the link. Hard Links only work in the same partition.
Command: ln
ln {source} {link}
ln /path/to/source /path/to/link

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

How can you change permissions for attributes on files, directories or links?

A

Using chmod. You can use chmod a+rwx file (a=all)
You can also use:
u - user (yourself)
g - group
o - other

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