This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cd /root/backup || exit | |
date=`date +%F` | |
days=10 | |
host=`hostname` | |
nice rsync -aR --delete --link-dest=$PWD/$host.current --exclude-from=exclude.list \ | |
/etc/apache2 \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wmic baseboard get product /value | |
#powershell | |
$baseboard=Get-WmiObject Win32_baseboard | Select-Object Product | foreach { $_.Product} | |
$name=[System.Text.RegularExpressions.Regex]::Replace($baseboard,"[^0-9a-zA-Z-]","-"); | |
RENAME-COMPUTER -computername (hostname) -newname $name; RESTART-COMPUTER -force |