echo "<pre>"
-for d in $(find . -maxdepth 1 -type d -name "[^.]?*" | \
- awk '{print $1" "$1}' | \
- sed -e "s/^[^0-9]*//" | \
- sort -g | \
- awk '{print $2}'); do
+for d in $(find . -maxdepth 1 -type d -name "[^.]?*"); do
- most_recent=$(find ${d} -type f -exec stat --printf="%y %n\n" '{}' \; | sort | tail -1 | awk '{print $4}')
+ most_recent=$(find ${d} -type f -exec stat --printf="%Y %n\n" '{}' \; | sort | tail -1 | awk '{print $4}')
if [[ ${most_recent} ]]; then
- date=$(stat --printf="%y" ${most_recent})
+ date=$(date -r ${most_recent})
else
- date=$(stat --printf="%y" ${d})
+ date=$(date -r ${d})
fi
echo "${date} <a href=\"${d}\">${d}</a>"