LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 08-13-2009, 10:58 PM   #1
SteveThePirate
Member
 
Registered: Aug 2009
Distribution: Ubuntu
Posts: 62

Rep: Reputation: 16
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?
 
Old 08-13-2009, 11:02 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
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?
 
Old 08-13-2009, 11:02 PM   #3
mobinskariya
Member
 
Registered: Sep 2007
Location: Kerala, India
Distribution: ubuntu 10.04
Posts: 367

Rep: Reputation: 55
what is the output of
Code:
pwd
anyway what is the error?
 
Old 08-13-2009, 11:06 PM   #4
SteveThePirate
Member
 
Registered: Aug 2009
Distribution: Ubuntu
Posts: 62

Original Poster
Rep: Reputation: 16
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.
 
Old 08-13-2009, 11:09 PM   #5
SteveThePirate
Member
 
Registered: Aug 2009
Distribution: Ubuntu
Posts: 62

Original Poster
Rep: Reputation: 16
actually, it is now saying that no such file or directory exists?
 
Old 08-13-2009, 11:40 PM   #6
mobinskariya
Member
 
Registered: Sep 2007
Location: Kerala, India
Distribution: ubuntu 10.04
Posts: 367

Rep: Reputation: 55
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/

Last edited by mobinskariya; 08-13-2009 at 11:41 PM.
 
Old 08-13-2009, 11:50 PM   #7
SteveThePirate
Member
 
Registered: Aug 2009
Distribution: Ubuntu
Posts: 62

Original Poster
Rep: Reputation: 16
I did not realize that you needed the / after the hi, thanks a lot!!
 
Old 08-13-2009, 11:59 PM   #8
mobinskariya
Member
 
Registered: Sep 2007
Location: Kerala, India
Distribution: ubuntu 10.04
Posts: 367

Rep: Reputation: 55
then better mark the forum as solved
 
Old 08-14-2009, 12:00 AM   #9
SteveThePirate
Member
 
Registered: Aug 2009
Distribution: Ubuntu
Posts: 62

Original Poster
Rep: Reputation: 16
how? or do I just say




SOLVED!!!!!!!!!!!
 
Old 08-14-2009, 12:02 AM   #10
mobinskariya
Member
 
Registered: Sep 2007
Location: Kerala, India
Distribution: ubuntu 10.04
Posts: 367

Rep: Reputation: 55
no..under thread tools u may find that.
 
Old 08-14-2009, 03:01 AM   #11
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Quote:
Originally Posted by SteveThePirate View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] append command output to file by giving command in terminal sumeet inani Linux - Newbie 4 07-03-2009 11:36 AM
URGENT! Is there any command to get a history command lines and time in SUSE Linux.? igsoper Linux - Software 5 06-25-2009 03:14 AM
Automatically append another piped command to issued command in bash amateen Programming 1 05-07-2009 07:36 AM
LXer: The Linux Command Shell For Beginners: Fear Not The Command Line! LXer Syndicated Linux News 0 12-22-2008 07:30 PM
Translating windows pscp command to linux scp command help robward Linux - General 2 01-17-2008 07:02 AM


All times are GMT -5. The time now is 12:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration