format date

Recently updated/posted Linux and UNIX FAQ: Linux display or change a pre-login message – /etc/issue file PostgreSQL add or create a user account and grant permission for database How do I unzip multiple / many files under Linux? Ubuntu Linux Vim Sorry, the command is not available in this version: syntax on How to format […]


Sometime you need to create a shell scripts with output filenames with date in it. For example instead of log file named “secure.log”, you can create a filename called “secure-jan-02-06.log” or “secure-DATE-FORMAT.log”. The DATE-FORMAT can be set as per requirements:
=> dd-mm-yyyy
=> mm-dd-yyyy
=> yyyy-mm-dd
=> Month-Day-Year