Вы находитесь на странице: 1из 4

03 - UNIX File System - Exercise 1

Q. What is the list of all the regular files that are present under “exercises”
sub directory of the directory “Testbed” of your home folder.
o ( Choose one )
o east.txt, north.txt, south.txt, west.txt
o Azure.lst, dummy.c, one.sh, party.file, soundbox, words.lst
o Azure.lst, dummy.c, one.sh, party.file, words.lst
o Azure.lst, doc, dummy.c, filters, one.sh, party.file, soundbox, src, vim,
words.lst
03 - UNIX File System - Exercise 2
Q. The file “dummy.c” is present under the “exercises” sub directory of the “Testbed” directory.
Copy “dummy.c” file to src sub directory under “exercises” directory. What is the list of files in
“src” directory after the copy is completed ?
( Choose one )
o east.txt, north.txt, south.txt, west.txt
o Azure.lst, dummy.c, one.sh, party.file, soundbox, words.lst
o dummy.c
o Azure.lst, doc, dummy.c, filters, one.sh, party.file, soundbox, src, vim, words.lst

Q. What is the time stamp of the file “dummy.c” after it is copied to “src” directory ?
( Choose one )
o Ahead of the time stamp of the original file in “exercises” directory
o Earlier than the time stamp of the original file in “exercises” directory
o Same as the time stamp of the original file in “exercises” directory

Q. Copy the file “dummy.c” to the “src” sub directory by preserving the time stamp. What is the
time stamp and the size of the file copied in the “src” directory ?
( Choose one )
o Timestamp is same as original file, but the file size increases
o Timestamp is ahead of the original file in the “exercises” directory, but file size is same
o Both timestamp and file size are same as the original file in “exercises” directory

03 - UNIX File System - Exercise 3

Q. The file “Azure.lst” is present under the “exercises” sub directory of the “Testbed” directory.
Rename “Azure.lst” to “Crimson.txt”. What is the list of regular files in “exercises” directory after
renaming “Azure.lst” file.
( Choose one )
o Azure.lst, dummy.c, one.sh, party.file, soundbox, words.lst
o Crimson.txt, dummy.c, one.sh, party.file, soundbox, words.lst
o Azure.lst, Crimson.txt, dummy.c, one.sh, party.file, soundbox, words.lst
o Copy command will retain the original file, but not the rename command
What are the permissions and file size of “Azure.lst” after it is renamed to “Crimson.txt” ?
( Choose one )
Both permissions and file size remain the same after renaming the file
Permissions are same, but the file size increases
File gets execute permissions, but the file size remains same
File permissions are not impacted by the rename command

03 - UNIX File System - Exercise 4

Q. Create a new directory called “work” under “exercises” sub directory of the “Testbed”
directory. List all the files in “work” directory
( Choose one )
o The directory is empty
o Azure.lst, dummy.c, one.sh, party.file, soundbox, words.lst
o . and ..

Q. Navigate to “work” directory and copy dummy.c from “exercises” directory as main.c
in current directory. What is the time stamp and the size of the file copied in the
“work” directory ?
( Choose one )
o Timestamp and file size of “main.c” file are same as that of “dummy.c” file
o Timestamp of “main.c” is ahead of the “dummy.c” file, but file sizes of both the
files are same
o Timestamp of “main.c” is earlier than that of the “dummy.c” file, but file sizes of both the
files are same

Q. Disable execute permissions for all the users who own on the file “main.c”. What are
the new permissions for “main.c” file now ?
( Choose one )
o -rw- r-x r-x
o -rw- r- -r- -
o -rw- r- xr- -
o -rwx r-x r- -

03 - UNIX File System - Exercise 5


Who is the owner of the file “one.sh” present under the “exercises” sub directory of the “Testbed”
directory ?
( Choose one )
The login user id
root user
students user
Which group does the file “one.sh” present under the “exercises” sub directory of the “Testbed”
directory belong to ?
( Choose one )
bin group
The group of the login user id
root group

Who has the execute permissions for the file “one.sh” present under the “exercises” sub directory
of the “Testbed” directory ?
( Choose one )
All the users who belong to the group of the file
The owner of the file
Everyone on the system, except the owner and the users who belong to the group of the
file

Change the group of “one.sh” file present under the “exercises” sub directory of the “Testbed”
directory to “students” group. Who has the execute permissions for the file now ?
( Choose one )
The owner of the file
Everyone on the system, except the owner and the users who belong to the group of the
file
All the users who belong to the group “students”

03 - UNIX File System - Exercise 6

What is the disk usage of “work” directory created under “exercises” directory ?
( Choose one )
8 Kilobytes
8 blocks
4 blocks
4 Kilobytes

 03 - UNIX File System - Exercise 7

What is the last line of the file “one.sh” present under “exercises” directory ?
( Choose one )
An empty line
echo "Thanks for using this script"
echo
Shell prompt
03 - UNIX File System - Exercise 8

What is the line number of the last line of the file “one.sh” present under “exercises” directory ?
( Choose one )
78
37
36

03 - UNIX File System - Exercise 9


Archive the “doc” directory present under “exercises” sub directory of the “Testbed” directory.
What is the size of the archive file ?
( Choose one )
650 KB
66 KB
84 KB
4 KB

03 - UNIX File System - Exercise 9


Archive the “doc” directory present under “exercises” sub directory of the “Testbed” directory and
compress the archive file. What is the size of the compassed file ?
( Choose one )
650 KB
66 KB
84 KB
4 KB

bash $HOME/workspace/M02_E01_Listing_Files/src/testbed_setup.sh

Вам также может понравиться