adplus-dvertising
frame-decoration

Question

Consider the following UNIX command:

sort < in > temp; head -30 < temp; rm temp

Which of the following functions shall be performed by this command?

a.

Sort, taking the input from "temp", prints 30 lines from temp and delete the file temp

b.

Sort the file "temp", removes 30 lines from temp and delete the file temp

c.

Sort, taking the input from "in" and writing the output to "temp" then prints 30 lines from temp on terminal. Finally "temp" is removed

d.

Sort, taking the input from 'temp" and then prints 30 lines from "temp" on terminal. Finally "temp" is removed

Answer: (c).Sort, taking the input from "in" and writing the output to "temp" then prints 30 lines from temp on terminal. Finally "temp" is removed

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Consider the following UNIX command: sort < in > temp; head -30 < temp; rm temp Which of the following functions shall be performed by this command?

Similar Questions

Discover Related MCQs

Q. The mv command changes

Q. A UNIX file system has 1 KB block size and 4-byte disk addresses. What is the maximum file size if the inode contains ten direct block entries, one single indirect block entry, one double indirect block entry and one triple indirect block entry?

Q. 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 ?

Q. Which one of the following options is not a shell in UNIX system?

Q. Which command allows you to view your file 24 lines at a time ?

Q. The Unix command used to find out the number of characters in a file is

Q. Find the odd man out:

Q. Which of the following changes permission to deny write permission to group and others?

Q. Which of the following OS treats hardware as a file system?

Q. An example of a memory management system call in UNIX is:

Q. An example of a directory found in most UNIX system is:

Q. The “nice” command is used in Unix:

Q. Which of the following is not an Unix Command ?

Q. A system call in Linux operating system to create a new child process, which is a copy of the parent process:

Q. The environment variable in Linux, that contain a list of directories the shell automatically recognizes.

Q. In Linux, the subdirectory that contains system configuration files including user passwords:

Q. Linux partitions are created using the file system:

Q. Which UNIX/Linux command is used to make all files and sub-directories in the directory “progs” executable by all users?

Q. Consider the following statements :

(a) UNIX provides three types of permissions
* Read
* Write
* Execute
(b) UNIX provides three sets of permissions
* permission for owner
* permission for group
* permission for others

Which of the above statement/s is/are true?

Q. Match the following WINDOWS system calls and UNIX system calls with reference to process control and File manipulation.

Windows
(a) Create - process ()
(b) WaitForSingleObject ()
(c) CreateFile ()
(d) CloseHandle ()

UNIX
(i) Open ()
(ii) Close ()
(iii) Fork ()
(iv) Wait ()

Code :
(a) (b) (c) (d)