Friday, 10 July 2015

Take ownership and unlock files



RUN AS ROOT
sudo /usr/bin/chflags -R nouchg /Volumes/myserverdata/folder/
sudo /usr/sbin/chown -R admin /Volumes/myserverdata/folder/
sudo /bin/chmod -R 770 /Volumes/myserverdata/folder/

Thursday, 9 July 2015

Batch log file with name and date

cscript example.vbs > %computername%_%date:~-4,4%%date:~-10,2%%date:~-7,2%_%time:~0,2%%time:~3,2%%time:~6,2%.log

Output:
MyComputer_20150907_144646.log