- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- -ctime & -mtime difference in find command ?
Operating System - HP-UX
1819794
Members
3220
Online
109607
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-16-2005 02:30 AM
тАО12-16-2005 02:30 AM
Why -ctime yields no result but -mtime yields
1 result (as expected) ? I would expect both
to work alike . Thanks
# date
Thu Dec 15 10:22:23 EST 2005
# touch -mt 12011259 ahd_12_15_05.log
# ll ahd_12_15_05.log
-rwxr-xr-x 1 root sys 0 Dec 1 12:59 ahd_12_15_05.log
# find $APP_LOG -name 'ahd*log' -ctime +10
# find $APP_LOG -name 'ahd*log' -mtime +10
/opt/hpws/apache/logs/ahd_12_15_05.log
1 result (as expected) ? I would expect both
to work alike . Thanks
# date
Thu Dec 15 10:22:23 EST 2005
# touch -mt 12011259 ahd_12_15_05.log
# ll ahd_12_15_05.log
-rwxr-xr-x 1 root sys 0 Dec 1 12:59 ahd_12_15_05.log
# find $APP_LOG -name 'ahd*log' -ctime +10
# find $APP_LOG -name 'ahd*log' -mtime +10
/opt/hpws/apache/logs/ahd_12_15_05.log
good judgement comes from experience and experience comes from bad judgement.
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-16-2005 02:38 AM
тАО12-16-2005 02:38 AM
Re: -ctime & -mtime difference in find command ?
Hi Sammy,
ctime is Creation time and mtime is Modification time. So it is expected to act differently. See "man find" for more info...
Best Regards,
Eric Antunes
ctime is Creation time and mtime is Modification time. So it is expected to act differently. See "man find" for more info...
Best Regards,
Eric Antunes
Each and every day is a good day to learn.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-16-2005 02:51 AM
тАО12-16-2005 02:51 AM
Solution
Hi Sammy:
The 'ctime' of a file represents the last inode change --- change in permissions, ownership, name.
The 'mtime' is the last modification time of a file or directory.
The 'atime' is the last access time.
There is *no* creation time recorded. The only time (no pun) that you reveal the creation time is when the file (or directory) has never been modified since its creattion. Then, and only then, is 'mtime' a creation time.
If you use 'fbackup' beware that the 'ctime' of the files you backup will be changed. This is because 'fbackup' reset the file's lat access timestamp ('atime'). In doing so, the the 'ctime' is changed because the operation updated the inode information.
Regards!
...JRF...
The 'ctime' of a file represents the last inode change --- change in permissions, ownership, name.
The 'mtime' is the last modification time of a file or directory.
The 'atime' is the last access time.
There is *no* creation time recorded. The only time (no pun) that you reveal the creation time is when the file (or directory) has never been modified since its creattion. Then, and only then, is 'mtime' a creation time.
If you use 'fbackup' beware that the 'ctime' of the files you backup will be changed. This is because 'fbackup' reset the file's lat access timestamp ('atime'). In doing so, the the 'ctime' is changed because the operation updated the inode information.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-16-2005 03:27 AM
тАО12-16-2005 03:27 AM
Re: -ctime & -mtime difference in find command ?
Thanks to both. thanks JRF for the tip on fbackups.
good judgement comes from experience and experience comes from bad judgement.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP