Question

In: Computer Science

A email application is an instance of a client-server model of computer networking. T/F Which of...

A email application is an instance of a client-server model of computer networking.
T/F

Which of the following command is used to list out process details in Unix system.
mkdir process_a
ls -;a
bg
ps -l -u $(whoami)

Which of the file is used to sink the output of a process to Null.
/dev/null
/dev/tty
/dev
/dev/empty

What does a pipe operator do?
performs an OR operation
takes input form a file and fees as input to other command
it takes output of a command and feeds as input to other command
it takes input of a command and feds as input to other command

Which of the following command removes all files with three characters file extension ,except that ends with ".opt"?

rm *.*
rm *[opt]
rm *.[o][p][t]
rm *.[!o][!p][!t]

A command ${command-name} is used as a substitution command in shell.
T/F

Zombie are the processes whose parents have died.
T/F

Select a set whose all processes are a daemon processes.
mkdir, inetd,con,mysql
sendmail,inetd,con,ps
sendmail,ls,con,mysql
sendmail,inetd,con,mysql

Which of the following command is used to get process id of a process?
kill pid
pidof processname
ls -la
pid processname

Which of the following system call is used by a parent process to create a child process?
exec()
listen()
wait()
fork()

Which of the following is the parent process for all other processes (in options)?
init
shell
mysqld
system process

Which of the following is used to probe a network connectivity of a host?
ssh
telnet
ping
dig

Which of the following command is used to open a firewall for a port 'n'?
sudo ufw allow n/tcp
sudo fuw allow tcp n/tcp
sudo netstat -tupln ufw n/tcp
sudo ufw allow tcp/n

Which of the following method is used to upload a file to a ftp server?
get
lcd
upload
put

Which of the following file contains the hostnames and associated IP addresses in Unix system?
/etc/hostname
/etc/conf.d
/etc/hostnames
/etc/hosts

Solutions

Expert Solution

1. An email application is an instance of a client server model of computer networking(T/F)

Ans: T

Explanation:client server model is a type of distributed application that divides tasks between servers and clients. email is an example or instance of client server model

2. The command used to list out process details in Unix system

Ans: ps -l -u $(whoami)

Explanation : In unix ps command is used to list out the currently active process and their process IDs and some other information about that process.

ps -l indicates a long listing of processes.

-u means detailed information about the process.

3. The file used to sink the output of a process to Null is  

Ans: /dev/null

Explanation: It is used to provide a null output. Sometimes it is used to discard output which is not needed.

4. The pipe operator is used to:

Ans: It takes output of a command and feeds as input to another command. It is used for redirecting standard output of a command (stdout) as standard input (stdin) of another command. It creates a temporary connection and it is unidirectional.

5. Which of the following command removes all files with three characters file extension ,except that ends with ".opt"?

Ans:rm *.[!o][!p][!t]

Explanation: removes file extension pattern that matches anything except given pattern. it removes except .opt

* means matches 0 or more characters

? means matches any single character

[seq] matches any in seq

[!seq] matches any character not in seq

6. A command ${command-name} is used as a substitution command in shell.

Ans: True

Explanation: The substitution command is used to run a shell command and store its output to a variable.

7. Zombie are the processes whose parents have died.

Ans: False

Explanation: Zombie is a died process but its parent is not yet died. Zombie are occured due to incorrect programming in parent process. zombie processes will stick around in memory until they are cleaned up.It does not use any system resources but retains its process ID.

8. Select a set whose all processes are a daemon processes.

Ans:sendmail,inetd,con,mysql

Explanation: inetd= internet superserver daemon

sendmail= a mail transfer agent daemon

mysql= database server daemon

cron is a daemon in unix deals with job scheduling.

daemon processes are the proceses that runs in background (background process) ,

9.Which of the following command is used to get process id of a process?

Ans:pidof processname

Explanation: porcess id is a unique id assigned to a process when it is created. process is a program in execution.

The command "pidof" is used to find the process ID of a running program.

10. Which of the following system call is used by a parent process to create a child process?

Ans: fork()

Explanation: The fork() system call is used by a process to create another process. i.e. parent process uses fork() to create its child process. A child process used the same PC , registers, same open files etc. of the parent process. If fork() is successfully executed, then pid of newly created process(child) is returned to the parent process and 0 is returned to the child process. If it is not successfull, then a negative value(-1) is returned to the parent process.

