0

I ran the command

sudo find / -mtime +100 -delete

The damage was such that when I pressed ENTER on the console it no longer presented a login prompt.

Later on examining the wreckage I found that the process stopped before all files were deleted, and some data could be recovered.

Why?

The find command and all of its library dependencies would be loaded into memory before any of its required bits were removed. So why did it stop? Maybe because important files such as /etc/passwd were deleted?

1 Answer 1

1

This command deletes all files and directories older than 100 days. Newer files are not touched. So it's normal that not all files were erased.

Also, the removal of /etc/passwd would prevent any user to further log in, and would prevent usernames and groupnames to show up in the output of ls -l, but it would not abruptly stop the find process neither close your current session.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.