How to get file creation date/time in Bash/Debian?

后端 未结 12 1763
有刺的猬
有刺的猬 2020-11-28 23:00

I\'m using Bash on Debian GNU/Linux 6.0. Is it possible to get the file creation date/time? Not the modification date/time. ls -lh a.txt and stat -c %y a.

12条回答
  •  隐瞒了意图╮
    2020-11-28 23:59

    even better:

    lsct () 
    { 
        debugfs -R 'stat <'`ls -i "$1" | (read a b;echo -n $a)`'>' `df "$1" | (read a; read a b; echo "$a")` 2> /dev/null | grep --color=auto crtime | ( read a b c d;
        echo $d )
    }
    

    lsct /etc

    Wed Jul 20 19:25:48 2016

提交回复
热议问题