Modifying timestamps in Unix

The touch command is one of those often used tools in Unix that you have probably used hundreds of times, but I bet you don’t realize it’s full potential. Did you know that you can use it to update a file’s timestamp to any time and date, not just the current time and date? Why... Continue Reading →

Manipulating dates in KornShell

Sometimes you need to shift the current date and time by 24 hours, but unfortunately one of the things that KornShell is very poor at is the handling of dates and times. Here are some tips for getting and manipulating dates: Yesterday's date: TEMP_TZ=$TZ TZ=GMT+24 YESTERDAY=`date` TZ=$TEMP_TZ Tomorrow's date: TEMP_TZ=$TZ TZ=GMT-24 TOMORROW=`date` TZ=$TEMP_TZ If you... Continue Reading →

Blog at

Up ↑