sh #!/bin/sh MY_SHELL_PATH=`dirname $0` echo "print shell script location:" echo ${MY_SHELL_PATH} echo "===" echo "enter shell script location:${MY_SHELL_PATH}" cd `dirname $0` echo "list current directory content:" ls -lh echo "===" echo "shell script name=${0}" echo ...
Dir for this shell script to generate logs automatically. BLOG_PUBLISH_LOG_DIR=/mydata/backups/logs/blogpublish # Your personal homepage in github. GITHUB_PERSONAL_PAGE=/mydata/GitBang/GitHub/vfhky.github.io # Articles in 15 minutes are legal. TIME_GAP=15 # Get the newest file name. #N...
#back monitor CPU Mem Swap Disk LastLogin information to file # set recored Dir Dir=/var/log/runrec/ # prepare the environment mkdir -p $Dir # get current time RecTime=$(date +"%Y-%m-%d %H:%M") # set record filename RecFile=$Dir$RecTime.log # get CPU RecLoad=$(uptime) # g...
apt-get updateapt-get -y upgrade apt-get -y autoremoveapt-get autoclean echo -e "\n$(date "+%T") \t Script Terminated" 该脚本还处理不再需要的旧包。您需要使用sudo运行此脚本,否则它将无法正常工作。
BAKDIR=/data/backup/mysql/`date +%Y-%m-%d` MYSQLDB=www MYSQLPW=backup MYSQLUSR=backup if[ $UID -ne 0 ];then echo This script must use administrator or root user ,please exit! sleep 2 exit 0 fi if[ ! -d $BAKDIR ];then
Windows11 Penetration Suite Toolkit是一个基于Windows11打造的开箱即用的渗透测试环境虚拟机,里面集成了大量的渗透测试工具。 这个封装的虚拟机可以堪称是渗透测试的武器库了,啥工具都有,真正做到了工欲善其事,必先利其器! 相关截图 相关说明 使用说明
$inputFilePath=$args[0]$outFilePath=$args[1]$ScriptDir=Split-Path$script:MyInvocation.MyCommand.Path$Assem=($ScriptDir+"\SolidWorks.Interop.sldworks.dll")$Source=@"using SolidWorks.Interop.sldworks;using System;namespace CodeStack{public static class Exporter{#region LibrariesstaticExporter(){AppDo...
Invoke-Command-ComputerNameS1, S2-ScriptBlock{Remove-Item-Pathcert:\LocalMachine\TestStore-Recurse} 动态参数 动态参数是由 PowerShell 提供程序添加的 cmdlet 参数,仅在启用提供程序的驱动器中使用 cmdlet 时才可用。 这些参数在证书提供程序的所有子目录中都有效,但仅在证书上有效。
Windows Command Shell 中的 dir 命令显示文件系统连接点的目标位置。 在 PowerShell 中,此信息可从 返回的文件系统对象的 Get-ChildItem 属性中获取,并显示在默认输出中。 PowerShell 复制 PS D:\> New-Item -ItemType Junction -Name tmp -Target $Env:TEMP PS D:\> Get-ChildItem | Select-Object Name...
{ # fastcgi_pass unix:/var/run/php-fpm811.sock; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name; include fastcgi_params; } location /cgi-bin { fastcgi_pass unix:/var/run/fcgiwrap.socket; include fastcgi.conf; } ...