LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 11-14-2004, 08:05 PM   #1
tomap
Member
 
Registered: Jul 2004
Location: Southern NJ
Posts: 44

Rep: Reputation: 15
copy syntax


I have a question on the copy (cp) command. I wanted to copy a file, entered the command (correctly I believe) but it didn't happen. I eventually got it copied but had to do it in 2 steps. I hope someone can explain – either what I did wrong (wrong syntax) or the process in which I tried it.

I attempted to copy my “bookmarks” (firefox) from one computer to another. The new file resided on a vfat partition (I initially copied it there from Windows). I then tried (unsuccessfully) to copy it into the proper directory. Follows is the command:

[tom@localhost tom]$ su
Password:

[root@localhost tom]# cd /mnt/win_d

[root@localhost win_d]# ls (the file is there)

74902/ dhcp-3.0.2rc1.tar.gz* nxclient-1.4.0-75.i386.rpm*
aaa-dhcp* Downloads/ r74091/
aa-dhcp* Installguide.doc* r76521/
advisor.exe* ir/ Recycled/
bathroom/ itzfritz.doc* syntac.txt*
bookmarks.html MahJongg3D.exe* tom-dhcp1*
dellsys/ Mail/ tom-dhcp.doc*

[root@localhost win_d]# cp bookmarks.html /home/tom/.mozilla/firefox/wim3ul96.default/bookmarks.html
cp: cannot create regular file `/home/tom/.mozilla/firefox/wim3ul96.default/bookmarks.html': No such file or directory

[root@localhost win_d]#

I ended up copying it from win_d to my home directory, from there into the wimxxx.default directory – where it is functioning just fine. I'm about to copy over my mail folders (thunderbird) into the proper directory.

Will this also be a 2 step process ???

Regards,
tomap
 
Old 11-14-2004, 08:28 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
When you did a: "cp bookmarks.html /home/tom/.mozilla/firefox/wim3ul96.default/bookmarks.html"

the cp command things bookmarks.html is a directory.. You don't have to specify the name where your copying it to..

This should have worked like this:

$ cp bookmarks.html /home/tom/.mozilla/firefox/wim3ul96.default/
 
Old 11-14-2004, 08:40 PM   #3
tomap
Member
 
Registered: Jul 2004
Location: Southern NJ
Posts: 44

Original Poster
Rep: Reputation: 15
thanks for that nugget of info. You most likely saved me several hours of research.

Regards.
tomap
 
Old 11-14-2004, 08:43 PM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally posted by tomap
thanks for that nugget of info. You most likely saved me several hours of research.

Regards.
tomap
No Problem!
 
  


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
rsync syntax for local copy hoover93 Linux - Software 3 12-21-2012 03:39 AM
rsync syntax to skip directory, but copy select files.. tnicol Linux - Software 3 07-24-2007 06:40 AM
C++ syntax error before :: token HELP, i cant find the syntax error :( qwijibow Programming 2 12-14-2004 07:09 PM
how to copy and paste acd copy cd paschim Linux - General 2 04-05-2004 10:25 AM
boot error after using Copy Commander to copy debian system onto larger new drive Interceptor Linux - Hardware 7 05-04-2003 01:40 PM


All times are GMT -5. The time now is 02:13 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