In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "what is the function of Bash shell under Linux". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the function of Bash shell under Linux".
Know the Shell of BASH
The function of Bash shell
Command editing capability (history):
Just press the up and down keys on the command line to find the first / last input instruction. where are so many instructions recorded? .bash _ history in your home folder.
Command and file completion: (benefits of [tab] button)
Command alias setting function: (alias)
Alias lm='ls-al'
Programmatic script: (shell scripts)
Query whether the instruction is a built-in command for Bash shell: type
Example 1: check whether the ls instruction is built into bash?
Variable function of [dmtsai@study ~] $type lsShell
Variable access and setting: echo, variable setting rules, unset
Echo $PATH
Set the variable:
[dmtsai@study ~] $echo ${myname} >
Standard error output (stderr): code 2, use 2 > or 2 >; to understand stdout and stderr, let's do a sample exercise: example 1: observe the file names, permissions and attributes of each directory under your system root directory (/) and record them
[dmtsai@study] $ll / = at this point the screen will display the file name information [dmtsai@study ~] $ll / > ~ / rootfile = = there is no information on the screen [dmtsai@study ~] $ll ~ / rootfile = = A new file has been created! -rw-rw-r--. 1 dmtsai dmtsai 1078 Jul 9 18:51 / home/dmtsai/rootfile
1 >: output "correct data" to a specified file or device by overwriting method; 1 > >: output "correct data" to a specified file or device by cumulative method; 2 >: output "incorrect data" to a specified file or device by overwriting method; 2 > >: output "incorrect data" to a specified file or device by cumulative method
Example 5: write all the data of the instruction to a file named list
[dmtsai@study ~] $find / home-name .bashrc > list 2 > list = = error [dmtsai@study ~] $find / home-name .bashrc > list 2 > & 1 = correct [dmtsai@study ~] $find / home-name .bashrc & > list = correct
Standard input: < and
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.