LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   the cp command (https://www.linuxquestions.org/questions/linux-newbie-8/the-cp-command-747433/)

SteveThePirate 08-13-2009 09:58 PM

the cp command
 
I have a folder named hi on my desktop

and i have a text file named howdy.rtf on my desktop

i am typing the command cp howdy.rtf /home/username/Desktop/hi where username is my username and it wont copy. What gives?

pixellany 08-13-2009 10:02 PM

What error message does it give you?

I assume that the file exists in the directory where you are issuing that command.

Are the permissions set correctly for the destination directory?

Can you make a local copy where the file is?

mobinskariya 08-13-2009 10:02 PM

what is the output of
Code:

pwd
anyway what is the error?

SteveThePirate 08-13-2009 10:06 PM

The directory exists and I don't need my root password to get in to the file and copy anything if i just copy and paste. It does not output and error which is what is confusing me even more. I am unsure of what step to take next.

SteveThePirate 08-13-2009 10:09 PM

actually, it is now saying that no such file or directory exists?

mobinskariya 08-13-2009 10:40 PM

does the error look like this

Code:

cp: cannot stat `howdy.rtf': No such file or directory
then please be sure that your present working directory is ~/Desktop
this command works fine for me
Code:

~$ cp Desktop/howdy.rtf /home/mobin/Desktop/hi/

SteveThePirate 08-13-2009 10:50 PM

I did not realize that you needed the / after the hi, thanks a lot!! :)

mobinskariya 08-13-2009 10:59 PM

then better mark the forum as solved:)

SteveThePirate 08-13-2009 11:00 PM

how? or do I just say




SOLVED!!!!!!!!!!!

mobinskariya 08-13-2009 11:02 PM

no..under thread tools u may find that.

catkin 08-14-2009 02:01 AM

Quote:

Originally Posted by SteveThePirate (Post 3642726)
I did not realize that you needed the / after the hi, thanks a lot!! :)

You don't need it if hi is an existing directory.


All times are GMT -5. The time now is 04:31 PM.