HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: File mtime less than atime
Operating System - HP-UX
1833796
Members
4487
Online
110063
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
Forums
Discussions
Discussions
Discussions
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
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
10-07-2004 09:44 PM
10-07-2004 09:44 PM
I tried to cleanup a directory using "find . -mtime +7" and got no results. However, I list the files using "ll" and they definitely show a date more than 7 days ago.
I have since figured out that the value passed to "find" means "the next whole number greater than", so a value of 7 will wait until 8 complete days have passed defore deleting.
However, I still have files with an mtime less than the ctime - has anyone encountered this before?
server1:/package/data/log/log> ls -lu z_crapar_36499
-rw-r--r-- 1 ora817 dba817 45644 Aug 5 14:33 z_crapar_36499
server1:/package/data/log/log> ls -lc z_crapar_36499
-rw-r--r-- 1 ora817 dba817 45644 Oct 7 23:45 z_crapar_36499
server1:/package/data/log/log> ls -l z_crapar_36499
-rw-r--r-- 1 ora817 dba817 45644 Sep 30 16:05 z_crapar_36499
In order,...
Access Time
Create Time
Modify Time
Share and Enjoy! Ian
I have since figured out that the value passed to "find" means "the next whole number greater than", so a value of 7 will wait until 8 complete days have passed defore deleting.
However, I still have files with an mtime less than the ctime - has anyone encountered this before?
server1:/package/data/log/log> ls -lu z_crapar_36499
-rw-r--r-- 1 ora817 dba817 45644 Aug 5 14:33 z_crapar_36499
server1:/package/data/log/log> ls -lc z_crapar_36499
-rw-r--r-- 1 ora817 dba817 45644 Oct 7 23:45 z_crapar_36499
server1:/package/data/log/log> ls -l z_crapar_36499
-rw-r--r-- 1 ora817 dba817 45644 Sep 30 16:05 z_crapar_36499
In order,...
Access Time
Create Time
Modify Time
Share and Enjoy! Ian
Building a dumber user
Solved! Go to Solution.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2004 10:54 PM
10-07-2004 10:54 PM
Solution
This is perfectly acceptable. the -c time is not strictly "creation" time, rather it is "time of last inode change". Actions such as chmod can update this, eg in the following example: -
$ date
Fri Oct 8 11:51:47 BST 2004
$ touch testfile
$ ls -l testfile
-rw-r----- 1 user tsg 0 Oct 8 11:51 testfile
$ ls -lc testfile
-rw-r----- 1 user tsg 0 Oct 8 11:51 testfile
$ chmod 644 testfile
$ ls -l testfile
-rw-r--r-- 1 user tsg 0 Oct 8 11:51 testfile
$ ls -lc testfile
-rw-r--r-- 1 user tsg 0 Oct 8 11:52 testfile
You see the "chmod" updated the inode, therefore changed the -c time.
$ date
Fri Oct 8 11:51:47 BST 2004
$ touch testfile
$ ls -l testfile
-rw-r----- 1 user tsg 0 Oct 8 11:51 testfile
$ ls -lc testfile
-rw-r----- 1 user tsg 0 Oct 8 11:51 testfile
$ chmod 644 testfile
$ ls -l testfile
-rw-r--r-- 1 user tsg 0 Oct 8 11:51 testfile
$ ls -lc testfile
-rw-r--r-- 1 user tsg 0 Oct 8 11:52 testfile
You see the "chmod" updated the inode, therefore changed the -c time.
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
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP