Manipulate dates with linux
Current formatted date
date +%d-%m-%Y
Current formatted date with time
date '+%d-%m-%Y %H:%M:%S'
1 day before the current date
date -d '-1 day' +%d-%m-%Y
1 day after the current date
date -d '+1 day' +%d-%m-%Y
First day of current month
date -d '-0 month' +01-%m-%Y
Last day of current month
date -d "-$(date +%d) days +1 month" +%d-%m-%Y
Last day of current month + one day
date -d "-$(date +%d) days +1 month +1 day" +%d-%m-%Y
First day of the previous month
date -d '-1 month' +01-%m-%Y
Last day of the previous month
date -d "-$(date +%d) days -0 month" +%d-%m-%Y
First day of the next month
date -d '+1 month' +01-%m-%Y
Last day of the next month
date -d "-$(date +%d) days +2 month" +%d-%m-%Y
Date format style /var/log/messages ( Aug 25 19:15:20 )
date '+%b %d %R:%S'
Export/import windows server DNS zones
You can use Export-DnsServerZone and Import-DnsServerZone . Export: Export-DnsServerZone -Name "test.com" -Filename "test...
Mais vistos
-
Find Users Who Have Never Logged On Use the following PowerShell Command; Get-ADUser -Filter { LastLogonDate -notlike "*" -and En...
-
Java Keytool Command These commands allow you to generate a new Java Keytool keystore file, create a CSR, and import certificates. A...
-
First you have to configure a wpad site in your IIS Open the proxypac.pac file you have previously created and save as wpad.dat. Copy wpa...