Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 ?
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.
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.
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
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.