Linux recover deleted files

From Ever changing code
Revision as of 09:25, 26 February 2018 by Pio2pio (talk | contribs) (→‎References)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Grep all block device for a string withing a deleted file and display 100 lines before and after the match

sudo grep -i -a -B100 -A100 'string' /dev/sda1 > file.txt

References

recovering-accidentally-deleted-files Stackoverflow