[oS-en] Recovering dead text file
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Yesterday I powered down the computer (not hibernated as usual). I was editing a text file with jstar (aka joe) and told it to save the file. But I failed somehow, because yesterday edit is not there, is lost. Not a big deal, I know what it was and can redo. If I try to edit the file again, it knows: Locked by cer@Telcontar.403. (S)teal lock, (I) edit anyway, (Q) cancel edit? I could just steal lock, but I'm curious whether I might recover the lost edit. Where is it, if it is somewhere? The edit command line is called: jstar howto I see in the last files of the home dir: lrwxrwxrwx 1 cer users 17 Aug 9 19:55 .#howto -> cer@Telcontar.403 - -rw------- 1 cer users 4707 Aug 10 12:01 .joe_state But those are not the edited file copy. And "cer@Telcontar.403" does not exist. It is not in tmp: cer@Telcontar:~> ls /tmp/j* ls: cannot access '/tmp/j*': No such file or directory cer@Telcontar:~> So, does jstar, aka joe, save a temporary file with the edit somewhere? There is a "JOE" file in home dir with old aborted edits, but it is dated 2007. - -- Cheers Carlos E. R. (from 15.3 x86_64 at Telcontar) -----BEGIN PGP SIGNATURE----- iHoEARECADoWIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCYvOF4Rwccm9iaW4ubGlz dGFzQHRlbGVmb25pY2EubmV0AAoJELUzGBxtjUfV18oAnAxanSh2BLy7rvV009og iZ/apGGZAJ9qDr/ZMjfGIOgBqn7YFZlBbwWBZg== =ik6S -----END PGP SIGNATURE-----
On 8/10/22 05:18, Carlos E. R. wrote:
Locked bycer@Telcontar.403. (S)teal lock, (I) edit anyway, (Q) cancel edit?
I could just steal lock, but I'm curious whether I might recover the lost edit. Where is it, if it is somewhere?
I poked around and the temporary file location, and in fact recovery after a crash, doesn't seem to be documented. Searching "jstar steal lock" turns up nothing. (well, it did turn up omething about motocycle grips??) Everything else, just refers you to "man 1 jstar" or the joe manual on sourceforge. In this case, it looks like you would have to "Use the Force Luke..." As between (S), (I), (Q), (I) looks the most promising with a GUESS being that "edit anyway" is "open the file, ignore/delete the lock and edit the current file anyway". I'd GUESS (S) is "continue edit with new file and just take the lock for the file with the same name" vim is far less painful that ctrl + k .... everything... -- David C. Rankin, J.D.,P.E.
On 2022-08-11 07:44, David C. Rankin wrote:
On 8/10/22 05:18, Carlos E. R. wrote:
Locked bycer@Telcontar.403. (S)teal lock, (I) edit anyway, (Q) cancel edit?
I could just steal lock, but I'm curious whether I might recover the lost edit. Where is it, if it is somewhere?
I poked around and the temporary file location, and in fact recovery after a crash, doesn't seem to be documented. Searching "jstar steal lock" turns up nothing. (well, it did turn up omething about motocycle grips??)
Everything else, just refers you to "man 1 jstar" or the joe manual on sourceforge.
In this case, it looks like you would have to "Use the Force Luke..."
As between (S), (I), (Q), (I) looks the most promising with a GUESS being that "edit anyway" is "open the file, ignore/delete the lock and edit the current file anyway".
I'd GUESS (S) is "continue edit with new file and just take the lock for the file with the same name"
vim is far less painful that ctrl + k .... everything...
The thing is, I remember in the past recovering a non saved edited file, it was just saved in "JOE", but that file in my account is dated 2007. Something must have disabled it, or the feature was removed or disabled at compile time. -- Cheers / Saludos, Carlos E. R. (from 15.3 x86_64 at Telcontar)
Hello, On Thu, 11 Aug 2022, Carlos E. R. wrote:
The thing is, I remember in the past recovering a non saved edited file, it was just saved in "JOE", but that file in my account is dated 2007. Something must have disabled it, or the feature was removed or disabled at compile time.
If I kill joe, it leaves a file in the current PWD named 'DEADJOE' ... HTH, -dnh -- Better visibility is no good if the oncoming traffic crashes into you with its arm across its eyes from the sudden blindness. -- Graham Reed
On 2022-08-11 13:26, David Haller wrote:
Hello,
On Thu, 11 Aug 2022, Carlos E. R. wrote:
The thing is, I remember in the past recovering a non saved edited file, it was just saved in "JOE", but that file in my account is dated 2007. Something must have disabled it, or the feature was removed or disabled at compile time.
If I kill joe, it leaves a file in the current PWD named 'DEADJOE' ...
It did, in the past. Not now. cer@Telcontar:~> l DEADJOE -rw------- 1 cer users 13066672 Apr 27 2021 DEADJOE cer@Telcontar:~> -- Cheers / Saludos, Carlos E. R. (from 15.3 x86_64 at Telcontar)
* Carlos E. R. <robin.listas@telefonica.net> [08-11-22 07:39]:
On 2022-08-11 13:26, David Haller wrote:
Hello,
On Thu, 11 Aug 2022, Carlos E. R. wrote:
The thing is, I remember in the past recovering a non saved edited file, it was just saved in "JOE", but that file in my account is dated 2007. Something must have disabled it, or the feature was removed or disabled at compile time.
If I kill joe, it leaves a file in the current PWD named 'DEADJOE' ...
It did, in the past. Not now.
cer@Telcontar:~> l DEADJOE -rw------- 1 cer users 13066672 Apr 27 2021 DEADJOE cer@Telcontar:~>
-- Cheers / Saludos,
Carlos E. R. (from 15.3 x86_64 at Telcontar)
mine has done the same *forever*. I see two paths, reinstall joe. and/or remove ~/.joerc and reinable each option one or a few at a time until you find culpret. -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet oftc
Le 11/08/2022 à 15:28, Patrick Shanahan a écrit :
I see two paths, reinstall joe. and/or remove ~/.joerc and reinable each option one or a few at a time until you find culpret.
just for info. I read this thread, but never used joe previously (openSUSE 15.3) after launching joe (just "joe <RC>"), typing some text and closing the terminal, I have *no* joe file at all but a .joe_state no .joerc, no DEAD... thing jdd -- http://dodin.org http://valeriedodin.com
On 2022-08-11 17:45, jdd@dodin.org wrote:
Le 11/08/2022 à 15:28, Patrick Shanahan a écrit :
I see two paths, reinstall joe. and/or remove ~/.joerc and reinable each option one or a few at a time until you find culpret.
just for info. I read this thread, but never used joe previously (openSUSE 15.3)
after launching joe (just "joe <RC>"), typing some text and closing the terminal, I have *no* joe file at all but a .joe_state
no .joerc, no DEAD... thing
Instead of closing the terminal, use "kill {PID}" or "killall joe" I just did that, no dead thing. Then I moved the ".joe_state" file and tried again, and on kill I got: *** JOE was aborted by UNIX signal 15. Buffers saved in DEADJOE and sure enough, the DEADJOE file was in the current directory running the editor program. -- Cheers / Saludos, Carlos E. R. (from 15.3 x86_64 at Telcontar)
Le 11/08/2022 à 18:28, Carlos E. R. a écrit :
Instead of closing the terminal, use "kill {PID}" or "killall joe"
*** JOE was aborted by UNIX signal 15. Buffers saved in DEADJOE
got nothing
and sure enough, the DEADJOE file was in the current directory running the editor program.
but I have the DEADJOE file with *** These modified files were found in JOE when it aborted on Thu Aug 11 14:24:58 2022 *** JOE was aborted by UNIX signal 1 *** File '* Startup Log *' Processing '/etc/joe/joerc'... Processing '/etc/joe/ftyperc'... Finished processing /etc/joe/ftyperc Finished processing /etc/joe/joerc (...) jdd -- http://dodin.org http://valeriedodin.com
* Carlos E. R. <robin.listas@telefonica.net> [08-11-22 12:30]:
On 2022-08-11 17:45, jdd@dodin.org wrote:
Le 11/08/2022 à 15:28, Patrick Shanahan a écrit :
I see two paths, reinstall joe. and/or remove ~/.joerc and reinable each option one or a few at a time until you find culpret.
just for info. I read this thread, but never used joe previously (openSUSE 15.3)
after launching joe (just "joe <RC>"), typing some text and closing the terminal, I have *no* joe file at all but a .joe_state
no .joerc, no DEAD... thing
Instead of closing the terminal, use "kill {PID}" or "killall joe"
I just did that, no dead thing.
Then I moved the ".joe_state" file and tried again, and on kill I got:
*** JOE was aborted by UNIX signal 15. Buffers saved in DEADJOE
and sure enough, the DEADJOE file was in the current directory running the editor program.
rpm -ql joe grep -i deadjoe /usr/share/doc/packages/joe/* /usr/share/doc/packages/joe/NEWS.md /quote/ - Added option to suppress DEADJOE file /unquote/ grep -i deadjoe ~/.joerc -nodeadjoe If you don't want DEADJOE files to be created mode,"nodeadjoe",rtn % % Disable DEADJOE %Znodeadjoe% did you even bother to look at the config file? As Suggested I wonder why you fail to see DEADJOE files? -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet oftc
On 2022-08-11 19:21, Patrick Shanahan wrote:
* Carlos E. R. <> [08-11-22 12:30]:
On 2022-08-11 17:45, jdd@dodin.org wrote:
Le 11/08/2022 à 15:28, Patrick Shanahan a écrit :
I see two paths, reinstall joe. and/or remove ~/.joerc and reinable each option one or a few at a time until you find culpret.
just for info. I read this thread, but never used joe previously (openSUSE 15.3)
after launching joe (just "joe <RC>"), typing some text and closing the terminal, I have *no* joe file at all but a .joe_state
no .joerc, no DEAD... thing
Instead of closing the terminal, use "kill {PID}" or "killall joe"
I just did that, no dead thing.
Then I moved the ".joe_state" file and tried again, and on kill I got:
*** JOE was aborted by UNIX signal 15. Buffers saved in DEADJOE
and sure enough, the DEADJOE file was in the current directory running the editor program.
rpm -ql joe grep -i deadjoe /usr/share/doc/packages/joe/*
/usr/share/doc/packages/joe/NEWS.md
/quote/ - Added option to suppress DEADJOE file /unquote/
grep -i deadjoe ~/.joerc -nodeadjoe If you don't want DEADJOE files to be created mode,"nodeadjoe",rtn % % Disable DEADJOE %Znodeadjoe%
did you even bother to look at the config file? As Suggested
I wonder why you fail to see DEADJOE files?
Did you read the last post in which I said that I got the DEADJOE created with correct content, and what I did to get that? -- Cheers / Saludos, Carlos E. R. (from 15.3 x86_64 at Telcontar)
participants (5)
-
Carlos E. R.
-
David C. Rankin
-
David Haller
-
jdd@dodin.org
-
Patrick Shanahan