10.15.2012

Copy Files from root in Ubuntu

I'm using Ubuntu 12.04. Today there are files I wanna copy in my root to some folder outside the root without really logging in in the root user. These files are from my github. I've searched and searched the net for clear instructions and I've found this in answer in one of the forum. Thank God! 

Here's how to: 


  1. Press alt+f2 to get a run dialogue and in that type gksu nautilus. This will open up a file browser window running as root. Copy your files across but be careful, you can nuke the system like this.
  2. A much more direct method is just loading up a terminal and writing:
    sudo cp -R /path/to/files/you/want/copied/ /copy/to/this/path/
    
    (the -R is just there to recursively copy directories)
If you ever want to fire off multiple commands as root without prepending them all with sudo you can run sudo -i or sudo su and you'll get a root terminal. But again, be careful what you do.

Thank you Oli!(username of the one who've answered) 
I tried the step2.  WORKS for me!! :)

No comments:

Post a Comment