For the second time now Porteus 5 has messed up an existing file on an external network drive (ext4 linux nas).
I usually edit the contents of the files (simple text) on windows (via network, no problems there) (options are http, samba/cifs, nfs).
In the past and again now, i edited the file using porteus (leaf), with root access, save everything seems fine at first
but after trying to reopen the saved file, it is truncated ..to be precise, it is rounded down to the next exact cluster. last time file was cut(truncated) to exactly 96,0 kB (98.304 bytes) and this time 16,0 kB (16.384 bytes)
i'm guessing the remaining data is physically still on the disk ..how to get it back ?
Porteus unintentially truncates files
- ncmprhnsbl
- DEV Team
- Posts: 3941
- Joined: 20 Mar 2012, 03:42
- Distribution: v5.0-64bit
- Location: australia
- Contact:
Porteus unintentially truncates files
looks like leafpad needs to be built with this patch: https://gitweb.gentoo.org/repo/gentoo.g ... eb7ea91f9a
edit: and looking at the source of l3afpad, something similiar might be relevant there too..
"grep for some known string in the truncated file."
edit: and looking at the source of l3afpad, something similiar might be relevant there too..
maybe form here: https://askubuntu.com/questions/403010/ ... -by#648794
"grep for some known string in the truncated file."
Code: Select all
grep -a -A 1000 -F 'some known string' \
/dev/disk-device > recovered-file
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44
Porteus unintentially truncates files
thnx a LOT (knew it wasn't my fault ..)
will have to take the disk out of the NAS and mount on a live-system ..
I approx. know how many lines might be missing so the -A and -B should give result quite easily (if not overwritten.. i didn't notice it immediately )
success
will have to take the disk out of the NAS and mount on a live-system ..
I approx. know how many lines might be missing so the -A and -B should give result quite easily (if not overwritten.. i didn't notice it immediately )
success