There are many intranet users without public network IP, which can not access the NAS of intranet from external network. But if the day in the company did not complete, need to go home to complete or temporary transfer of the home of the NAS data,
First, Introduction
Regular expressions are commonly used in many of the tools and commands in the shell, and understanding basic regular expressions and extending the meaning and usage of metacharacters in regular expressions is good for skilled
HBase is a distributed, column-oriented, open-source database derived from a Google paper, BigTable: A distributed storage system of structured data. HBase is an open source implementation of Google BigTable, which leverages Hadoop HDFs as its file
Use the shell to determine if a folder or file exists
Determine if a folder existsif [! -d "/etc/open" ];thenecho "文件夹/etc/open不存在"esleecho "文件夹/etc/open存在"fi
Determine if the file exists and delete it if it existsif [ ! -f
I suddenly wanted to monitor the network card Traffic in Linux and didn't want to use cacti. I thought it was very troublesome to Configure SNMP. Ready-made tools seem to be useless. Decide to write a script by yourself.
Click (Here) Fold or open
From http://vc88.javaeye.com/blog/658764
Shell if interpretation statement[Front and back Spaces] Leading space[-A file] true if the file exists.[-B file] If the file exists and is a special block file, it is true.[-C file] If the file exists
Shell can be used to automate a large number of tasks. Shell is especially good at system management tasks, especially for tasks that are easier to use, maintainability, and portability than efficiency.
Next, let's take a look at how shell works:
1. Special files:/Dev/null and/dev/tty
Linux provides two special files that are very useful for shell programming:/dev/null and/dev/tty. /Dev/null will discard all data written into it. In other words, when Program When writing data to this file,
Table 4-3 lists the commands supported by the EFI Shell Interface on the unit-based HP integrity server.
When npartition is active but the operating system has not been booted, you can access the EFI shell from the npartition console.
You can use
Shell function return value, generally in three ways: return, argv, Echo
1) Return StatementThe Return Value of the shell function, which can be the same as that of other languages, returned through the return statement.Example:
#!/bin/bash
This post may be a bit long, but it is definitely worth reading.
What is shell? It is neither a worksheet function nor an API function, nor Shell Oil. It is a built-in function of VBA.However, it is a vast array of functions that can accommodate n
The company's Linux server uses a common desktop and lacks a disaster recovery mechanism. The company stores a large amount of data on this server. Once a fault occurs, the consequences are
1. Install busybox
Busybox is a single executable implementation of standard Linux tools. Busybox contains some simple tools, such as CAT and ECHO, and some larger and more complex tools, such as grep, find, mount, and telnet. Some people refer to
I used shell to write some CGI examples. I would like to introduce it to you today.
CGI is an interface standard that does not distinguish programming languages. That is to say, CGI can be written in any language as long as it has standard input,
Shell script instance
Note: Some variables related to parameters passed to shell:$ # Number of command line parameters$? Return Value of the Call Command$ Process ID of the current process$! Process Number of the last background command$0 the first
Basic Format:Test expression
Expression is the expression constructed by the test command.Expression is any valid expression that can be understood by the test command. The simplified format is the most common format that readers may refer.Return
Variable
Get local host name# Hostname
Obtain the System Version Number# Uname-r
Obtain CPU type
Obtain the cpu operation frequencyCat/proc/cpuinfo
Obtain memory usage# Free-m
Obtain hard disk usage# Df
Variable types and variable operations
The following program implements a simple mp3 playback function. You can set the path to search all mp3 files and play them in sequence.
#! /Bin/sh # very simple example shell script for mp3 player #2014-5-6 by slwang # search all mp3 files and play
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