I have run into a problem where I accidentally erased the contents of a conf file. I am trying to use the cp and tail recovery process that I saw online but it does not appear to be working. The file is still in memory:
# ps aux | grep 'process'
root 30495 0.0 0.0 23660 728 ? S 2015 0:17 /usr/local/sbin/file -C /etc/dir/file.cfg
The contents of /proc/pid look as follows:
ls -l /proc/30495/fd/0
lrwx------. 1 root root 64 Mar 7 11:35 /proc/30495/fd/0 -> socket:[1278416]
CP recovery method:
cp /proc/30495/fd/0 recovered.cfg
cp: cannot open `/proc/30495/fd/0' for reading: No such device or address
Tail recovery:
tail -c +0 -f /proc/30495/fd/0 recovered.cfg
tail: cannot open `/proc/30495/fd/0' for reading: No such device or address
tail: cannot open `recovered.cfg' for reading: No such file or directory
Is there anything else I can do to get the contents of this file out of RAM?