Sudo Copy

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

Sudo Copy

Postby whare1 on Sat May 12, 2007 6:31 am

Just a quick one guys/gals

command for sudo to copy multiple files to a root privileged directory (usr/share/games/)

Thanx
Will
I've Been
Minted

Running Mint 9 KDE
Running Mint 9 Gnome
User avatar
whare1
Level 2
Level 2
 
Posts: 71
Joined: Fri May 04, 2007 6:29 am

Linux Mint is funded by ads and donations.
 

Postby BlahBlah_X on Sat May 12, 2007 6:56 am

are you using the KDE or Gnome edition?

Gnome: in a terminal run sudo nautilius

KDE: in a terminal run sudo konqueror or sudo dolphin

Both of these will open a new window with the file manager and root capabilities.
User avatar
BlahBlah_X
Level 4
Level 4
 
Posts: 283
Joined: Thu Apr 05, 2007 5:27 pm
Location: Walrus Teeth

Postby whare1 on Sat May 12, 2007 7:00 am

Im running Cassandra so it will be Gnome

so I tried what you suggested and got this

Code: Select all
sudo: nautilius: command not found


Hmmm just one more thing that I managed to screw up :oops: :lol:

Thanx

Will
I've Been
Minted

Running Mint 9 KDE
Running Mint 9 Gnome
User avatar
whare1
Level 2
Level 2
 
Posts: 71
Joined: Fri May 04, 2007 6:29 am

Re: Sudo Copy

Postby scorp123 on Sat May 12, 2007 7:22 am

whare1 wrote:command for sudo to copy multiple files to a root privileged directory (usr/share/games/)
If you are running GNOME then nautilus is probably there. You can open the file manager as normal user, right? Running any GUI programs as "root" is a bad idea anyway. So instead I'd like to introduce you to some shell commands. First of all, they're sort of "universal" and secondly: GUI or no GUI, they work.

So you want to copy stuff into /usr/share/games/ ... Let's suppose you downloaded some *.mp3 files (e.g. background music for a game?) and now need to move them there ...

The command sequence would be:
Code: Select all
cd /path/to/where/the/files/where/downloaded
sudo cp *.mp3 /wherever/you/want/


If you need to copy complete sub-directories, you could do e.g. this:
Code: Select all
cd /where/the/sub-folders/are
sudo cp -R ./* /where/this/stuff/need2go/


Explanation: dot-slash " ./ " means "right here" in UNIX-shell speak. So when you type something like "cp -R ./* ....." then this means in proper English: "copy everything (= *) Recursively from right underneath here (= ./ ) to this target location."
User avatar
scorp123
Level 8
Level 8
 
Posts: 2287
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Postby whare1 on Sat May 12, 2007 7:28 am

Thanx scorp that was great :)
I've Been
Minted

Running Mint 9 KDE
Running Mint 9 Gnome
User avatar
whare1
Level 2
Level 2
 
Posts: 71
Joined: Fri May 04, 2007 6:29 am

Postby NiksaVel on Sat May 12, 2007 9:57 am

and in case you were wondering why nautilus didn't work it's because it is called nautilus, not nautilius :)

but listen to scorp he know what he's talking about :P
Windows is extremely fast after a fresh install. If you want to make it stay that way: - don't use it.
-Clem
User avatar
NiksaVel
Level 5
Level 5
 
Posts: 806
Joined: Wed Feb 28, 2007 4:06 am
Location: Croatia

Postby whare1 on Sat May 12, 2007 11:18 am

NiksaVel wrote:
but listen to scorp he know what he's talking about :P


I agree he seems to :)

Whare1 awards an invisible badge for No1 Helper to scorp123 :wink: :lol: :P
I've Been
Minted

Running Mint 9 KDE
Running Mint 9 Gnome
User avatar
whare1
Level 2
Level 2
 
Posts: 71
Joined: Fri May 04, 2007 6:29 am

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: kc1di and 34 guests