Unix Basics Practice Test: Basic File Attributes — Flashcards | Unix Programming | FatSkills

Unix Basics Practice Test: Basic File Attributes — Flashcards

Fast review mode: answers are shown by default so you can skim quickly. Hide them if you want to self-test.

Quiz questions on listing file and directory attributes, file ownership and permissions.

File attributes can be viewed using the ls -l command.
For example, the following output shows the attributes for a file named myfile.txt: -rw-r--r-- 1 user group 1024 Mar 8 12:00 myfile.txt

The first character in the output indicates the file type. In this case, the - character indicates that the file is a regular file. The next three characters indicate the file permissions for the owner, group, and other users. In this case, the rw- permission indicates that the owner has read and write permission, the group has read permission, and other users have no permission.
The next three characters indicate the file owner and group. In this case, the file is owned by the user user and the group group. The next number indicates the file size in bytes. In this case, the file is 1024 bytes in size.
The next three characters indicate the file modification time. In this case, the file was last modified on March 8th at 12:00 PM. The last character in the output is the file name. In this case, the file name is myfile.txt.
You can use the chmod command to change the file permissions, and the chown command to change the file owner and group. You can also use the touch command to change the file modification time.

1 of 47 Ready
An attribute is a specification of an object that defines its property.
True
Shortcuts
Prev Space Show / hide Next
Turn this into a study set.
Sign in with Google to save tricky questions to your reminder list and resume on any device.
Sign in with Google Free • no extra password