file creation date & time

Hi All,

I have some files which are creates every day using a script. I want to create a log files which does write "filename,creation day and time"
how can I do this ??

Alice

Getting the time of creation is not easy especially if you modify the file after it is created.

This script will work just the way you want, if the newly created files are not modified after their creation.

From within the directory where you need to run the script

cd /path/to/dir
ls -l | awk '{ printf $9 "-" $6" " $7" " $8"\n" }' >> output.txt

Vino

A bit funky but might solve your problem.

In the script which is creating the file just write before the action statement a similar echo statement.
Like

echo touch tmp > log
echo `date` > log
touch tmp

it works well. thank you to all