Sudo Copy

Quick to answer questions about finding your way around Linux Mint as a new user.
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. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
whare1
Level 2
Level 2
Posts: 70
Joined: Fri May 04, 2007 6:29 am

Sudo Copy

Post by whare1 »

Just a quick one guys/gals

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

Thanx
Will
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
I've Been
Minted

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

Post by whare1 »

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
scorp123
Level 8
Level 8
Posts: 2272
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Re: Sudo Copy

Post by scorp123 »

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
whare1
Level 2
Level 2
Posts: 70
Joined: Fri May 04, 2007 6:29 am

Post by whare1 »

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

Running Mint 9 KDE
Running Mint 9 Gnome
NiksaVel
Level 5
Level 5
Posts: 782
Joined: Wed Feb 28, 2007 4:06 am
Location: Croatia
Contact:

Post by NiksaVel »

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
whare1
Level 2
Level 2
Posts: 70
Joined: Fri May 04, 2007 6:29 am

Post by whare1 »

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
Locked

Return to “Beginner Questions”