0

I have deleted a user account using the command userdel -r george. It deleted that user with their files. I need to restore that user and their files, is it possible? How can I achieve it?

terdon
  • 100,812
George Ulahannan
  • 89
  • 1
  • 7
  • 17

1 Answers1

1

Not easily, no. The files have been deleted, you will need to use a tool that can recover deleted files, there is no undo for this. For help on recovering deleted files, see this Q&A:

How to recover deleted files?

Recreating the user is the easy part:

adduser george

For future reference, user management should be done with adduser and deluser instead of useradd and userdel.

terdon
  • 100,812