Sometimes I want to find an IP in my home to test the virtual machine. But do not remember those IP is in use, those who do not use (don't say you remember, OK, I admit I am old), so wrote a shell script to detect, easy to use. Script content:
#
in a production environment, it is possible that other administrators or users may modify Hosts.allow to allow more IP landing machines; In order to facilitate unified management, we can modify the Allow and deny files to the default settings when
Installation use
This script is suitable for most bash environments and has been tested in environments such as CYGWIN,UBUNTU14.04,DEBIAN,CENTOS6,MAC-OSX.
1. Dependency
Before using this program, make sure your Linux or Cygwin supports the
Some static page-oriented sites, may not be convenient to generate a sitemap. and in order to speed up seo/seo.html "target=" _blank "> Search engine collection, it is best to take the initiative to do a sitemap, through webmaster Tools to submit or
In the afternoon, when writing a program, you need to assign the value returned by the shell command to a variable, using the a=$ () method
soft=$ (grep-i "\ Software \) token/passcode/." 123.txt |wc-l)
echo "[+] Soft card total:" $soft
......
The
Objective
Many commands are executed simultaneously during Linux operations or during day-to-day Linux operation, so that it needs to be handled through our multiple command methods. Multi-order execution includes '; ' And the ' && ' command so
In view of debugging Logback and log4j file cutting has been unsuccessful, with the use of shell script to cut the log files under Tomcat (if you have in the Logback or log4j use file cutting success, you can leave the use of the way, first thank
Presumably, anyone who knows makefile knows that makefile can invoke a shell script. But when it's actually used, it's not that simple, and some ambiguous places can make you mad. If you don't believe it, you can take a look at a few examples,
Given A number, shows it in comma-separated form. expects DD and TD to is instantiated. Instantiates Nicenum. Or, if a second arg is specified, the output was echoed to stdout.
Nonsense not much to say that the first is
#!/bin/sh #
This is the 8th/101 script
There are as many ways to solve this quirky echo problem as There are the pages in this book. One of my favorites is very succinct:
function Echon
{
echo ' $* ' | awk ' {printf '%s ' $} '
}
You could prefer to
The shell case is simpler, but it has its characteristics.
#!/bin/sh
# scriptbc-wrapper for ' BC ' which returns the result of a calculation.
if [$ = ' P ']; Then
precision=$2
shift 2
else
precision=2 # default
fi
bc-q
Script
The hosts one-click Deployment Script under Linux Environment, @lstoars contribution; @fluviusmagnus provides an enhanced version.
Official website: https://github.com/racaljk/hosts/tree/master/hosts_tools
#!/bin/sh # # Script_tool_for_linux #
Script content: java_check.sh
#! /bin/bash
#
If [-Z ' pidof java ']; then
echo-e ' date +%y-%m-%d ' ' Date +%r '. "33[31m33[1m (JAVA) Process does not exist! 33[0m ">>/data/logs/java_check.log
/usr/local/tomcat/bin/startup.sh
Having recently been using the Linux operating system and being familiar with some simple commands, I'll introduce you to some of the less-known but very useful commands:
1.mtr command to view the direct network connection of a MTR running host and
Tomcat is started randomly, so you have to manually open Tomcat when you start the server, otherwise you won't be able to access it (said online can be set up with the server open, I will not ni ...) )
1: Find the Tomcat installation path
Special folder names are used to index the collection to retrieve the special folders that are required, and the following special folders are listed in the document:
What is an app shell (app shell)The app shell is the most basic HTML, CSS, and JavaScript required for the application's user interface, and a component to ensure that the application has a lot of performance. Its first load will be very fast and is
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