Is there a way to find out -when- a file got deleted?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
You should protect your 'rather important files' by giving almost no one rights to delete those files.
If only root can delete them, you know who did it, because only 1 (or 2) people know your root password....
We installed the Oracle 10g Binaries and the 10g Grid Control Agent on one of our servers (with several productive 9.2.0 DBs) - and now it's missing it's listener.ora/tnsnames.ora files from /ora/app/oracle/network/admin. We're trying to figure out which of the two installations caused that - if either was the reason.
The modification time for the directory is updated if a file is deleted from it, so if no other file deletion, rename or creation events have taken place since these important files were deleted, you might be able to work it out like that. It's a lot of 'if's though.
Another approach would be to check your incremental backups (you do have incremental backups, right)? Checking your daily backups will at least put an upper and lower bound on the date and time of removal.
If you're trying to work out how they got deleted, make sure you save the bash history file from all users who have rwx permissions on the parent directory. You can check through the commands executed to see if you can work out what happened.
If these files are used by some application (which now malfunctions), perhaps you can find clues about the time from the fallout of the failure. Without more information it is impossible for me to say.
A quick tip Which might help prevent Future file deletion .Set the Files attribute
using chattr +i (Imutable) attribute so that files doesnt get deleted
unless until root changes the attribute intentionally and then deletes it.