Question
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
Posted under UGC NET computer science question paper UNIX System
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
View solution
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?
View solution
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 ?
View solution
Q. Which one of the following options is not a shell in UNIX system?
View solution
Q. Which command allows you to view your file 24 lines at a time ?
View solution
Q. The Unix command used to find out the number of characters in a file is
View solution
Q. Find the odd man out:
View solution
Q. Which of the following changes permission to deny write permission to group and others?
View solution
Q. Which of the following OS treats hardware as a file system?
View solution
Q. An example of a memory management system call in UNIX is:
View solution
Q. An example of a directory found in most UNIX system is:
View solution
Q. The “nice” command is used in Unix:
View solution
Q. Which of the following is not an Unix Command ?
View solution
Q. A system call in Linux operating system to create a new child process, which is a copy of the parent process:
View solution
Q. The environment variable in Linux, that contain a list of directories the shell automatically recognizes.
View solution
Q. In Linux, the subdirectory that contains system configuration files including user passwords:
View solution
Q. Linux partitions are created using the file system:
View solution
Q. Which UNIX/Linux command is used to make all files and sub-directories in the directory “progs” executable by all users?
View solution
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?
View solution
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)
View solution
Suggested Topics
Are you eager to expand your knowledge beyond UNIX System? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!