Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I change 'change' date?

$ touch -t 9901010000 test;stat test
  File: `test'
  Size: 0           Blocks: 0          IO Block: 4096   regular empty file
Device: fe01h/65025d    Inode: 11279017    Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1000/    x)   Gid: ( 1000/    x)
Access: 1999-01-01 00:00:00.000000000 +0100
Modify: 1999-01-01 00:00:00.000000000 +0100
**Change: 2012-04-08 19:26:56.061614473 +0200**
 Birth: -
share|improve this question
Setting arbitrary ctime is not easy to do. Related question on SO. – jw013 Apr 8 '12 at 19:38

You cannot change the ctime by ordinary means. This is by design: the ctime is always updated to the current when you change any of the file's metadata, and there is no way to impose a different ctime. To change the ctime of a file, you need to do one of the following:

  • Set the system time to the ctime you want to impose, then touch the file, then reset the system time.
  • Modify the kernel to add an interface to change the ctime.
  • Access the disk image directly (e.g. with debugfs) and twiddle the bits on the disk (don't do it while the filesystem is mounted).
share|improve this answer
Setting system time and chmod worked for me. See script here: stackoverflow.com/questions/16126992/… – gaoithe May 25 at 10:20

You have the answer on related SO question pointed by jw013, for extX, on unmounted disk :

# Update ctime
debugfs -w -R 'set_inode_field /tmp/foo ctime 201001010101' /dev/sda1

# Drop vm cache so ctime update is reflected
echo 2 > /proc/sys/vm/drop_caches
share|improve this answer

The ctime of a file is updated when any of the metadata is changed.

$ ls -l x.py
-rw-rw-r--. 1 ignacio ignacio 485 Mar 26  2010 x.py
$ stat -c %z x.py
2010-03-26 11:57:56.237068175 -0400
$ chown ignacio x.py
$ stat -c %z x.py
2012-04-08 15:31:33.682383575 -0400
$ ls -l x.py
-rw-rw-r--. 1 ignacio ignacio 485 Mar 26  2010 x.py
share|improve this answer
but how modify it without update it – Someone1234 Apr 8 '12 at 20:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.