Back up your Web program#!/bin/bash/bin/tar czf/mnt/backup_website/web_$ (date +%y%m%d_%h%m%s). Gz. tar /mnt/wwwroot/web/mnt/backup_websitefind . -mtime +1"*20[1-9][3-9]*"xargsrm - 0Backing Up the
[Author]: KwuBased on the Sparksql call shell script run Sql,sparksql provides an option similar to-e,-F,-I in Hive1. Timed Call Script#!/bin/sh # Upload logs to HDFs yesterday= ' date--date= ' 1 days ago ' +%y%m%d
When we use the shell to process files, we often need to remove or add newline characters, the name of the problem is how to quickly replace it?We have such a file[email protected] working]# cat
Tag:expr bsp Command not csharp other filename line awk Shell Learning notemain= "/usr/local/" # Variable uppercase status= "$MAIN/status" # USD multibyte string is a reference variable value, while USD multibyte number
#!/bin/bashecho "Hello world!"1. As an executable programSave the above code as test.sh and CD to the appropriate directory:chmod u+./test. #使脚本具有执行权限 ./test. #执行脚本2. As an interpreter parameterThis works by running the interpreter directly, whose
Edit the. bash_profile file under your own user#. Bash_profile#exportPs1= "\n\e[1;32m[\e[0;31m\u\e[0;[ Email protected]\e[0;31m\h\e[1;32m]\e[1;32m[\e[0;34m\w\e[1;32m]$ "# Get the aliases and functionsIf [-f ~/.BASHRC]; Then. ~/.bashrcFi# User
The shell script in Crontab writes the top information to the file:Note:1, Top-n 1 for Execution 1 exit (default top is not exited),-D 1 for 1 seconds2, crontab need to add/bin/bash# CRONTAB-E*/5 * * * */bin/bash/usr/local/bin/top.sh# VI
1. Shell Variable TypeThe shell is a dynamic type language (not using explicit data declarations) and weakly typed languages (variable type operations vary according to requirements). The variables in the shell are non-typed (all string types), but
CutThe Cut command extracts text columns from a text file or text stream.Cut grammar[[email protected] ~]# cut-d ' The delimiter character '-f fields The PATH variable is as follows[Email protected] ~]# echo
We can pass parameters to the script when executing the Shell script, and the format of the parameters obtained in the script is:$n. n represents a number, 1 is the first argument to execute the script, 2 is the second argument to execute the script,
One, branch control statements1. If: Fi conditionif condition; ThenActionFi2. If: else.. Fi conditionIf Condition;thenActionElseActionFi3. If: else if: else.. Fi conditionIf Condition;thenActionelse if Condition;thenActionElseActionFiNote: If and
Problem: Now there are two scripts, I want to match the contents of File1 by File2[email protected] home]# cat file13-1-1 potv=1,pota=0,potp=21-4-76 potv=1,pota=0,potp=12-1-2 potv=1,pota=1,potp= 13-1-4 potv=1,pota=1,potp=24-1-5 potv=1,pota=1,potp=27-
The specific HBase shell commands are shown in table 1.1-1 below:Below we will use the example of "A Student score table" to detail the commonly used HBase commands and how they are used.Here grad for the table is a column, course for the table is a
Meaning: Split the file by column according to the delimiterSyntax format: cut [options] ... [File] ...-C, --characters by character-F,--fields by column-D,--delimiter specifies delimiter, default is tab (\ t)Example: viewing file contents Cat
Linux Command-line edit shortcut: History displays a list of command histories ↑ (Ctrl+p) Displays the previous command ↓ (Ctrl+N) Displays the next command!num executes the command history list of the num-bar command!! Execute the last command!?
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