Skip to content

Comment on Restoring accidentally deleted files on Linux

Comments

If you are using ext4 there is extundelete that simplifies the process, it requires to remount the filesystem read-only, though.

  mount -o remount,ro /dev/sda1
  extundelete --restore-all --after $(date -d "-1 hours" +%s) /dev/sda1
  find /RECOVERED_FILES -name accidentally_deleted_file 
  mount -o remount,rw /dev/sda1
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.