Results 1 to 10 of 17
I cannot beleive this happened. I was copying some files in graphical mode, from one directory to /var/html/www/ and the curser jumped and picked up the var directory and dropped ...
- 07-31-2007 #1Just Joined!
- Join Date
- Jul 2007
- Posts
- 9
Deleted /VAR directory
I cannot beleive this happened. I was copying some files in graphical mode, from one directory to /var/html/www/ and the curser jumped and picked up the var directory and dropped it somewhere. I suspect the var directory was deleted. I was in root at the time so no warning messages.
I looked in the filesystem and sure enough var had gone. I then tried to find it with the file search, then looked back in the file system and var had reappeared but with just one log file in it
I logged out out root, and the graphical mode could then not be restarted.
I have left the system alone as it is still serving files, but what is going to happen when I reboot ? I suspect it is going to crash and I willl have to reinstall the Centos operating system again.
I have the files backed up for the data on the server was holding, but not the filesystem itself (won't do that again!)
I was half hoping that the var files could be rewritten, but I surely would need to reboot this server now.
Surely by the accident you learn by mistakes but is a reinstal the only way out?
Thanks in advance if anyone can help?
- 07-31-2007 #2
Don't feel like the Lone Ranger...
Link
Wish I could help more...
- 07-31-2007 #3Just Joined!
- Join Date
- Jul 2007
- Posts
- 9
Thanks for that, at least someone else has been there. I have been kicking arse all afternoon ( Mine)
I tried a search but that link didn't turn up.
I'll try a reboot of the 1st install disk when the inevitable crash occurs.
- 07-31-2007 #4Just Joined!
- Join Date
- Apr 2007
- Posts
- 47
If you deleted it, it should be in the root's trashcan. You might also put it in an other folder by drag and drop. Use your search tool again. Even if it were "permanently deleted" you can recover it. Permanent deletion deletes with one pass and there are tools which can recover even more passes (layers).
- 07-31-2007 #5Just Joined!
- Join Date
- Jul 2007
- Posts
- 9
Thanks, I think I did a second stupid thing by logging out as root so I cannot get back in to do a re-search.
I cannot even get into terminal as there is an error message 'bad close and cannot install ' ( haven't got the precise message at the moment ) but a black screen and flashing curser that will not respond to entry, escape or delete.
Wish I could get back in it, or the terminal ?
- 07-31-2007 #6Just Joined!
- Join Date
- Apr 2007
- Posts
- 47
- 07-31-2007 #7Just Joined!
- Join Date
- Jul 2007
- Posts
- 9
I am using Centos OS on a Dell 2600 power edge box, been nice and stable (Till now)
What would be a good command to get out of the black error screen without rebooting?
- 07-31-2007 #8
If it were me, and I thought my var directory was just hidden somewhere, I think I'd boot a live cd on that box, mount the partition where your root directory is and search for it that way. For instance, if your root directory is on hda1, (as su from the live cd):
Code:mkdir /mnt/hda1
Manually look for it, or if the live cd you use allows for it do:Code:mount /dev/hda1 /mnt/hda1
Then:Code:updatedb
If it can be done that way, /var will be located but that will be part of the live cd. Your var is going to be somewhere else in /mnt/hda1.Code:locate var
- 07-31-2007 #9Just Joined!
- Join Date
- Jul 2007
- Posts
- 9
I wish, I wish I had not logged out of gnome as root, Panick I suppose, in hindsight var is probably been dropped somewhere not deleted.
I'll try your commands with the install Cd 1 and see if I can find it.
Many thanks
- 07-31-2007 #10
Right. Since you were in graphical mode, delete doesn't mean delete. It actually moves it to the trash. So try checking (using Dapper Dan's example) /mnt/hda1/root/.Trash. If it's not there, then use the locate method, or you can try:
This will look for a directory called 'var' in the tree starting at /mnt/hda1. It will take a while to run, but might find it if it was just accidentally moved.Code:find /mnt/hda1 -type d -name var
As a sidenote, this is an excellent example of why you never login as the root user or use root in graphical mode :-p.DISTRO=Arch
Registered Linux User #388732


Reply With Quote