11. Which of the following is the parent process for all other processes (in options)?

Ans:  init

Explanation: init is the mother of all other processes, it is initial program which is initiated by kernel itself at the booting time. It manages all the other processes in the system. The process ID of init process is always 1.

12. Which of the following is used to probe a network connectivity of a host?

Ans: ping

Explanation: It is a network administration software used to test network connectivity of a host.

13.Which of the following command is used to open a firewall for a port 'n'?

Ans:sudo ufw allow n/tcp

Explanation: It is used to open a port in ubuntu firewall. It will open both tcp and udp protocols by default.

Syntax: ufw allow port-number/protocol.

14. Which of the following method is used to upload a file to a ftp server?

Ans: put

Explanation: FTP (File Transfer protocol) is used to transfer files from one system to other i.e. uploading and downloading. Ftp is not a secure protocol instead of this SFTP can be used for secure transferring.

"put" command is used to upload files into FTP server . it is used for uploading a single file . To upload multiple files,"mput" can be used.

15.Which of the following file contains the hostnames and associated IP addresses in Unix system?

Ans: /etc/hosts

Explanation: It is a plain text file that the OS used to translates hostnames(URL) into IP address.This is a system file and it needs administrative rights to save any changes in it.


Related Solutions

In Java and using JavaFX, write a client/server application with two parts, a server and a...
In Java and using JavaFX, write a client/server application with two parts, a server and a client. Have the client send the server a request to compute whether a number that the user provided is prime. The server responds with yes or no, then the client displays the answer.
Computer Networking Proxy Server Related Question: Please explain the caching algorithms of a web proxy server...
Computer Networking Proxy Server Related Question: Please explain the caching algorithms of a web proxy server and include following concepts: Greedy Dual Size, least recently used, and least frequently used.
what will be the code in C programming for the client and server chat application for...
what will be the code in C programming for the client and server chat application for the below issue :- write the C Programming code that able client have a unique ID to be known by the server
Explain the key difference between a web service application and a general client/server application
Explain the key difference between a web service application and a general client/server application
Develop a client /server talk application in C or C++. You should run your server program...
Develop a client /server talk application in C or C++. You should run your server program first, and then open another window if you use loopback to connect the local host again, or you may go to another machine to run the client program that will connect to the server program. In this case you must find the server’s IP address first, and then connect to it. If you use loopback, your procedure may look like: ➢ Server Server is...
Instructions Write a Client/Server application to do the following​ Client​ Take in IP address and Port...
Instructions Write a Client/Server application to do the following​ Client​ Take in IP address and Port as command line arguments​ Connect to Server​ Start "infinite loop"​ Take in message from command line​ Convert it to the packet form from last lab​ Instead of an array, store packet in a char array (string) so it can be easily sent​ Print out packet to terminal​ Send packet to server​ Print out reply from server End "infinite loop" Server Create connection on the...
Instructions Write a Client/Server application to do the following​ Client​ Take in IP address and Port...
Instructions Write a Client/Server application to do the following​ Client​ Take in IP address and Port as command line arguments​ Connect to Server​ Start "infinite loop"​ Take in message from command line​ Convert it to the packet form from last lab​ Instead of an array, store packet in a char array (string) so it can be easily sent​ Print out packet to terminal​ Send packet to server​ Print out reply from server End "infinite loop" Server Create connection on the...
Graph theory unit. 1. List important computing algorithms in Computer Networking based on application of graph...
Graph theory unit. 1. List important computing algorithms in Computer Networking based on application of graph theory. 2. Explain following using an example. a. graph, edges and vertices of the graph, directed graph, in-degree and outdegree of vertex, incident, a path, a distance 3. What is the worst – case memory usage of DFS? 4. Does DFS find the shortest path from start node to some node w ?
Recall that even if the server only stores f(p), client has to send p in clear...
Recall that even if the server only stores f(p), client has to send p in clear to authenticate to the server. If the adversary is watching, it learns p. Normally you have to use HTTPS to solve this problem. Alice has another idea. Instead of client sending p, client will instead only send f(p) to the server to authenticate. Then the adversary never learns p even if it can watch the whole communication. Is this a good idea?
Which of the following application architecture do you suggest as the best option for email for...
Which of the following application architecture do you suggest as the best option for email for an organization? Consider small, medium and large organizations to provide your suggestions. 1. Two-tier client-server 2. web-based
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT