?

Log in

No account? Create an account
 
 
25 October 2009 @ 10:20 am
Hey Kids!  
Pop Quiz:
So let's say you're moving files around, and you want to replace directory X with identically named directory Y, but you accidentally make Y a subdirectory of X. In order to move all of the files in Y and the files in the subdirectories of Y from Y to X, what should you do? Note, these files are administrator access only.
  1. Look up the appropriate documentation of the "sudo mv" command.
  2. Repeatedly invoke "sudo mv" for each directory
  3. Use a substitution variable to move the contents of each subdirectory with minimal retyping, a la "sudo mv $DIR/* ../$DIR/"
  4. Use a substitution variable to move the contents of each subdirectory with minimal retyping AFTER defining the initial value of your variable.

If you chose C, congratulations, you're smart enough to screw up your entire system, because you just moved everything in your root directory to directory X. Now sit back and watch as little bits of your operating system drop off one by one. No icons. No "ls" "sudo" or "mv" (although surprisingly autocomplete still works). Eventually the terminal will crash.

Fortunately, you can undo the damage by booting from a Ubuntu Boot CD, and move everything back. Apparently root on the boot CD is good enough to move around important files on your main drives.

Hypothetically speaking of course.
 
 
 
Rachel Marie :o)spychicr on October 26th, 2009 01:10 am (UTC)
Wow, DL!!, I didn't know you spoke ancient Aramaic. Because that's totally what this post is written in.