Posts

Showing posts from May, 2021

Create folder with current date as name

  Create folder with current date as name in batch (.bat) file Following script will create a folder with current name as name in format DD-MM-YYYY format e.g. 25-05-2021   for /f "skip=1" %%i in ('wmic os get localdatetime') do if not defined fulldate set fulldate=%%i set year=%fulldate:~0,4% set month=%fulldate:~4,2% set day=%fulldate:~6,2% set foldername=%day%-%month%-%year% md %foldername%   Windows XP and higher
Steps to set Linux Server time to local time Search for the required time zone available ex. Asia timedatectl list-timezones | grep -i Asia Unlink the current time zone from local time unlink /etc/localtime Set the require time zone by using the below command ex. IST ln -s /usr/share/zoneinfo/Asia/Kolkata /etc/localtime sync the time to server from NTP server of your choice ex. in.pool.ntp.org /usr/sbin/ntpdate -u in.pool.ntp.org To sync the server time and update the bios time at a time from the NTP server /usr/sbin/ntpdate -u in.pool.ntp.org && hwclock --systohc