Directory Listing Attributes Flashcards
The beginning letter of attributes tells you what?
The type of file:
d = directory
l = link
- = regular file
examples:
drwxrw-rw-
lrw-rwxrwx
-rwxrwxrwx
What does the command chgrp do?
Changes the group of a file.
chgrp [group] [file]
What does the command chown do?
Changes ownership of a file.
chown user:group file
What is inode?
The number of a file on a hard disk.
Every time a file is created it is assigned a number to the file.
What is a soft link and how can you create one?
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
What is a hard link and how can you create one?
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 can you change permissions for attributes on files, directories or links?
Using chmod. You can use chmod a+rwx file (a=all)
You can also use:
u - user (yourself)
g - group
o - other