In-depth discussion of Linux Bash and object name extension features

Source: Internet
Author: User
Tags echo command

When learning Linux Bash commands, you may encounter Bash command problems. Here we will introduce the solution to the Linux Bash command exhibition special problem. Here we will share it with you. Linux Bash command operations and file name extension features.

The Linux Bash command line provides command and file name extension features. When you enter a command or file name that has not been completed, you only need to enter the Tab key to activate the command and file name extension feature, so as to complete the remaining input of the command. If multiple commands or files have the same prefix, the Linux Bash command will ring and wait for the user to enter enough characters to select a unique command or file name, the system will automatically complete the searched command or file name. After you press the Enter key, the system will execute this command. Example: $ cat pre
$ Cat preface

The Linux Bash command can also list some matching file names in the current directory to complete file name extension. If you type Esc, then type ?, Shell will list all file names that match the input string. For example, in the following example, type Esc ?, Shell will list all strings that match the input string, and then shell echo command line, according to the name of the list, you can type the name of the file to be input or press the Tab key to complete the extension of the file name. For example:

$ Ls
Document docudrama
$ Cat doc
Document
Docudrama
$ Cat docudrama

The following is a list of files contained in a directory:
Firebird2.7.tgz Firebird. README Firebird2.60.tgz
FireBird Firebird2.60.tgz. README
To delete the Firebird2.60.tgz. README file, type:
$ Rm-f Fi
The system will generate an alarm and automatically complete the command line as follows:
$ Rm-f Fire
And wait for the user to further enter the part after the file name. Now, type:
B
The system then sends an alarm again and automatically includes the following command line:
$ Rm-f Firebird
And wait for the user to further enter the part after the file name. Now, type:

The system then sends an alarm again and automatically includes the following command line:
$ Rm-f Firebird2.60.tgz
And wait for the user to further enter the part after the file name. Now, type:

In this case, the command is supplemented as follows:
$ Rm-f Firebird2.60.tgz .. README
As shown in the preceding example, the Linux Bash command always tries its best to complete the command based on the user input. If the command cannot be supplemented based on the existing information, the system prompts the user to provide more information, and then further complements the command based on the user's prompt. As a user, it is best to provide enough information at a time for Linux Bash command completion; otherwise, multiple times are used. Time is consumed.

  1. Comprehensive parsing of Linux Make rules
  2. Required Linux shutdown/restart command
  3. Allows you to use the Linux operating system to accelerate remote logon.
  4. Easily solve grub errors in Linux
  5. A Brief Introduction to Linux rescue

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.