Find the odd man out:
sed
wart
tail
cut
View Answer
Correct Answer: B — wart
Explanation:
sed, tail, and cut are standard UNIX text-processing utilities, whereas wart is not a standard UNIX command.
Browse topic-based Unix System practice sets.
73 practice sets · Page 3 of 4
Find the odd man out:
sed
wart
tail
cut
Correct Answer: B — wart
Explanation:
sed, tail, and cut are standard UNIX text-processing utilities, whereas wart is not a standard UNIX command.
Which of the following changes permission to deny write permission to group and others?
chmod go=w filex
chmod go w filex
chmod go-w filex
None of the above
Correct Answer: C — chmod go-w filex
Explanation:
The chmod go-w command removes (-) the write (w) permissions for both the group (g) and others (o).
Which of the following OS treats hardware as a file system?
UNIX
DOS
Windows NT
None of the above
Correct Answer: A — UNIX
Explanation:
UNIX strictly follows the philosophy that "everything is a file", meaning hardware devices are accessed and treated just like regular files via device nodes in the /dev directory.
An example of a memory management system call in UNIX is:
execve
sigaction
mmap
fork
Correct Answer: C — mmap
Explanation:
The mmap system call is used for memory management in UNIX to map files or devices into memory.
An example of a directory found in most UNIX system is:
brk
waitpid
usr
unmap
Correct Answer: C — usr
Explanation:
The /usr directory is a standard UNIX directory that contains user utilities and applications.
The "nice" command is used in Unix:
to increase the priority of a process
to decrease the priority of a process
to get the highest priority
Both of the above
Correct Answer: D — Both of the above
Explanation:
The nice command can adjust a process's scheduling priority up or down by modifying its "niceness" value.
Which of the following is not an Unix Command?
wc
put
whoami
ls
Correct Answer: B — put
Explanation:
While wc, whoami, and ls are standard shell commands, put is typically a command used specifically within FTP clients rather than a standalone UNIX shell command.
A system call in Linux operating system to create a new child process, which is a copy of the parent process:
exec
access
fork
flock
Correct Answer: C — fork
Explanation:
The fork() system call creates a new child process by duplicating the calling parent process.
The environment variable in Linux, that contain a list of directories the shell automatically recognizes.
$PATH
$GREP
$USER
$ENV
Correct Answer: A — $PATH
Explanation:
The $PATH environment variable holds a colon-separated list of directories that the shell searches for executable files when a command is entered.
In Linux, the subdirectory that contains system configuration files including user passwords:
/usr
/boot
/etc
/proc
Correct Answer: C — /etc
Explanation:
The /etc directory in Linux contains all system-wide configuration files, including the /etc/passwd and /etc/shadow files for user authentication.
Linux partitions are created using the file system:
EXT3
FAT
NTFS
FAT32
Correct Answer: A — EXT3
Explanation:
EXT3 (Third Extended Filesystem) is a native file system specifically designed and widely used for Linux partitions.
Which UNIX/Linux command is used to make all files and sub-directories in the directory "progs" executable by all users?
chmod -R a+x progs
chmod -R 222 progs
chmod ugo+x progs
chmod a+x progs
Correct Answer: A — chmod -R a+x progs
Explanation:
The chmod -R a+x progs command recursively (-R) adds (+) execute (x) permissions for all (a) users to the 'progs' directory and its contents.
Consider the following statements:
Statement I: UNIX provides three types of permissions: Read, Write, and Execute.
Statement II: The command chmod is used to change these permissions.
Which of the statements given above is/are correct?
Only Statement I
Only Statement II
Both Statement I and Statement II
Neither Statement I nor Statement II
Correct Answer: C — Both Statement I and Statement II
Explanation:
UNIX fundamentally provides three file permissions: Read, Write, and Execute. These can be modified using the chmod command.
Match the following WINDOWS system calls and UNIX system calls with reference to process control and file manipulation:
| Windows | UNIX |
|---|---|
| (a) CreateProcess() | (i) read() |
| (b) WaitForSingleObject() | (ii) close() |
| (c) ReadFile() | (iii) fork() |
| (d) CloseHandle() | (iv) wait() |
(a)-(iv), (b)-(iii), (c)-(i), (d)-(ii)
(a)-(iii), (b)-(iv), (c)-(i), (d)-(ii)
(a)-(iii), (b)-(iv), (c)-(ii), (d)-(i)
(a)-(iv), (b)-(iii), (c)-(ii), (d)-(i)
Correct Answer: B — (a)-(iii), (b)-(iv), (c)-(i), (d)-(ii)
Explanation:
Windows CreateProcess() corresponds functionally to the UNIX fork() and exec(), WaitForSingleObject() maps to wait(), ReadFile() to read(), and CloseHandle() to close().
In UNIX, which of the following command is used to set the task priority?
nice
ps
kill
init
Correct Answer: A — nice
Explanation:
The nice command executes a program with a specified scheduling priority, effectively setting the task priority in UNIX.
Which of the following flags are set when ‘JMP’ instruction is executed?
SF and CF
No flag is set
All flags
AF and CF
Correct Answer: B — No flag is set
Explanation:
The JMP (unconditional jump) instruction changes the instruction pointer but does not perform an arithmetic or logical operation, so no status flags are affected.
Everything below the system call interface and above the physical hardware is known as ______.
Stub
Shell
Bus
Kernel
Correct Answer: D — Kernel
Explanation:
The Kernel is the core component of the operating system that resides between the hardware and the system call interface, managing system resources.
Linux operating system uses
Hand Shaking
Fair Preemptive Scheduling
Affinity Scheduling
Highest Penalty Ratio Next
Correct Answer: B — Fair Preemptive Scheduling
Explanation:
Linux fundamentally uses a Completely Fair Scheduler (CFS), which is a type of fair preemptive scheduling to allocate CPU time to processes.
In Unix, how do you check that two given strings a and b are equal?
test b
test b
test b
Both A and B
Correct Answer: B — test b
Explanation:
In standard UNIX shells, the test command uses the = operator to compare strings for equality, though -eq is sometimes incorrectly conflated with string comparison despite being strictly for integers.
The directory structure used in Unix file system is called
Graph structured directory
Hierarchical directory
Tree structured directory
Directed acyclic graph
Correct Answer: B — Hierarchical directory
Explanation:
The UNIX file system utilizes a hierarchical directory structure, organizing files and directories into a tree-like hierarchy starting from the root (/).