Linux recover deleted files

From Ever changing code
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