10 interview questions and answers about Linux core

Source: Internet
Author: User
It's time to read some serious content in a relaxed mood. This is another article about interview questions. we will show 10 Linux core questions, which will undoubtedly bring you closer to the first floor. 1. you need to define a macro and bind an existing command. What will you do? A: interview at ba

It's time to read some serious content in a relaxed mood. This is another article about interview questions. we will show 10 Linux core questions, which will undoubtedly bring you closer to the first floor.

1. you need to define a macro and bind an existing command. What will you do?

A: In bash, a command called bind can be used to define a macro or bind a key. To bind an existing command, we need to generate the character sequence corresponding to that key. Click Ctrl + v, and then click F12. I get ^ [24 ~

[root@localhost ~]# bind ‘”\e[24~":"date"

Note: different terminals or terminal simulators may have different codes for the same key.

2. what are your suggestions for a Linux beginner who wants to know the complete list of available commands?

A: The 'compgen-c' command displays all available commands.

[root@localhost ~]___FCKpd___1nbsp;compgen -cl.lllswhichifthenelseelifficaseesacforselectwhileuntildodone…

3. your assistant wants to print the directory stack. What are your suggestions?

A: The 'dirs' command prints the directory stack.

[root@localhost ~]# dirs/usr/share/X11

4. you have a lot of running jobs. how can you delete all running processes without restarting the machine?

A: The 'disown-R' command can delete all running processes.

5. what is the use of the 'hash' command in Bash?

A: The 'hash' command is used to manage the internal hash table. it is used to collect and record the full path of a specified command and display the command names and times used.

[root@localhost ~]# hashhits    command   2    /bin/ls   2    /bin/su

6. which linux built-in command can execute arithmetic operations in Bash?

A: The 'let' command can execute arithmetic operations in Bash.

#! /bin/bash......let c=a+b......

7. what if you have a large text file and want to view only one page at a time?

A: You can use the pipeline output of the 'cat file_name.txt 'and 'more' commands to achieve the above effect.

[root@localhost ~]# cat file_name.txt | more

8. who owns the data dictionary?

Answer: 'sys' users have data dictionaries. both 'sys' and 'sysem 'are automatically created by default.

 

9. in Linux, how do I know the overview and usage of a command?

Suppose you find a command in/bin and you have never noticed it. you have no idea what it is. How do you know what it does?

A: The 'whatis 'command displays the overview and usage of a command man page. For example, you want to see the overview of the 'zcat' command you didn't know before:

[root@localhost ~]# whatis zcatzcat [gzip]          (1)  - compress or expand files

10. what command can I use to know how many files and how much space each user has created under their quota?

A: The 'repquota 'command can solve this problem. it can generate a summary report for the file system.

This is all about it. Post your valuable comments in the comments! Next we will have more reports on Linux and Foss.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.