How Do You Check Who Deleted Files in Linux?
Contents

(NOTE: You can find the name of your disk by running df / in the terminal). Once in debug mode, you can use the command lsdel to list inodes corresponding with deleted files. To get paths of these deleted files you can use debugfs -R “ncheck 320236” replacing the number with your particular inode.

How do you find out who deleted the files in Linux?

2 Answers

  1. check the OS syslog (/var/adm/syslog/syslog.log for hp-ux, /var/log/messages for linux)
  2. Try the last commando to get a list of who logged on when.
  3. Check the command histories of the sidadm, root user, use the history command, or the h alias.
  4. Check if there are scripts running, which regularly delete files.

4 февр. 2016 г.

How can I find out who deleted a file?

Open the Event Viewer and search the security log for event ID 4656 with a task category of “File System” or “Removable Storage” and the string “Accesses: DELETE”. Review the report. The “Subject: Security ID” field will show who deleted each file.

Maya Lin-Takahashi

Maya Lin-Takahashi

Consumer Tech & Gadget Reviewer

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.

Share this article
Twitter Facebook Pinterest