このエントリーをはてなブックマークに追加


atime,ctime,mtimeの取得方法

lsとstatコマンドを使用してatime, ctime, mtimeを表示してみます。


atime, ctime, mtimeとは?

atime, ctime, mtimeについて以下に記します。

atime
access time (アクセスした日時)
ctime
change time (ステータス変更を行った日時)
mtime
modify time (データ変更を行った日時)

lsコマンドでatime, ctime, mtimeを確認

  • atime
    ls -lu
  • ctime
    ls -lc
  • mtime
    ls -l

statコマンドで確認

statコマンドで確認する場合は、以下の構文になります。

stat ファイル名

実際の実行例です。

sakura@ubuntu:~$ stat sakura.txt
  File: `sakura.txt'
  Size: 36              Blocks: 8          IO Block: 4096   通常ファイル
Device: fc00h/64512d    Inode: 658940      Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/  sakura)   Gid: ( 1000/  sakura)
Access: 2013-09-28 01:28:21.544796664 +0900
Modify: 2013-09-28 01:28:21.544796664 +0900
Change: 2013-09-28 01:28:21.548796598 +0900
 Birth: -
sakura@ubuntu:~$

以上、atime,ctime,mtimeについてでした。



トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2015-03-20 (金) 22:28:21