WorksheetsUSP Module III
Total questions: 20
Worksheet time: 10mins
Which command is explicitly listed for displaying detailed file information?
ls -l
cat -n
grep -r
pwd
Which option is mentioned alongside the ls command for handling directories?
-a option
-d option
-h option
-R option
Which utility is named for modifying permissions?
chmod
chown
touch
cp
There are 3 different modes of the vi editor. Which pair best matches typical vi modes?
Insert and visual
Command and input
Debug and compile
Search and replace
Which vi mode’s commands are typically used for saving and quitting ?
Input mode commands
Command mode commands
ex-mode commands
Repeat command
When using ls -l , which information is typically included in first column?
Only file names
File type and permissions details
Process IDs and memory usage
Network socket states
Which would be most relevant mode for moving the cursor and issuing editor operations?
Command mode commands
Input mode commands
Changing file ownership
ls -l
In ls -l , which column shows the owner of each file?
First column
Third column
Fourth column
Fifth column
A file listing shows a size of 300 bytes. Which explanation best accounts for why the disk space used could be larger than 300 bytes?
Size includes hidden metadata, inflating the byte count shown
The listed size is a character count; files are stored on disk in fixed blocks such as 512 or 1024 bytes, so allocation rounds up
Group ownership adds extra storage overhead to every file
The modification time is stored as a 1024-byte field, increasing the disk space
You want to view attributes of a directory itself (type, permissions, owner, group, size, timestamp) rather than listing its contents. Which command accomplishes this for a directory named progs?
ls progs
ls -l progs
ls -ld progs
ls -a progs
A file’s contents are unchanged, but you run chmod to alter its permissions and chown to switch its owner. What happens to the file’s last modification time shown in the ls listing, and why does this matter when auditing changes?
It updates because any filesystem change resets the modification time, making permission changes traceable to content edits.
It remains unchanged because modification time reflects only content changes, helping auditors distinguish edits from administrative actions.
It updates only if the file is less than a year old, since the timestamp field behaves differently for recent files.
It is replaced by the year whenever ownership changes, indicating a security-related modification.
In relative mode, which abbreviation refers to the category that includes user, group, and others all together when using chmod?
u
g
o
a
After running chmod ugo+x chap1 on a file that previously lacked execute permission for all categories, which statement best explains the resulting permission change?
Only the owner gains execute permission; group and others remain unchanged.
All three categories—user, group, and others—gain execute permission while existing read/write bits stay as they were.
Execute permission is removed for all categories and replaced with read permission.
The command sets absolute permissions, overwriting all previous read and write bits.
You need to remove read permission from both group and others on file chap1 using a single symbolic chmod expression. Which command accomplishes this?
chmod go-r chap1
chmod g,o-r chap1
chmod a-r chap1
chmod ugo-r chap1
Starting from permissions shown as "-rwxr-xr-x" for chap1, you want to achieve user=rwx, group=rw, others=rw while leaving group and others unchanged by using an absolute assignment for only the user. Which single symbolic chmod command fits this requirement?
chmod a=rwx chap1
chmod u=rwx chap1
chmod ug=rwx chap1
chmod o=rwx chap1
Recall the octal values used to represent basic permissions in chmod. Which mapping is correct for a single category (user, group, or others)?
read = 4, write = 2, execute = 1
read = 1, write = 2, execute = 4
read = 2, write = 4, execute = 1
read = 7, write = 5, execute = 3
What is the command to save the complete listing of all files and directories?
$ ls –l > filename
$ls –lF> filename
$ ls > filename
None of the above
Show the octal representation for the permission string rwxr-xrw-
756
765
777
766
What will the permissions string look like for the octal value 567?
rwxrwxrwx
rw-rwxrwx
r-xrw-rwx
rw-rw-r--
Where are the UID and GID of a file stored?
/etc/passwd
/passwd
/etc/password
All of the above
