I know that I can use this command to find directories created or modified less than a week ago:
find /home -type d -mtime -7
But how to find a directory that was created less than a week ago?
Creation time is not .
There are only 3 timestamps you can check.
Last access time Last modification time Last change time
"Change" is one of: change permission, rename, etc. Although modification is only the content.
Short answer: you cannot.
There are three times in inode
, ctime , chmod/chown, ln ( ). Man stat man touch .
Man stat
man touch
find /home -type d -mtime -7, , .