The script is mainly from the defined NTP server list to get the server address to synchronize, if the first unsuccessful, will continue to change the address to sync! Not perfect place also please point out!
Copy Code code as follows:
#
Recently in the debugging server iptables, oneself made a timed turn off iptables, but at night home rarely open a computer, so can not go to start iptables, of course, you may say, why not cancel timed shutdown iptables, I can only say that
First, we need to increase the user's ability to execute the script, that is,
Copy Code code as follows:
String cmdstring = "chmod a+x test.sh";
Process proc = Runtime.getruntime (). exec (cmdstring);
Proc.waitfor (); Block until the
Search on the Internet to find a great God wrote Shell Repair Bash Vulnerability script, feel very good, dragged to my blog to share to everyone.
Script content:
Copy Code code as follows:
#/bin/bash
#Author Alex Fang. Updates may
Shell Introduction
The shell is in the outer layer of the kernel, which is responsible for receiving commands entered by the user, then interprets the command as kernel can understand it, then executes it by kernel, and returns the result back to
Objective
Using the Shell
The basic shell commands and mechanisms are described and explained below.
First: Super Tools/terminals,xterms and Shells
One, Super tool
You've probably heard the argument that the command line (the Mommand lines) is
Write a script that can generate random passwords, if you want pure numbers or only letters or case, can be customized, I write a full element here.
#!/bin/bash
# Author:honway.liu #
date:2013-07-19 #
concate:gm100861@gmail.com
len=90
str= (a B C
First type:
#!/bin/bash service vsftpd start &>/dev/null if
[$-eq 0]
Then
echo "FTP is start"
Else
Service VSFTPD Start
Fi
The second type:
#!/bin/bash read-p "Input your file name" file_name
If [D-$file _name]//To determine whether the
Not long ago I saw two interesting commands in the book--script and Srciptreplay, which can record a terminal session in a file, that is, we can create a command-line video tutorial through a terminal session, or we can share session files with
Transferred from: https://zhidao.baidu.com/question/357781350.html while Read-u3 i && Read-u4 J; Do Echo done34Read-u3 I means to read a row of data in the I variable from FD # 3rd (file descriptor, filename descriptor), so you know what Read-u4 J
Specify bashShell script first line, #! What should it be?Most of the cases/usr/bin/env bash,/bin/bash,/usr/bin/bash,/bin/sh,/usr/bin/env sh are equivalent, but few cases still have pits. If the default shell may not be bash, such as a release law,
1. Field (column) Extraction command: Cut [option] file nameOptions:-F column number (extract the first few columns)-D delimiter (split column by specified delimiter)[email protected] sh]# cat student.txt idnamegendermark1alex male 112boby male
First, the text processing1. Extract key word frequency times by row (for example, 5th column)awk ' begin{fs= ' | '} {a[$5]+=1;} END {for (i in a) print I ":" A[i];} ' Opt. Forumlogicnewserver_action_20161107.log | SORT-NRK 2-t ': '2, log users per
node. JS Reverse ShellExcerpt from: http://www.itfang.net/?p=109The javascript below is a node. js Reverse connection shell.This payload will generate a/bin/sh shell, create a TCP connection to the attacker's server, and bind shell commands in the
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