OMG I'm screwed. My OS is messed up and doesn't work anymore
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
what was the command supposed to do? Move something to the present working directory, is my guess, but what? everything or only the lowest directory?
I wonder if you could provide some info on your install.
What was the $PWD?
Can you tell me, what is the installed OS(on the HD)?
Did you do it while running the live cd, or is that a fall-back boot?
you could recover the moved files,
by date stamp, using ls or du commands (look these up, with man or --help) and even konqueror from a gui.
or If you're prepared to wait, a recovery application, like testdisk and photorec, all you need is a free partition of equal size to the partition being recovered. (this could take a while, depending on the size of the disk and speed of hardware etc.)
I hope this gives you something to work on,
Last edited by GlennsPref; 08-16-2008 at 05:36 AM.
mv /*/*/ $pwd will have moved every second-level directory to one big dumping ground $pwd.
Even ignoring any name collisions (/usr/lib/ , /var/lib/ & /opt/lib will have all been dumped to $pwd/lib and intermixed as an example) you're looking at a pretty big mess and it'll be next to impossible to sort it out.
I'm afraid you're most likely looking at a reinstall/restore from backup.
Ouch. Sounds like you're screwed as far as recovering the mess you've created to a working system is concerned. Assuming you are not willing to simply loose all your files I think your best bet is to get hold of a suitably large external harddisk, copy everything on to that, re-install your system then try and go through the files on the external harddisk and find anything you want to keep. Or get a new harddisk, swap it for you current one, install on that and put your current harddisk in an external case so you can look at the files on it.
What was that command supposed to do anyway? What was $pwd supposed to represent? Current working directory is $PWD but I've never seen that used in a mv or cp command because . does the same thing and is much quicker to type.
I'm curious, why did you run this command? I'm not sure if /home on a separate partition is the answer(although good advice). I've never ever put home on a separate partition, and have never had a problem. I think the more important thing here is, when you run terminal commands that you know are going to be moving directories, changing their permissions or structure, etc.. make ABSOLUTE SURE, you're running the command right.
Last edited by IndyGunFreak; 08-16-2008 at 10:10 AM.