News for hackers. Stuff that matters.
Re:Undeleting a file overwritten with mv by vram22 on Sunday November 29, 2020 @01:37PM (#25246958)
They may have been able to make this command they used:

cat /dev/md2 \

| pv -s 1888127576000 \

| grep -P --byte-offset --text 'FLV\x01\x05' \

| tee -a /mnt/storagebox/grep-log.txt

somewhat (or a lot) faster by adding a strings command (maybe with an appropriate length arg matching the grep pattern length) to the pipeline after the cat, and removing the pv call, be ause then only the printable ASCII characters woyls be passed to the grep, potentially heavily reducing the work it has to do, depending on the breakup between binary and text data (bytes) on disk.

https://man7.org/linux/man-pages/man1/strings.1.html

Re:Undeleting a file overwritten with mv by xphx on Tuesday December 01, 2020 @07:34AM (#25264606)
That would invalidate the byte offset. The intention here isn't so much printing the data as its location on disk.
Re:Undeleting a file overwritten with mv by vram22 on Tuesday December 01, 2020 @05:25PM (#25270853)
Oh yes, of course. My mistake. I did look up all the grep options used, including --byte-offset, before commenting, but somehow your point did not occur to me. Yes, the byte offsets would be meaningless after the data was piped through strings.
Re:Undeleting a file overwritten with mv by vram22 on Sunday November 29, 2020 @10:47PM (#25250537)
Sorry, typos above:

>be ause then only the printable ASCII characters woyls

should be

because then only the printable ASCII characters would