Skip to content

How to get the file creation time?

How to get the file creation time?

Answer:

Linux never stores file creation time.

You can only get access, modify & change (change of status, e.g. permission) time of a file with stats command

# stats test.txt

stat test.txt
  File: `test.txt'
  Size: 25557           Blocks: 56         IO Block: 4096   regular file
Device: ca01h/51713d    Inode: 32714       Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1001/    user)   Gid: ( 1000/ user)
Access: 2010-01-02 18:53:46.000000000 +0800
Modify: 1970-01-01 17:13:08.000000000 +0800
Change: 2010-01-02 18:53:46.000000000 +0800
Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  1. How to change file’s modification / access time?
  2. How to easy remove file with strange file name?
  3. Remove directory name from file path
  4. Can I use gunzip to decompress a zip file?
  5. How to truncate a file?

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*