A. Common Hadoop commands1. The FS command for Hadoop#查看hadoop所有的fs命令Hadoop FS#上传文件 (both put and copyfromlocal are upload commands)Hadoop fs-put jdk-7u55-linux-i586.tar.gz hdfs://hucc01:9000/jdkhadoop fs-copyfromlocal jdk-7u55-linux-i586.tar.gz
2.shell Tools2.1. log filesBrief introductionIt is important to create a log file, which records important information. In the event of an error, this information is very useful for our troubleshooting, and the monitoring information can be logged
There are a lot of uses for the For loop in the shell, and I've been trying to summarize what I saw on the web today about the for loop usage.Knot, feel very comprehensive, so turn around research and research, hey ...1, for ((i=1;i2. Common in
Typically, as a deployment script for an application, the first task that begins is to create a dedicated (dedicated) user and user group for the current app. This script is very simple, a reference sample is attached
1. Determine the logged-on user1.1 Scripts[Email protected]_1 shell]$ VI check_user.sh#! /bin/shecho "You is logged in as ' WhoAmI '"; if [' whoami '! = Devtac]; Then echo "must is logged in as Devtac-to-run this script." Exitfiecho "Running
The logical operators of the shell involve the following types, so as long as the appropriate choice, can solve our many complex judgments, to achieve a multiplier effect.First, the logical operator
Logical Volume Label
Express
The function of quotation marks1 double quotation marks ("")1) Use "" To reference any character or string except the character $ (dollar sign), ' (anti-quote), \ (backslash). Double quotation marks do not prevent the shell from special handling of
Method 1:Use Linux iconv to convert the Utf-8 log to GBK encoded file, and then gbk the statistics in the environment. UTF8 () { log_file= "/lcims/crontab_shell/outfile/lan_wlan_wo/socketmain.log141114_lan1" LOG_FILE_TMP= "/
Article Source: (Linux Shell) The first chapter--Small trial sledgehammer (next)1.6 Arrays and associative arrays1.6.1 Preparation KnowledgeBash supports both normal and associative arrays, and normal arrays can use integers only as an array index,
Project structure such asOne: System environmentThis machine: 10.4.18.3Server: 10.4.18.4, user name: WEB02Two: Initializing the server environmentCreate a directory on the server's home directory Deploy,deploy/profileMkdir-p/home/web01/deployMkdir-p/
Duang~~~ has industry insiders, peanut shell intranet version will be online more than a router? If the message is true, then the user with the intranet IP address can be completely through the router settings to solve the remote access and
Today, the company LD asked to write a small script to monitor whether a process exists and how to exit the script. If it does not exist, send an email to the specified mailbox, I use the running status of the daemon to determine the connection
Overview
The file system (FS) shell contains various commands for interacting with HDFS, such as local FS, hftp FS, S3 FS, and other. FS shell. Run the following command:
Bin/hdfs dfs
Path URI can be used as a parameter for all Fs shells. The URI
SET commandIt can be used to customize the shell environment and use the option "O" to enable or disable the option. For example, enable option: set-O option, and disable option: Set + O.
Shopt commandIs an alternative to the set command, which is
Simple example shell program
Example 1.
#!/bin/bash#This is to show what a shell script looks likeecho "Our first example"echo # This inserts an empty line in output.echo "We are currently in the following directory."/bin/pwdechoecho "This
#! /Bin/bash
# Returning an array value
Function arraydblr ()
{
Local origarray
Local newarray
Local Elements
Local I
Origarray = ('echo "[email protected]" ')
Newarrray = ('echo "[email protected]" ')
Elements = $ [$ #-1]
For (I = 0; I
{
Newarray
As mentioned above, variable names can only contain numbers, letters, and underscores, because some variables that contain other characters have special meanings. Such variables are called special variables.
For example, $ indicates the ID of the
Shell Programming Application-automated website backupRsync is a data image backup tool in unix-like systems-remote sync. A Fast Incremental Backup Tool, Remote Sync, supports local replication or synchronization with other SSH and rsync hosts.
Getting started with Shell programming (version 2) (medium) and getting started with shell programmingVariable test statement-test
Purpose: test whether the variables are equal, empty, and file type.
Format:
Test condition or [] # range: integer,
Shell script automated testing framework, shellscript
Development background of shUnit2
ShUnit2 is developed based on the log4sh SHELL automated testing. It is used in a similar way as JUnit.
Preparation
1. Download shUnit2
Wget-P ~ /Download http://
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