shell script to create folder daily with time-stamp and push time-stamp generated logs
问题 I have a cron job which runs every 30 minutes to generate log files with time-stamp like this: test20130215100531.log, test20130215102031.log I would like to create one folder daily with date time-stamp and push log files in to respective date folder when generated. I need to achieve this on AIX server with bash. 回答1: Maybe you are looking for a script like this: #!/bin/bash shopt -s nullglob # This line is so that it does not complain when no logfiles are found for filename in test*.log; do