1.
In UNIX, which of these is the correct syntax for modifying File Access Permissions?
2.
Which of the following commands is used to archive a file in Unix?
3.
In Unix, which of the following commands is used to display the first few lines of a file?
4.
In Unix, which of the following commands is used to send the word count of the file infile to the file newfile?
5.
In Unix, which of the following commands is used to concatenate all the files that begin with the string emp and are followed by non-numeric characters?
6.
Which of the following interacts with the machine hardware in Unix based operating systems?
7.
Assume a file with name sample contains the following lines
sample
abc:def
g:hij:klm
no:pq:rs
tuvwxyz
abc:k
What will be the output if the user issues the below command? cut –d “:” –f 2 sample
8.
In UNIX, which of the following values is returned to the parent process if the fork() system call is executed?
9.
Consider the command ./a.out John loves you. Assume that a.out is an executable. If we execute ./a.out John loves you and try to access the command line arguments as shown in the example C code below, which of the following characters would be printed if we were to print argv[1][2] ?
Example C code to understand the question.
#include
int main(int argc, char * argv []) {
// What would be the value of argv[1][2] ?
printf("%c
", argv[1][2]);
}
10.
In Unix, let's say that you create a file my_custom_command with the following command as content
echo my custom command

What would happen if you execute the file my_custom_command?