Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

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

 
discard

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.