Languages
[Edit]
EN

Bash - how to check file data?

10 points
Created by:
Maryamcc
481

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
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Bash

Bash - check file data
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join