Languages
[Edit]
EN

Bash - how to check file dates?

10 points
Created by:
Kate_C
2854

1. It can be checked with stat command:

$ stat path/to/file

Example:

$ stat path/to/file
  File: path/to/file
  Size: 6         	Blocks: 8          IO Block: 4096   regular file
Device: 801h/2049d	Inode: 656476      Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1000/   my_user)   Gid: ( 1000/   my_user)
Access: 2019-08-02 22:29:18.853867483 +0100
Modify: 2019-08-02 22:29:18.853867483 +0100
Change: 2019-08-02 22:29:18.853867483 +0100
 Birth: -

2. Or with ls command:
    - atime - time of last access:

$ ls –lu 

    - mtime - time of last modification

$ ls –l

    - ctime - time of last status change

$ ls –lc

Checkout latest findings & news:

Checkout latest questions:

Checkout latest wiki articles:

Hey 👋
Would you like to know what we do?
  • Dirask is a friendly IT community for learners, professionals and hobbyists to share their knowledge and help each other in extraordinary easy way.
  • We welcome everyone,
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.
Rockstar community members
Thank you for great work 👍