I recently overwrote a file with notes about a problem I had to deal with that was residing on a web server by moving another file over top of it accidentally. I was in a hurry to complete my notes so I could go to bed; I thought about waiting until the morning to complete the notes, but thoughit I could complete them in just a few more minutes, but when I used
!:1
as a shorthand in a mv command, I didn't realize
that the second item on the last command line entry was the filename for the
file with my notes. I didn't realize what I had done until I tried to
view the web page with my notes from the PC I was using at the time for
the SSH connection to the web server.
Since I had viewed the notes in the Google Chrome browser on the Microsoft
Windows-based system I was on shortly before I overwrote them, I thought
I might be able to find a copy of the notes in the browser's cache. But
since I didn't grasp what I had done until I refreshed the page in the
browser, it was now too late to get the data from the Chrome cache, since the
cached page now just showed the "404 file not found" message due to the
file no longer existing on the web server. So I thought there still
might be a slim chance that I could recover the notes web page from
a Volume Shadow
Copy, i.e., a prior version of the file stored on the Windows
system. I thought, if I could identify the particular cache file used
for that webpage, there might be a prior version of that file
stored by the Volume Shadow Copy Service. I thought I could possibly
use ChromeCacheView,
which is a small, free program that will allow you to
examine the Google Chrome web browser cache. With
that program you can view a list of all cached web pages and
view the cached copies of those pages stored on the system.
I was able to identify the particular file in the
C:\Users\%username%\AppData\Local\Google\Chrome\User
Data\Default\Cache
directory that held that particular
cached webpage. The file was data_4
, but unfortunately,
I wasn't able to find a prior version of the file. Though if you
need to examine the Chrome cache on a Microsoft Windows system, ChromeCacheView
is a very useful tool well-suited to that purpose. You can also put
chrome://cache
in the Chrome addres bar to see a list of
URLs of cached pages, but ChromeCacheView provides many more capabilities
for operations on that list of cached items.