Assume the following is the directory “tests” under my home directory. bash3.2$
ID: 3791449 • Letter: A
Question
Assume the following is the directory “tests” under my home directory.
bash3.2$ ls -al
11
drwx------ 2 kuitche kuitche 2048 Oct 23 20:59 awk
-rw------- 1 kuitche kuitche 808 Jul 24 2000 bin.doc
drwxrwxrwx 3 kuitche root 2048 Jul 12 14:04 junk
-rwxrwxrwx 1 kuitche root 21504 Jul 13 2000 this.dir
Complete the table below
File name
File type
File size
(in bytes)
File Owner
Group permissions
awk
bin.doc
junk
this.dir
1. What disk space, in bytes, is occupied by the subdirectory “tests”?
2. Give the command(s) to change the permissions on the file this.dir to read only for the owner’s group; to read, write and execute for the owner; and read & execute for everyone else
3. Assume I go through the following sequence of three UNIX command steps:
bash3.2$ echo this is a script file > script.bash
bash3.2$ chmod 342 script.bash
bash3.2$ ls –al
Give the output line corresponding to script.bash
4. Assume the permissions for a given file "random" is unknown. Explain how, as an administrator, you will remove execute and write permissions (without altering existing permissions) from other people using the system.
File name
File type
File size
(in bytes)
File Owner
Group permissions
awk
bin.doc
junk
this.dir
Explanation / Answer
1.
File name
File type
File size
(in bytes)
File Owner
Group permissions
awk
bin.doc
junk
this.dir
1. The disk space occupied by the sub directory "tests" is 2048+808+2048+21504=26,408 bytes.
2. The command is $chmod 745 this.dir
3. The output of script.bash
--wxr---w- 1 shreya staff 22 Feb 13 12:20 script.bash
4. The command is $chmod o-wx random
File name
File type
File size
(in bytes)
File Owner
Group permissions
awk
directory 2048 kuitche No permission to read, write or executebin.doc
regular file 808 kuitche No permission to read, write or executejunk
directory 2048 kuitche has permissin to read, write and executethis.dir
regular file 21504 kuitche has permissin to read, write and executeRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.