Find directories created less than a week ago

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?

+5
source share
2 answers

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.

+7
source

Short answer: you cannot.

There are three times in inode

  • ctime: inode creation or modification time
  • mtime: , inode
  • atime:

, ctime , chmod/chown, ln ( ). Man stat man touch .

find /home -type d -mtime -7, , .

+5

All Articles