Server Fault is a question and answer site for system and network administrators. 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

I am newby in Linux, I wonder to know is there is any chance to recover changed file to its previous state?

I have had file aaa.cpio and have run the following command by mistake:

cpio -iv > aaa.cpio 

which of course changed file content(I had to run cpio -iv < aaa.cpio)

How to recomev my real aaa.cpio?

Thank you very much...

My OS is CentOS.

share|improve this question
up vote 1 down vote accepted

I suppose there's a slight chance if you wanted to get to the level of the filesystem and see if you can recover the data at the block level. Practically speaking, the answer would be to recover the file from backups.

I'd never recommend anyone play with the filesystem unless that person knew what they were really doing.

There are no built-in mechanisms by default for restoring files by versions in Linux that I'm aware of.

share|improve this answer

I'm affraid that unless you have made a backup, you have little chance of recovering your file. I'm sorry.

share|improve this answer

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.