1. iis 관리자 -> IIS 영역 -> 인증 -> asp.net 가장 -> 작업(편집), 사용 -> 관련 아이디 패스워드 지정.
2. asp.net에서 경로 지정시 이런 형식으로 사용한다.
saveDir = "\\\\192.168.0.1\\imgData\\" + today;
saveDir = "\\\\192.168.0.1\\imgData\\" + today;
set WshShell = WScript.CreateObject("WScript.Shell")Const ForReading = 1Const ForWriting = 2Const ForAppending = 8Const ipListFile = "C:\oneIP.txt"Set Shell = CreateObject("WScript.Shell")Set FSO = CreateObject("Scripting.FileSystemObject")If FSO.FileExists(ipListFile) Then Set SwitchIP = FSO.opentextfile(ipListFile, ForReading, False)Else Wscript.Echo "This file (" + ipListFile + ") does not exist." Wscript.QuitEnd IfDim userIdDim userPwuserId = "yourid"userPw = "yourpass"WScript.Echo "Don't touch Anything!!"While Not SwitchIP.atEndOfStreamIP = SwitchIP.Readline() WshShell.Run "cmd" WScript.Sleep 100 WshShell.AppActivate "C:\Windows\system32\cmd.exe" WScript.Sleep 100 rem telnet [address] [port] WshShell.SendKeys "telnet " + IP + " 23{ENTER}" WScript.Sleep 2000 rem [id] WshShell.SendKeys userId + "{ENTER}" WScript.Sleep 2000 rem [pwd] WshShell.SendKeys userPw + "{ENTER}" WScript.Sleep 1000 rem [command what you want] WshShell.SendKeys "show ver{ENTER}" WshShell.SendKeys "{ENTER}" WScript.Sleep 2000 WshShell.SendKeys "exit{ENTER}"WendWScript.Sleep 2000WScript.Echo "Completed."
#!/bin/shbin_log_path="/usr/local/mysql/data/"bin_log_name="mysql-bin"bin=${bin_log_path}${bin_log_name}max_bin_index=`ls ${bin}.* | awk -F. '{print $2}' | sort -n | tail -1`del_index=`expr ${max_bin_index} - 10`if [ -f ${bin}.${del_index} ]thenecho "${bin_log_name}.${del_index} 파일 존재"echo "${bin_log_name}.${del_index} 이전 파일 제거"/usr/local/mysql/bin/mysql -uroot -p패스워드 -e "PURGE MASTER LOGS TO '${bin_log_name}.${del_index}'";fi