two days ago I did silly thing.
I entered 'rm *' command in root directory.
alas all files are gone
any alternatives to bring back deleted files on puppy save files?
after I realized my mistake, I shut down improperly (pressing power button longer time)
hoping the deleted files not flush onto puppy save file
then booted up other system puppy 4
mounted puppy save file, no luck every files except folder are gone
hope there is any magic to bring back my deleted files
how to undu "rm *" in root puppy save file
Re: how to undu "rm *" in root puppy save file
You should have a virgin copy of /root atpewekodok wrote:two days ago I did silly thing.
I entered 'rm *' command in root directory.
alas all files are gone
any alternatives to bring back deleted files on puppy save files?
after I realized my mistake, I shut down improperly (pressing power button longer time)
hoping the deleted files not flush onto puppy save file
then booted up other system puppy 4
mounted puppy save file, no luck every files except folder are gone
hope there is any magic to bring back my deleted files
/initrd/pup_ro2/root (general) and at
/initrd/pup_ro4/root (default configurations)
In console, try
Code: Select all
cp -f /initrd/pup_ro2/root/* /root/*
Code: Select all
cp -f /initrd/pup_ro4/root/* /root/*
If that doesn't work, try by opening
rox /initrd/pup_ro2/root/ and then rox /root side by side.
Copy everything from the former to the latter.
Same, from rox /initrd/pup_ro4/root/ to rox /root.
BFN.
musher0
~~~~~~~~
PS. Next time, make a back-up before doing anything drastic?
Even better, if the above works, make a back-up to a thumb drive -- now!
No offense intended, we all did silly things to our Puppy at some point!
(Luckily, no one told the SPCA!)
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Another solution :
Boot from CD/DVD with pfix=ram setting at first prompt.
Once on your desktop, locate your old pupsave file and open it (by double-click).
Then, "pour" whatever is in your CD's /root into
< /mnt/whatever-partition/pupsave-blabla.2fs/root >.
Remove your CD and reboot. Don't save anything.
Upon reboot, you should have the default "virgin" items in your /root.
You'll have to redo your configs, etc., but it's a lesser evil...
BFN.
Boot from CD/DVD with pfix=ram setting at first prompt.
Once on your desktop, locate your old pupsave file and open it (by double-click).
Then, "pour" whatever is in your CD's /root into
< /mnt/whatever-partition/pupsave-blabla.2fs/root >.
Remove your CD and reboot. Don't save anything.
Upon reboot, you should have the default "virgin" items in your /root.
You'll have to redo your configs, etc., but it's a lesser evil...
BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Code: Select all
rm -r *
rm -fr *
I doubt that it's a user problem , since you could do so also in /home/joe or /root/spot .
musher0 said a few things about to restore files from the pup-4yz.sfs into the pupsave.2fs .
Just click on the pup-4yz.sfs , that should mount it and open a rox filer window .
/root/.xinitrc may be the one that's most important, since without that /usr/bin/xwin would choke and likely error out and would fail to launch xwin .
Puppy's code often does not check files or variables - size and performance may suffer.
@starhawk.
I don't know if the person can. I'm too chicken to reproduce the problem on my Puppy.
Just trying to follow some logic.
But the folders are probably untouched. As Karl mentions, it could have been worse.
As to rm itself, it's a dangerous command, but we need it. It has inbuilt safeguards: by
default it will ask if you want to delete the file(s). If you type rm alone, it will print the
message "operand missing" and stop. No harm done.
Was it DOS that had a "wipe" command that erased a file at the byte level....
Is Linux a wiser OS? I don't remember who said: "An OS is only as intelligent as
the person sitting in front of it".
Conversely, you may have only a "P III", but if you're smart and know what you are
doing, it can become a "P VI" But that's another subject, isn't it?
BFN.
I don't know if the person can. I'm too chicken to reproduce the problem on my Puppy.
Just trying to follow some logic.
But the folders are probably untouched. As Karl mentions, it could have been worse.
As to rm itself, it's a dangerous command, but we need it. It has inbuilt safeguards: by
default it will ask if you want to delete the file(s). If you type rm alone, it will print the
message "operand missing" and stop. No harm done.
Was it DOS that had a "wipe" command that erased a file at the byte level....
Is Linux a wiser OS? I don't remember who said: "An OS is only as intelligent as
the person sitting in front of it".
Conversely, you may have only a "P III", but if you're smart and know what you are
doing, it can become a "P VI" But that's another subject, isn't it?
BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)