• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

UNIX

Question 21

Unix command to change the case of first three lines of file “shortlist” from lower to upper
  • $ tr ‘[a – z]’ ‘[A – Z]’ shortlist ¦ head-3
  • $ head-3 shortlist ¦ tr ‘[a – z]’ ‘[A – Z]’
  • $ tr head -3 shortlist ‘[A – Z]’ ‘[a – z]’
  • $ tr shortlist head -3 ‘[a – z]’ ‘[A – Z]’

Question 22

Which of the following information about the UNIX file system is not correct?
  • Super block contains the number of i-nodes, the number of disk blocks, and the start of the list of free disk blocks.
  • An i-node contains accounting information as well as enough information to locate all the disk blocks that holds the file’s data.
  • Each i-node is 256-bytes long.
  • All the files and directories are stored in data blocks.

Question 23

In Unix, files can be protected by assigning each one a 9-bit mode called rights bits. Now, consider the following two statements: I. A mode of 641 (octal) means that the owner can read and write the file, other members of the owner’s group can read it, and users can execute only. II. A mode of 100 (octal) allows the owner to execute the file, but prohibits all other access. Which of the following options is correct with reference to above statements ?
  • Only I is correct.
  • Only II is correct.
  • Both I and II are correct.
  • Both I and II are incorrect.

Question 24

Which of the following statement is not correct with reference to cron daemon in UNIX O.S. ?
  • The cron daemon is the standard tool for running commands on a pre-determined schedule.
  • It starts when the system boots and runs as long as the system is up.
  • Cron reads configuration files that contain list of command lines and the times at which they invoked.
  • Crontab for individual users are not stored.

Question 25

In Unix, the command to enable execution permission for file “mylife” by all is ____________.
  • Chmod ugo + X myfile
  • Chmod a + X myfile
  • Chmod + X myfile
  • All of the above

Question 26

A student wishes to create symbolic links in a computer system running Unix. Three text files named "file 1", "file 2" and "file 3" exist in her current working directory, and the student has read and write permissions for all three files. Assume that file 1 contains information about her hobbies, file 2 contains information about her friends and file 3 contains information about her courses. The student executes the following sequence of commands from her current working directory
ln -s file 1 file 2
ln -s file 2 file 3
Which of the following types of information would be lost from her file system? (I) Hobbies (II) Friends (III) Courses
  • (I) and (II) only
  • (II) and (III) only
  • (II) only
  • (I) and (III) only

Question 27

A user level process in Unix traps the signal sent on a Ctrl-C input, and has a signal handling routine that saves appropriate files before terminating the process. When a Ctrl-C input is given to this process, what is the mode in which the signal handling routine executes?
  • kernel mode
  • superuser mode
  • privileged mode
  • user mode

Question 28

Match the following vi commands in Unix: 75
  • (1)
  • (2)
  • (3)
  • (4)

Question 29

Which of the following statement(s) is/are True regarding ‘nice’ command of UNIX ? I. It is used to set or change the priority of a process. II. A process’s nice value can be set at the time of creation. III. ‘nice’ takes a command line as an argument.

  • I, II only

  • II, III only

  • I, II, III

  • I, III only

Question 30

In UNIX, _________ creates three subdirectories : ‘PIS’ and two subdirectories ‘progs’ and ‘data’ from just created subdirectory ‘PIS’.
  • mkdir PIS/progs PIS/data PIS
  • mkdir PIS progs data
  • mkdir PIS PIS/progs PIS/data
  • mkdir PIS/progs data

There are 32 questions to complete.

Last Updated :
Take a part in the ongoing discussion