LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Help on copy command (https://www.linuxquestions.org/questions/linux-software-2/help-on-copy-command-484598/)

Nishant Desai 09-18-2006 07:07 AM

Help on copy command
 
Dear All,

I am creating RAMdisk and for that after mounting the folder for the RAMdisk, i want to copy the data into that folder and for that i must have to copy the data inside my Prep folder in my root folder, now if i ll write the command "cp -a /root/Prep /mnt/ramdisk and it will copy whole the Prep folder into the /ramdisk folder, which afterwards becomes /ramdisk/Prep, which i dont want i want the data inside the /Prep folder to copy into the /ramdisk folder, which do not make /ramdisk/Prep folder, instead it makes the /ramdisk/... folder (... is the folders which are inside t he /Prep folder), and when i tried to copy these folders individually inside the /mnt/ramdisk folder, Linux didnt allow me to do so after copying 2-3 folders and give me an error, so is it any other way which leads me to copy whole the content of the folder into another folder, still does not carry parent folder, (/Prep folder) in my case.

Thanks in Advance,
Nishant Desai

pwc101 09-18-2006 07:18 AM

Have you tried appending an asterisk to the end of your cp command?
Code:

cp /root/Prep/* /mnt/ramdisk
that'll copy the content of /root/Prep to /mnt/ramdisk

Unless I've misunderstood your question which, incidentally, is very hard to understand. I appreciate English may not be your first language, in which case, please don't take offence. However, it would be easier to read if your question was not one (very) long sentence, but a series of shorter sentences. Also, separating it into a number of paragraphs would help.

Hope I got the right idea though! :)

Nishant Desai 09-19-2006 11:48 PM

Quote:

Originally Posted by pwc101
Have you tried appending an asterisk to the end of your cp command?
Code:

cp /root/Prep/* /mnt/ramdisk
that'll copy the content of /root/Prep to /mnt/ramdisk

Unless I've misunderstood your question which, incidentally, is very hard to understand. I appreciate English may not be your first language, in which case, please don't take offence. However, it would be easier to read if your question was not one (very) long sentence, but a series of shorter sentences. Also, separating it into a number of paragraphs would help.

Hope I got the right idea though! :)

Dear pwc,

Thanks for the reply first of all, and yes though my question format was so irretating you ve got the right idea, so you ve given me right answer, anyways from the next time i will try to post a question with good format, not with such an irretating one.

Thanks,
Nishant

pwc101 09-20-2006 02:50 AM

I wouldn't go so far as to say it was irritating! It was just a little difficult to understand. Anyway, it seems you got the message across, which is the most important part :) Glad to have helped.


All times are GMT -5. The time now is 03:40 AM.