Question 1. You Need To Define A Macro, A Key Binding For The Existing Command. How Would You Do It?
There is a command called bind, in bash shell which is capable of defining macro, or binding a key. In order to bind a key with an existing command, we need to generate Character Sequence emitted by the key. Press Ctrl+v and then key F12, I got ^ [[24~
[root@localhost ~]# bind ‘”e[24~”:”date”‘
Different types of terminals or terminal emulators can emit different codes for the same key.
Question 2. A User Is New To Linux And He Wants To Know Full List Of Available Commands, What Would You Suggest Him?
A command ‘compgen c’ will show a full list of available commands.
[root@localhost ~]$ Compgen -c
Question 3. Your Assistant Needs To Print Directory Stack, What Would You Suggest?
The Linux command ‘dirs’ will print the directory stack.
[root@localhost ~]# dirs
Question 4. You Have Lots Of Running Jobs, How Would You Remove All The Running Processes, Without Restarting The Machine?
The Linux command ‘disown -r’ will remove all the running Processes.
Question 5. What Does The Command ‘hash’ Is Used For In Bash Shell?
Linux command ‘hash’ manages internal hash table, fins and remember full path of the specified command, Display used command names and number of times the command is used.
[root@localhost ~]# hash
Question 6. Which Builtin Linux Command Performs Arithmetic Operation Of Integers In Bash?
The ‘let’ command that performs arithmetic operation of integer in bash shell.
Question 7. You Have A Large Text File, And You Need To See One Page At A Time. What Will You Do?
You can achieve the above result by pipeline the output of ‘cat file_name.txt’ with ‘more’ command.
[root@localhost ~]# cat file_name.txt | more
Question 8. Who Own The Data Dictionary?
The user’s ‘SYS’ owns the data dictionary. Users ‘SYS’ and ‘SYSTEM’ are created by default, automatically.
Question 9. How To Know A Command Summary And Usability In Linux?
Assume You Came Across A Command In /bin Directory, Which You Are Completely Unaware Of, And Have No Idea What It Does. What Will You Do To Know Its Usability?
he command ‘whats’ display a summary of it’s usability from the man page. For example, you would like to see a summary of ‘zcat’ command which you don’t know previously.
[root@localhost ~]# whats zcat
zcat [gzip] (1) – compress or expand files
Question 10. What Command Should You Use To Check The Number Of Files And Disk Space Used By Each User’s Defined Quotas?
The command ‘repquota’ comes to rescue here. Command repquota summaries quotas for a file system.
That’s all for now. Provide your valuable Feedback in our comment section. Stay tuned for more Linux and Foss posts.
Perl Scripting Interview Questions
Perl Scripting Tutorial
Networking Interview Questions
Linux Interview Questions
Linux Embedded systems Interview Questions