Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 3
    ctime is not creation time. You probably want mtime Commented Oct 18, 2022 at 22:18
  • 1
    The "Solaris and Linux" part is tricky: is that stat invocation valid on Solaris? Commented Oct 18, 2022 at 22:55
  • 1
    @roaima, mtime is modification time, ctime or more specifically "birth time" is a time when file was created. For lock files, the ctime is more useful (usually). But if you like to do an mtime - replace -c%W with -c%Y. Commented Oct 18, 2022 at 23:23
  • 5
    @WhiteOwl ctime is the change time which refers to the last time some metadata related to the file was changed. See this Commented Oct 19, 2022 at 1:27
  • The find command is never being executed, it doesn't matter what it returns. The [ command doesn't execute its arguments as a command. Commented Oct 19, 2022 at 15:01