I wanted to know if there was any way to check the contents of a file before it was modified in linux. 
As in suppose i have a file called example.cpp where i have a C++ code written in it. Now if i made some changes and saved it, is it possible to check the older example.cpp file without the changes made?

Thanks in advance