Skip to content

Instantly share code, notes, and snippets.

@tkfm-yamaguchi
Created December 27, 2018 00:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkfm-yamaguchi/977e5b2a298aef6b42e2ffcb12a30d1f to your computer and use it in GitHub Desktop.
Save tkfm-yamaguchi/977e5b2a298aef6b42e2ffcb12a30d1f to your computer and use it in GitHub Desktop.
recover removed file
sudo grep -i -a -B 100 -A 100 'string' /dev/sda1 > file.txt
# or
# sudo grep -F -a -C 100 'string' /dev/sda1 > file.txt
# ref:
# https://unix.stackexchange.com/questions/2677/recovering-accidentally-deleted-files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment