shell command to see the number of files under a folder2010-06-25 17:05:15| Category: Shell | Font size Subscription 1. View the number of files under a folder:Ls-l |grep "^-" |wc-l or find/company-type f | Wc-l2. Look at the number of files in a
1. View the native supported shell types, cat/etc/shells. /bin/bash is the default shell for Linux2.bash Shell function Command memory function history (file address ~/.bash_history) tab command complement function alias command aliases set function
1. ENV (environment abbreviation) and export Show all environment variables 2. Description of Environment variables
environment variable
home"
user home folder equivalent to "~"
shell
Interactively change password 1. SSH remote to the host; 2. Switch to root account;[generally switch to root for password modification, if the ordinary user to modify their own password, to enter the original password, and then the new password to
#!/bin/bash #使用哪个shell执行echo "Hello World" username= "Tom" echo $username #chmod +x./test.sh settings can perform file #for loop output for skill in Ada coffe Action Java; Do echo "I am good at ${skill}script" Done#for file in ' ls/etc '; Do#echo
Ctrl+p repeat the last commandCTRL + a jumps to the first characterCtrl+x, but press again to return to the original position.Ctrl+b move forward one character without deleting the character caseCtrl+h Delete the previous characterCtrl+u all
Shell judgment#按照文件类型进行判断-B To determine if the file exists and whether it is a fast device file (The block device file is true)-C Determines whether the file exists and whether it is a character device file (the character device file is true)-D to
Two comparison of parameters[Email protected] shell]# VI test.sh[email protected] shell]# cat test.sh#!/bin/bashif [$1-ge];Then ECHO-E "\033[41;37m \033[0m "Elseecho "Start and End time is: ' Date-d" $ days ago "+%y%m%d"--' date-d ' day Ago
Quick start from official Hbase
HBase (main):003:0> create ' test ', ' CF ' 0 row (s) in 1.2200 secondshbase (main):003:0> list ' test ': 1 row (s) in 0.0550 secondshbase (main):004:0> put ' test ', ' row1 ', ' cf:a ', ' value1 ' 0 row (s) in 0.
This is an old-fashioned exercise, shell script to practice a lot, want to practice shift calculation, there is the following script.#!/bin/bashippattern= "(\\.) {3}\ "maskpattern=" [1-9]| [12] [0-9]|3[01] "while :d o echo -e -n "
What is the shell? Believe that as long as touch the computer, for the operating system (whether Linux, Unix or Windows) a little concept of friends have heard the term, because as long as there is an operating system, it is inseparable from the
Debugging a serial port under Linux is a hassle, especially in an embedded environment, and many times it is time to debug with another device.Here to figure out a feasible serial debugging method, you can simply check whether the serial port is
SED: Data Flow EditorReads a row into the memory processing row and then outputs a row.Mode space:SED: Do not edit source files by defaultsed [option] Addresscommand file1, start line, end linesed startline,endline file sed 2,5p file2. Pattern
The Find command, which is used as often as a CD. It is only possible that the majority of the time it takes only one or two parameters to be used. Or, barely enough. But when we take the initiative to look at the manual of Find, we will find that
Shell programming variables a bash variable and variable classificationBash is a standard shell in Linux, so it's often called bash as a shell.1. Variable naming rules
Variable names can consist of letters, numbers, underscores, but must
The hill sort was proposed by D.l.shell in 1959, and the relative direct ranking has been greatly improved. Hill sort is also called narrowing the incremental sortBasic idea:First, the entire sequence of records to be sorted into a number of
Enable VI start.sh# !/bin/sh # ################################################################## # Powered by Ironfo # ################################################################## # Note: You must have & let it execute in the background,
First, function: function1.function Conceptfunction is a Process-programmed , the purpose is to Code Reuse , is a Modular Programming , Structured Programming Programming Method function: The code of an independent function as a whole, and a name
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