Get Days in a month from a bash script

Useful listing of days in a month to populate directories or run scripts for backing up getting the correct dates of days in a month and year.     YEAR=2020 MONTH=2 for DAY in $(DAYS=`cal $MONTH $YEAR | awk ‘NF {DAYS = $NF}; END {print DAYS}’` && seq -f ‘%02G’ $DAYS) ;do DATE=”$YEAR-$MONTH-$DAY” echo $DATE…

SYSTEMD – controls

Starting with Ubuntu 15.04, Upstart will be deprecated in favor of Systemd. With Systemd to manage the services we can do the following: systemctl start SERVICE – Use it to start a service. Does not persist after reboot systemctl stop SERVICE – Use it to stop a service. Does not persist after reboot systemctl restart…