Hello,
I accidentally run rm -fR on my home ~ directory, losing GBs. So now I'm trying to find out what directories were.
I stopped it while it was on /defaults as I realised it seeing that root permission was necessary. Any hints to see at least what directories been deleted?
Also am I at risk rebooting the system?
Kind regards.
edit: so I urge myself to know what directories before /defaults and after it...
delete files via rm
-
- Posts: 1522
- Joined: 2014/05/21 20:16:00
- Location: Central New York, USA
Re: delete file via rm
The only /default directory that I know of is in /etc and would require root permission. If this is the case in your situation, a reinstall may be the easiest.
Re: delete files via rm
Hello,
actually I have a directory /defaults (with s at the end) in my user directory ~.
rm didn't delete anything which needs root permission. It tried to delete /defaults but a message informed me that roor privillege was necesary....
I'd like to know what I delete before rebooting...
actually I have a directory /defaults (with s at the end) in my user directory ~.
rm didn't delete anything which needs root permission. It tried to delete /defaults but a message informed me that roor privillege was necesary....
I'd like to know what I delete before rebooting...
Re: delete files via rm
Default files for account are copied from /etc/skel.
See ls -laR /etc/skel
These you can restore by copy from /etc/skel. If you had modified them, that we can't help with.
When one starts a GUI desktop session, some additional directories do get created, like "Documents" and "Downloads".
New GUI session will recreate those, but any files you had added are on you.
Nothing creates content to home directory that would require root privileges. That must have been your doing.
Overall, the home has only (data) files and personal customizations/settings. Stuff that one should keep backups for.
See ls -laR /etc/skel
These you can restore by copy from /etc/skel. If you had modified them, that we can't help with.
When one starts a GUI desktop session, some additional directories do get created, like "Documents" and "Downloads".
New GUI session will recreate those, but any files you had added are on you.
Nothing creates content to home directory that would require root privileges. That must have been your doing.
Overall, the home has only (data) files and personal customizations/settings. Stuff that one should keep backups for.
Re: delete files via rm
If you have no backup then you have most liklely lost those fles. If you want to attempt to recover them then you should STOP using the system immediately and shut it down. Now find some recovery media - perhaps systemcrescuecd - that includes a utility called photorec. This can attempt to recover deleted files and will (optionally?) write them to a different destination filesystem, maybe a USB stick?
I do not have a 'defaults' directory anywhere in any of my home directories. And if I did I would be surprised to find anything in my home directory that was not owned by my own user.
I do not have a 'defaults' directory anywhere in any of my home directories. And if I did I would be surprised to find anything in my home directory that was not owned by my own user.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke