LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   copy syntax (https://www.linuxquestions.org/questions/linux-newbie-8/copy-syntax-254853/)

tomap 11-14-2004 07:05 PM

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

trickykid 11-14-2004 07:28 PM

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/

tomap 11-14-2004 07:40 PM

thanks for that nugget of info. You most likely saved me several hours of research.

Regards.
tomap

trickykid 11-14-2004 07:43 PM

Quote:

Originally posted by tomap
thanks for that nugget of info. You most likely saved me several hours of research.

Regards.
tomap

No Problem! ;)


All times are GMT -5. The time now is 02:18 PM.