Can I get the date and time the folder was changed?I know that you can use stat -f "%m" folder , but it does not reflect file / folder changes.
stat -f "%m" folder
Things that don't work:
ls -l folder
date -r folder
find foo bar baz -printf
printf
Versions of things:
Decision:
find . -exec stat -f "%m" \{} \; | sort -n -r | head -1
Explanation:
find
.
-exec
stat -f "%m"
sort -n -r
-n
-r
head -1
sort
You can try "date -r folder" to indicate the date of the last change.
You can always get it from ls :
ls
ls -ld mydir | awk -F' ' '{ print $6 " "$7 }'