Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Through eight skills to let you become a super Linux end-user     - Oracle Sql Loader tool has shown signs (Database)

- JSON data normalization (normalize) (Programming)

- Preview function to confirm the stop resource Oracle 12c new feature crsctl (Database)

- Zabbix monitoring Oracle Database use Orabbix plug (Enhanced Edition) (Database)

- Python 3 for instructions encoded string conversion (Programming)

- Linux, Eclipse flash back and reinstall the JDK methods (Linux)

- Linux Operating System Security Management describes the top ten tricks (Linux)

- Use the Find command to help you find those files that need to be cleaned (Linux)

- Struts2 form of non-use component tags (Programming)

- Android development, may cause a memory leak problem (Programming)

- By way of a binary installation innobackupex (Database)

- Analysis of memory mapping process in Linux x86-32 mode (Linux)

- Json data with double backslashes to a single backslash Json data processing (Programming)

- Fatal NI connect error 12170 error in Alert Log (Database)

- VMware difference in three network connection (Linux)

- How to install open source ITIL portal iTOP on CentOS 7 (Server)

- Tsunami-udp accelerated network transmission (Linux)

- Python format string (Programming)

- Alternative methods of intrusion bundled executable file new thinking (Linux)

- CentOS 6.5 system installation Oracle11.2.0.4 basic steps (Database)

 
         
  Through eight skills to let you become a super Linux end-user
     
  Add Date : 2017-08-30      
         
       
         
  Using a Linux terminal is more than just typing commands. Learning these basic techniques, you will gradually master the Bash shell, which in most Linux distributions on the default use of terminal tools.

This article is written for inexperienced novices, I believe that most advanced users already know all of these skills. However, you can still see, you may be able to learn what you have been ignored.

Tab key auto-complete

Using the TAB key to auto-complete is the basic technique. It can save you a lot of time, and when you are not sure how a file name or command spelling, it is also useful.

For example, in the current directory you have a file named "really long file nam" that you want to delete. You can enter the entire file name, but you have to carefully enter the wrong space character (need to use \ escape). If you type "rm r" and then press Tab, Bash will automatically complete the file name for you.

Of course, if you have a lot of files in the current directory that begin with the letter r, Bash will not know which one you refer to. For example, the current directory you have another name called "really very long file name" text, when you press the Tab key, Bash will make up to the "really" part, because the two documents are beginning with this. Then, press Tab again and you'll see a list of all the files that match the beginning of the file

Then enter the file name you want and press Tab. So, when we lose "l" and then press the Tab key, Bash will automatically complete the file name we want.

This method is also valid for input commands. When you are not sure what command you want, just remember to start with "gnome", type "gnome" and press Tab, you will see all the possible results.

Pipe command

The pipeline command allows you to transfer the output of one command to another command. In the Unix design philosophy, each program is only a small but fine function. For example, the "ls" command displays a list of all the files in the current directory, and the "grep" command searches for the input string at the specified location.

You can search for a file in the current directory by combining the two with the pipe command (the "|" symbol). The following command searches for "really":

Ls | grep really

Wildcards

The asterisk "*" is a wildcard that can match anything. For example, if we want to delete "really long file name" and "really very long file name" from the current directory, we can use the following command:

Rm really * name
This command removes all files that start with really and ends with name. If you use the "rm *" command, it will delete all the files in the directory, all need to be used with caution.

Output redirection

The ">" character can redirect the output of a command to a file without the need for an additional command. For example, the code below uses the "ls" command to list all the files in the current directory and enter the output list into a file named "file1" instead of just the output on the terminal.

Ls> file1

Command line history

Bash will remember the history of the commands you have used. You can use the UP and DOWN keys to scroll through the commands you have already used. Use the "history" command to print the history commands, so you can use the pipe command to search for your most recent commands.

There are a number of techniques that can be used with command-line history

~,. & ..

The tilde "~" represents the current user's home directory. So, you can use "cd ~" to switch to your home directory instead of typing "cd / home / name". This is also used for relative paths, such as "cd ~ / Desktop", to switch to the current user's desktop directory.

Similarly, "." Represents the current directory, ".." represents the parent directory. All, "cd .." will jump to the parent directory. This is also valid for relative paths. For example, if you are in the Desktop directory and you want to switch to the Document directory at the same level as the Desktop directory, you can use the "cd ../Documents" command.

Run the command in the background

By default, Bash will run your command under the current terminal. Normally there is no problem, but when you want to run an application while continuing to use the terminal how to do? For example, if you enter the "firefox" command to run the Firefox browser, Firefox will take over your terminal and display some error messages and other output until you close it. But adding an "&" sign after the command causes Bash to run the program in the background:

Firefox & amp;

Conditional execution

You can also use Bash to run two commands, one after the other. The second command will not run until the first command completes successfully. To do this, the two commands in the same line can be separated by "&&".

For example, the "sleep" command takes a parameter in seconds and then counts down, allowing the end. Used alone, the command has no use, but you can use it as a delay before running the next program. The following command will stop for 5 seconds and then run the gnome screenshot tool:

Sleep 5 & amp; & amp; gnome-screenshot
     
         
       
         
  More:      
 
- C ++ Supplements - Smart Pointers (Programming)
- Use smem visual display Linux memory usage (Linux)
- Thinking in Java study notes - initialization and cleanup (Programming)
- mysqldump issue a note (Database)
- Linux Network Security: nmap port scanning software (Linux)
- Linux using DenyHosts prevents ssh cracks (Linux)
- How to install and configure in Ubuntu 14.10 'Weather Information Indicator' (Linux)
- Ubuntu 14.04 kernel after the restart boot black screen to solve (Linux)
- Android Service service applications and the phone SMS Listener Listener (Programming)
- Thrift 0.9.3 compiler installation under Ubuntu (Linux)
- Ubuntu under shadowsocks configuration instructions (Linux)
- Linux Log File Browser --logrotate (Linux)
- Java memory-mapped file MappedByteBuffer (Programming)
- GNU Linux system variables (sysctl configuration commands) integrated use (Linux)
- Build your own Python coding environment (Linux)
- How the program is executed (Programming)
- OpenSUSE GPG Comments (Linux)
- Improve WordPress performance (Server)
- After installation of Debian 6.0 do a few things first (Linux)
- Use OpenWrt build WDS wireless network extension on V2 WHR-G300N (Linux)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.