Operating System

31. Which Unix command performs sorting June files by size?
June files sort करने वाला command कौन-सा है?
(UGC NET C.S. August-2016 (Paper-III))
A. ls -l |grep \June\" | sort +10n"""
B. ls -l |grep \June\" | sort +10r"""
C. ls -l |grep -v \June\" | sort +10n"""
D. ls -l |grep -n \June\" | sort +10x"""

Correct Answer: A

Explanation (EN): Correct pipeline filters June files and sorts numerically.

Explanation (HI): Command June files को filter कर numeric sort करता है।

32. In Linux, where is the user password stored?
Linux में password कहाँ store होता है?
(UGC NET C.S. December-2023)
A. /etc/passward
B. /root/passward
C. /etc/passwd
D. /root/passwd

Correct Answer: C

Explanation (EN): Passwords are stored in /etc/passwd (or shadow file in modern systems).

Explanation (HI): Passwords /etc/passwd में store होते हैं।

33. In Linux OS, which system call is passed flags to control sharing?
Linux में कौन-सा system call sharing control करता है?
(UGC NET C.S. December-2022)
A. fork()
B. clone()
C. pthread()
D. thread()

Correct Answer: B

Explanation (EN): clone() allows control over resource sharing.

Explanation (HI): clone() parent-child sharing control करता है।

34. Which command makes all files executable in directory progs?
Directory progs में सभी files executable बनाने का command?
(UGC NET C.S. June-2018 (Paper-II))
A. chmod -R a+x progs
B. chmod -R 222 progs
C. chmod -X a+x progs
D. chmod -X 222 progs

Correct Answer: A

Explanation (EN): chmod -R a+x recursively gives execute permission.

Explanation (HI): यह command recursively execute permission देता है।

35. In Linux OS, which command prints a file?
Linux में file print करने का command?
(UGC NET C.S. December-2018 (Paper-II))
A. Print
B. Lpr
C. Pr
D. Ptr

Correct Answer: B

Explanation (EN): lpr command is used for printing files.

Explanation (HI): lpr command file print करता है।

36. Which pipe counts lines in .c and .h files?
कौन-सा pipe .c और .h files की lines count करता है?
(UGC NET C.S. Exam-24 June-2019 (Paper-II))
A. cat*ch|wc -l
B. cat*[c-h]|wc -l
C. cat*[ch]|ls -l
D. cat*[ch]|wc -l

Correct Answer: D

Explanation (EN): cat*[ch] selects .c and .h files and wc -l counts lines.

Explanation (HI): यह command .c और .h files की lines count करता है।

37. fork() returns ______ to child process.
fork() child process को क्या return करता है?
(RPSC C.S. 2016 (PAPER-I))
A. Parent PID
B. 0
C. 1
D. NULL

Correct Answer: B

Explanation (EN): Child gets 0, parent gets PID.

Explanation (HI): Child को 0 मिलता है।

38. Number of arguments in Unix is identified by?
Unix में arguments की संख्या कैसे पता करते हैं?
(RPSC C.S. 2016 (PAPER-I))
A. $$
B. $?
C. $*
D. $#

Correct Answer: D

Explanation (EN): $# gives number of arguments.

Explanation (HI): $# arguments की संख्या बताता है।

39. Which is not valid file open mode in Unix?
Unix में invalid file open mode कौन-सा है?
(RPSC C.S. 2016 (PAPER-I))
A. O_RDONLY
B. O_WRONLY
C. O_WRRK
D. O_RDWR

Correct Answer: C

Explanation (EN): O_WRRK is invalid.

Explanation (HI): O_WRRK valid mode नहीं है।

40. Return type of write system call in Unix?
Unix में write system call का return type क्या है?
(RPSC C.S. 2016 (PAPER-I))
A. size_t
B. ssize_t
C. int
D. char

Correct Answer: B

Explanation (EN): write returns ssize_t.

Explanation (HI): write का return type ssize_t होता है।