Try this:
#!/bin/bash
stat --format %y $(ls -t $(find alfa/ -type f) | head -n 1)
It uses find
to gather all files from the directory, ls
to list them sorted by modification date, head
for selecting the first file and finally stat
to show the time in a nice format.
At this time it is not safe for files with whitespace or other special characters in their names. Write a commend if it doesn't meet your needs yet.