Unix Answers 2023
Unix Answers 2023
$who ←
$date ←
Wednesday November 20 7:41:32 est 2023
$
Q) What do you mean by filter in Unix?
→
Daemons in Unix are background processes that run inde
pendently of user control, performing system tasks like ha
ndling requests and managing system resources. They usua
lly start at boot time and operate silently, ensuring smooth
system operations. They are typically identified by a "d" at
the end of their names.
Q) What is the syntax of ‘while’ command?
→ The “while” command is a powerful tool in the Linux shell
that allows you to execute a series of commands repeatedly
based on a given condition. It is commonly used in shell scripts
to create loops.
Synyax-
while [condition]
do
# commands to be executed
done
NAME DESCRIPTION
/ The slash / character alone denotes the root of the
filesystem tree.
/boot Contains all the files that are required for successful
booting process.
/home Contains the home directories for the users.
/lib Contains system libraries, and some critical files such as
kernel modules or device drivers.
/var A short for “variable.” A place for files that may change
often – especially in size,
/media Default mount point for removable devices, such as USB
sticks, media players, etc.
/usr/lib Stores the required libraries and data files for programs
stored within /usr or elsewhere.
Example-
$ ls -l ←
Total 30
-rw-r--r-- 1 romeo metal 19514 May 10 13:45 chap01
-rw-r--r-- 1 romeo metal 4174 May 10 15:10 chap02
-rw-rw-rw- 1 romeo metal 84 Feb 12 12:30 chap03
…..
Multiple users share system resources Clients request services from a server
Simultaneous user access Interaction is client-initiated
Centralized resource management Server manages resources for multiple clients
Users access a central computing system. Distributed computing between client and server
Examples: Early mainframe systems Examples: Web services and database systems
Limited by central system's capacity High scalability due to distributed architecture
Centralized control, potential for shared access Improved isolation and security per client
Performance can degrade with multiple users Better performance with dedicated server resources
Varies, higher for dedicated servers
Lower initial cost.
Tail command:-
Displaying the end of a file. Complementing its head
command, the tail command display the last 10 lines of
the argument file.
Example –
The last three lines are displayed in this way
$ tail -3 A.txt ←
yz
wx
uv
$ tail +9 A.txt ←
qr
st
uv
wx
yz
[displays the content of a file starting from the 9th
line to the end of the file.]