3

I've accidentally deleted ICEauthority, Xauthority files, and some more files (but don't know what files).

Actually I ran the command below to delete empty files on the root directory with sudo privilege, though I terminated the process in between, and now I cant log in. How to login again and to restore the necessary files? I can login into terminal but not into desktop.

The command I ran:

sudo find / -size 0 -exec rm -f {} \;
Jawa
  • 3,679
user1779646
  • 135
  • 1
  • 4

1 Answers1

6

~/.ICEauthority and ~/.Xauthority are updated automatically whenever you log in to a graphical environment. Losing those only breaks things until a reboot, at worst. (Besides, if they were empty, then they weren't being used in the first place.)

The same applies also to everything you deleted from /dev and /run, the contents of which are regenerated dynamically. (Items in /dev, however, are device nodes which always appear as 0 bytes sized, as they act as interfaces to kernel drivers instead of holding data. Similarly, /run often holds local sockets.) When you reboot, those directories should be filled again.

I'd be more concerned with other zero-length files that you deleted this way. Frankly, it is a very stupid idea to just delete all system files matching some arbitrary criteria.

grawity
  • 501,077