EPAM Systems Most Frequently Asked Latest Linux Interview Questions Answers
What Is A Filesystem?
Sum of all directories called file system.
A file system is the primary means of file storage in UNIX. File systems are made of inodes and superblocks.
How Do You Get Its Usage (a Filesystem)?
By storing and manipulate files.
How Do You Check For Processes Started By User 'pat'?
ps -fu pat (-f -full_format u -user_name )
How Do You Start A Job On Background?
bg %4 (job 4)
What Utility Would You Use To Replace A String '2001' For '2002' In A Text File?
Grep, Kde( works on Linux and Unix)
What Utility Would You Use To Cut Off The First Column In A Text File?
awk, kde
How To Copy File Into Directory?
cp /tmp/file_name . (dot mean in the current directory)
How To Remove Directory With Files?
rm -rf directory_name
What Is Linux Shell?
Linux shell is a user interface used for executing the commands. Shell is a program the user uses for executing the commands. In UNIX, any program can be the users shell. Shell categories in Linux are
Bourne shell compatible, C shell compatible, nontraditional, and historical.
What Is Shell Script?
A shell script, as the name suggests, is a script written for the shell. Script here means a programming language used to control the application. The shell script allows different commands entered in the shell to be executed. Shell script is easy to debug, quicker as compared to writing big programs. However the execution speed is slow because it launches a new process for every shell command executed. Examples of commands are cp, cn, cd.
What Is Kernel? Explain The Task It Performs.
Kernel is used in UNIX like systems and is considered to be the heart of the operating system. It is responsible for communication between hardware and software components. It is primarily used for managing the systems resources as well.
Kernel Activities
The Kernel task manager allows tasks to run concurrently.
Managing the computer resources: Kernel allows the other programs to run and use the resources.
Resources include i/o devices, CPU, memory.
Kernel is responsible for Process management. It allows multiple processes to run simultaneously allowing user to multitask.
Kernel has an access to the systems memory and allows the processes to access the memory when required.
Processes may also need to access the devices attached to the system. Kernel assists the processes in doing so.
For the processes to access and make use of these services, system calls are used.
What Are Pipes?
A pipe is a chain of processes so that output of one process (stdout) is fed an input (stdin) to another. UNIX shell has a special syntax for creation of pipelines. The commands are written in sequence separated by |. Different filters are used for Pipes like AWK, GREP.
e.g. sort file | lpr ( sort the file and send it to printer)
Explain Trap Command; Shift Command, Getopts Command Of Linux
Trap command: controls the action to be taken by the shell when a signal is received.
Trap [OPTIONS] [ [arg] signspec..]
Arg is the action to be taken or executed on receiving a signal specified in signspec.
e.g. trap “rm $FILE; exit” // exit (signal) and remove file (action).
Shift Command: Using shift command, command line arguments can be accessed. The command causes the positional parameters shift to the left. Shift [n] where n defaults to 1. It is useful when several parameters need to be tested.
Getopts command: this command is used to parse arguments passed. It examines the next command line argument and determines whether it is a valid option.
Getopts {optstring} {variable1}. Here, optsring contains letters to be recognized if a letter is followed by a colon, an argument should be specified. E.g (whether the argument begins with a minus sign and is followed by any single letter contained inside options ) If not, diagnostic messages are shown. It is usually executed inside a loop.
Where Is Standard Output Usually Directed?
By default, your shell directs standard output to your screen or display.
What Is The Difference Between Ctrl-c And Ctrl-z?
When you have a process in progress which handle your prompt, there are some signals (orders) that we can send to theses process to indicate what we need
Control+C sends SIGINT which will interrupt the application. Usually causing it to abort, but a process is able to intercept this signal and do whatever it likes: for instance, from your Bash prompt, try hitting Ctrl-C. In Bash, it just cancels whatever you've typed and gives you a blank prompt (as opposed to quitting Bash)
Control+Z sends SIGTSTP to a foreground application, effectively putting it in the background on suspended mode. This is very useful when you want the application to continue its process while you are doing another job in the current shell. When you finish the job, you can go back into the application by running fg (or %x where x is the job number as shown in jobs).
What Is A Filesystem?
Sum of all directories called file system.
A file system is the primary means of file storage in UNIX. File systems are made of inodes and superblocks.
How Do You Get Its Usage (a Filesystem)?
By storing and manipulate files.
How Do You Check For Processes Started By User 'pat'?
ps -fu pat (-f -full_format u -user_name )
How Do You Start A Job On Background?
bg %4 (job 4)
What Utility Would You Use To Replace A String '2001' For '2002' In A Text File?
Grep, Kde( works on Linux and Unix)
What Utility Would You Use To Cut Off The First Column In A Text File?
awk, kde
How To Copy File Into Directory?
cp /tmp/file_name . (dot mean in the current directory)
How To Remove Directory With Files?
rm -rf directory_name
What Is Linux Shell?
Linux shell is a user interface used for executing the commands. Shell is a program the user uses for executing the commands. In UNIX, any program can be the users shell. Shell categories in Linux are
Bourne shell compatible, C shell compatible, nontraditional, and historical.
What Is Shell Script?
A shell script, as the name suggests, is a script written for the shell. Script here means a programming language used to control the application. The shell script allows different commands entered in the shell to be executed. Shell script is easy to debug, quicker as compared to writing big programs. However the execution speed is slow because it launches a new process for every shell command executed. Examples of commands are cp, cn, cd.
EPAM Systems Most Frequently Asked Latest Linux Interview Questions Answers |
What Is Kernel? Explain The Task It Performs.
Kernel is used in UNIX like systems and is considered to be the heart of the operating system. It is responsible for communication between hardware and software components. It is primarily used for managing the systems resources as well.
Kernel Activities
The Kernel task manager allows tasks to run concurrently.
Managing the computer resources: Kernel allows the other programs to run and use the resources.
Resources include i/o devices, CPU, memory.
Kernel is responsible for Process management. It allows multiple processes to run simultaneously allowing user to multitask.
Kernel has an access to the systems memory and allows the processes to access the memory when required.
Processes may also need to access the devices attached to the system. Kernel assists the processes in doing so.
For the processes to access and make use of these services, system calls are used.
What Are Pipes?
A pipe is a chain of processes so that output of one process (stdout) is fed an input (stdin) to another. UNIX shell has a special syntax for creation of pipelines. The commands are written in sequence separated by |. Different filters are used for Pipes like AWK, GREP.
e.g. sort file | lpr ( sort the file and send it to printer)
Explain Trap Command; Shift Command, Getopts Command Of Linux
Trap command: controls the action to be taken by the shell when a signal is received.
Trap [OPTIONS] [ [arg] signspec..]
Arg is the action to be taken or executed on receiving a signal specified in signspec.
e.g. trap “rm $FILE; exit” // exit (signal) and remove file (action).
Shift Command: Using shift command, command line arguments can be accessed. The command causes the positional parameters shift to the left. Shift [n] where n defaults to 1. It is useful when several parameters need to be tested.
Getopts command: this command is used to parse arguments passed. It examines the next command line argument and determines whether it is a valid option.
Getopts {optstring} {variable1}. Here, optsring contains letters to be recognized if a letter is followed by a colon, an argument should be specified. E.g (whether the argument begins with a minus sign and is followed by any single letter contained inside options ) If not, diagnostic messages are shown. It is usually executed inside a loop.
Where Is Standard Output Usually Directed?
By default, your shell directs standard output to your screen or display.
What Is The Difference Between Ctrl-c And Ctrl-z?
When you have a process in progress which handle your prompt, there are some signals (orders) that we can send to theses process to indicate what we need
Control+C sends SIGINT which will interrupt the application. Usually causing it to abort, but a process is able to intercept this signal and do whatever it likes: for instance, from your Bash prompt, try hitting Ctrl-C. In Bash, it just cancels whatever you've typed and gives you a blank prompt (as opposed to quitting Bash)
Control+Z sends SIGTSTP to a foreground application, effectively putting it in the background on suspended mode. This is very useful when you want the application to continue its process while you are doing another job in the current shell. When you finish the job, you can go back into the application by running fg (or %x where x is the job number as shown in jobs).
Post a Comment