Thursday 17 August 2017

Linux bash shell

A user is new to Linux and he wants to know full list of available commands, what would you suggest him?
[root@localhost ~]$ compgen -c
l.
ll
ls
which
if
 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.
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
hits    command
2    /bin/ls
2    /bin/su
  You have a large text file, and you need to see one page at a time. What will you do?
cat file_name.txt | more

No comments:

Post a Comment