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.
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.
I'm affraid that unless you have made a backup, you have little chance of recovering your file. I'm sorry.