Modified-Change date

17 views
Skip to first unread message

tosim

unread,
Dec 31, 2012, 3:11:05 PM12/31/12
to krusade...@googlegroups.com
When I change a file within a folder, I'd like to also have that folder's date updated (in the "Modified" column). Can someone please tell me how to do it? Thank you.

Yuri Chornoivan

unread,
Jan 1, 2013, 2:58:03 AM1/1/13
to krusade...@googlegroups.com
2012/12/31 tosim <tos...@gmail.com>:
> When I change a file within a folder, I'd like to also have that folder's
> date updated (in the "Modified" column). Can someone please tell me how to
> do it? Thank you.

Hi,

From stackoverflow [1]:

"A directories timestamp is changed when the directory itself is
changed. The directory contains, among other things, a list of the
inodes of the files in the directory so when you change the content of
the directory by adding or removing files then the directories
timestamp will be updated."

So changing one file in the directory (not adding or removing the
file) is not enough to change directory timestamp.

Solutions to change directory timestamps recursively to the newest
files can be found in [2].

Hope this helps.

Best regards,
Yuri

[1] http://stackoverflow.com/questions/3451863/when-does-a-unix-directory-change-its-timestamp

[2] http://unix.stackexchange.com/questions/1524/how-do-i-change-folder-timestamps-recursively

Tony Simms

unread,
Jan 1, 2013, 11:22:30 AM1/1/13
to krusade...@googlegroups.com
Thank you for the reply. I looked through the manual and when I could not find an answer, I posted. Again, thanks.

=
Reply all
Reply to author
Forward
0 new messages