LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Copy files to /usr/share/foldername with Gnome (http://www.linuxquestions.org/questions/linux-newbie-8/copy-files-to-usr-share-foldername-with-gnome-892483/)

banuazizi 07-19-2011 07:45 AM

Copy files to /usr/share/foldername with Gnome
 
I had to copy some files from terminal to a folder in /usr/share/foldername
so I did sudo cp -r something/ /usr/share/foldername
which worked, but when I wanted to do it in Gnome, it kept saying I have no permission. How do I do it so it asks for permission, or how do I do sudo + task in Gnome ?

DennisC31 07-19-2011 07:53 AM

There are 2 good options to sync up 2 directories.

The first is cp -a <source> <destination>. This will copy everything. If you want confirmation before overwrites use cp -i -a <source> <destination>.

The second with a bit of a nuance is rsync -Pa <source directory with a trailing /> <destination directory>. rsync -Pa /source/ /destination will be the equivalent of cp -a /source/* /destination. rsync -Pa /source /destination will actually copy the folder source so that you have /destination/source.

Wow. I am confusing.

use cp -a. =)

In gnome, if you are trying to copy you should be able to drag and drop just like in windows.

Can you post ls -ld <destination> for us?

banuazizi 07-19-2011 08:23 AM

well the files are already copied, but my question was when I wanted to copy them on gnome it said permission denied. When I did it in terminal it also said the same thing until I used sudo cp ..... My question was how to copy the files in gnome like drag and drop but to drop them with sudo (ie, elevated priviledge_ so it can actually copy them. There was no popup that would ask me for the password. there was just a #permission denied# sort of thing.

http://tinypic.com/view.php?pic=2cprd5d&s=7

jdkaye 07-19-2011 09:02 AM

You can use things like gksudo or gksu to does this in gnome or kde or any other desktop environment. There are other methods as well but these were the first that came to mind.
ciao,
jdk

andrewthomas 07-19-2011 09:08 AM

Quote:

Originally Posted by banuazizi (Post 4418967)
well the files are already copied, but my question was when I wanted to copy them on gnome it said permission denied. When I did it in terminal it also said the same thing until I used sudo cp ..... My question was how to copy the files in gnome like drag and drop but to drop them with sudo (ie, elevated priviledge_ so it can actually copy them. There was no popup that would ask me for the password. there was just a #permission denied# sort of thing.

http://tinypic.com/view.php?pic=2cprd5d&s=7

try

Code:

gksudo nautilus
Then nautilus will open up with root permissions.

colucix 07-19-2011 09:08 AM

Another option is beesu. You can add an application launcher to your panel using command beesu nautilus or simply press Alt-F2 and type the same in the "Run Application" window.

DennisC31 07-21-2011 08:18 AM

Quote:

Originally Posted by andrewthomas (Post 4419006)
try

Code:

gksudo nautilus
Then nautilus will open up with root permissions.

This should work. =)


All times are GMT -5. The time now is 01:40 AM.