Results 1 to 6 of 6
Hi,
I have tried to copy a file from one directory to another but i cant as when i click properties of the folder to change permissions to allow me ...
- 04-30-2009 #1Just Joined!
- Join Date
- Apr 2009
- Posts
- 38
Command Line
Hi,
I have tried to copy a file from one directory to another but i cant as when i click properties of the folder to change permissions to allow me to copy everything is greyed out.
So i have tried to do it with the command line but dont really know what i'm doing, i started terminal and changed to root and typed this:
root@laptop://home/deejay/lhkv# cp home/deejay/lhkv/darkmatter /usr/share/amsn/plugins
cp: cannot stat `home/deejay/lhkv/darkmatter': No such file or directory
root@deejays-laptop://home/deejay/lhkv#
Where am i going wrong?
- 04-30-2009 #2
put here the output of this:
ls -l home/deejay/lhkv/
you can change the persmissions on the file like this:
sudo chmod 774 /File
or
sudo chmod -R 774 /file (to put the same thing on the directory and all the files from the directory)
- 04-30-2009 #3
if you have something in the directory you can do:
sudo cp -R home/deejay/lhkv/darkmatter /usr/share/amsn/plugins
- 04-30-2009 #4
First, if you want to do it with the file manager, nautilus, you can open it as root using gksu. Type ALT+F2 to open a run dialogue, then gksu nautilus.
From the command line
If you want to move a directory, you have to use the recursive flag cp -r or cp -a to maintain the file permissions, time stamps, etc.Code:sudo cp /path/to/file/filename /path/to/whereitsgoing
- 04-30-2009 #5
I'll let others help you with your permissions problem, but the problem I see in your command-line syntax here is your path. I see from your prompt that you are in the "/home/deejay/lhkv" directory. Your command is asking Linux to copy a file called "darkmatter" that is in the "/home/deejay/lhkv/home/deejay/lhkv/" directory. You're missing a forward slash in front of "home." Without that slash, Linux assumes you're talking about a directory inside the current one and since it doesn't exist, you get the error. A proper way to do this would be:
Code:cp /home/deejay/lhkv/darkmatter /usr/shar/amsn/plugins/darkmatter
Registered Linux user #270181
TechieMoe's Tech Rants
- 04-30-2009 #6Just Joined!
- Join Date
- Apr 2009
- Posts
- 38
your method worked flawlessly reed9 and thanx for the advice techimoe


Reply With Quote
