I have executed
rm -f *.gz about 30 days ago. Is there any way to find out the list of files that were deleted?
You can use the
debugfs is a simple to use RAM-based file system specially designed for debugging purposes
debugfs /dev/sda2 in your terminal (replacing
/dev/sda2 with your own partition).
Once in debug mode, you can use the command
lsdel to list inodes corresponding with deleted files.
When files are removed in linux they are only un-linked but their inodes (addresses in the disk where the file is actually present) are not removed
To get paths of these deleted files you can use
debugfs -R "ncheck 320236" replacing the number with your particular inode.
Inode Pathname 320236 /path/to/file
From here you can also inspect the contents of deleted files with
cat. (NOTE: You can also recover from here if necessary).
For future precaution you use Inotify Tools. then you can use the
inotifywait command to listen for events happening for the specified directory.
Specifically if you want to watch for deleted files and folder use this
inotifywait -m -r -e delete directory_name
and log this output in some file.
And I would also recommend you to look for iwatch.