Recover deleted files with foremost
In this tutorial I will teach you how to use
foremost to recover deleted files from a disk.
A basic example of
foremost usage is:
foremost -i /dev/sdb1
- It will recover files from
/dev/sdb1and it will create an
outputfolder in the current directory with those files and an audit file.
- In this case, you will need to be a root user or use sudo. Recovered files will be owned by root (you can change the owner with
chownwhen the process finishes).
- Never use the same disk partition for searching and retrieving the files.
You can add more parameters to customise the searching:
-t <type>: recover only files of a specific format (
-T: adds a timestamp to the output folder. By default, you need to rename or delete the output folder when running
-o <directory>: specify an output directory.
-v: enables verbose mode.
-q: enables quick mode.
- You can find more info about all available parameters on the man page (
In Debian/Ubuntu systems, you can use
dpkg-reconfigureto reconfigure an installed package using intuitive dialogs. I will show you how to use this command to change some system settings.
If you have a scanned PDF and you want to be able to search and copy text from it, in this tutorial I will show you how to do it.
If you want to do X11 forwarding from your container to your host, you can type these simple commands.
If you don’t have a Graphical User Interface (GUI) on your Linux device, or you need a simple text-based web browser, I will show you a couple of great programs.
A comprehensive list of Linux-related websites sorted by categories.