Re: Linux CP command

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
+ (text/plain)
Delete this message
Reply to this message
Author: Lisa Kachold
Date:  
To: Main PLUG discussion list
Subject: Re: Linux CP command
Glad you got it.

sudo cp -r for directory is required; and paths can be difficult.

Sheesh, you asked us clearly, but it took 10 volleys to get you an answer.
We will have to try harder.



On Fri, Aug 13, 2010 at 7:55 AM, keith smith <> wrote:

>
> I think I tried that also. I ended up doing a dump and an import.
>
> Thank you all for your help and insight!
>
> ------------------------
> Keith Smith
>
> --- On *Fri, 8/13/10, Shawn Badger <>* wrote:
>
>
> From: Shawn Badger <>
> Subject: Re: Linux CP command
> To: "Main PLUG discussion list" <>
> Date: Friday, August 13, 2010, 7:32 AM
>
>
> Mysql stores the databases in an individual folder for each database. You
> need to use -r (recursive) option with the cp to make it work properly.
>
> Eric had the right syntext in his posting, but the trailing /. isnt'
> needed.
>
> sudo cp -r DB1 DB2
>
>
>
> On Thu, Aug 12, 2010 at 4:38 PM, Brian Cluff <<http://mc/compose?to=brian@snaptek.com>
> > wrote:
>
> sudo cp DB1/* DB2/ should have worked. The fact that it's giving you a
> file not found is a little confusing. My guess is that you have either have
> a typo in the source database folder name, or more likely you haven't taken
> into account that Linux file systems are case sensitive.
>
> Brian Cluff
>
>
> On 08/12/2010 04:17 PM, keith smith wrote:
>
>
> Hi,
>
> For some reason I just don't get the cp command. Maybe it is the deep
> rooted MS DOS from the 80's and 90's. I spent about a decade using MS DOS.
>
> Here is what is going on. I am in a CentOS box and do not ever become
> root. I use sudo.
>
> I want to copy one MySql DB to another so I can use the data for testing.
>
> 1) I cd to /var/lib/mysql
> 2) I can see both DB's
> 3) I issue any number of commands that do not work.
>
> Lets say DB1 is the source directory & DB2 is the destination directory
>
> mysql]$ sudo cp DB1/*.* DB2/ Results: cp: cannot stat `DB1/*.*': No such
> file or directory
>
> mysql]$ sudo cp DB1/* DB2/ Results: cp: cannot stat `DB1/*': No such
> file or directory
>
> mysql]$ sudo cp DB1/ DB2/ Results: creates the directory DB1 under DB2
> and copies all the files into DB2/DB1
>
> mysql]$ sudo cp DB1 DB2/ Results: does not seem to do anything.
>
> http://www.computerhope.com/unix/ucp.htm shows this example: cp -r
> /home/hope/files/* /home/hope/backup
>
> mysql]$ sudo cp -r /var/lib/mysql/DB1/* /var/lib/mysql/DB2 - cp: cannot
> stat `/var/lib/mysql/baseline/*': No such file or directory
>
> This is driving me crazy. Any help much appreciated!
>
> ------------------------
> Keith Smith
>
>
>
>
> ---------------------------------------------------
> PLUG-discuss mailing list - <http://mc/compose?to=PLUG-discuss@lists.plug.phoenix.az.us>
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>
>
> ---------------------------------------------------
> PLUG-discuss mailing list - <http://mc/compose?to=PLUG-discuss@lists.plug.phoenix.az.us>
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>
>
>
> -----Inline Attachment Follows-----
>
>
> ---------------------------------------------------
> PLUG-discuss mailing list - <http://mc/compose?to=PLUG-discuss@lists.plug.phoenix.az.us>
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>
>
>
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>




--
Office: (602)239-3392
AT&T: (503)754-4452
http://it-clowns.com <http://it-clowns.com/wiki/index.php?title=Obnosis>
"Faith is, at one and the same time, absolutely necessary and altogether
impossible. "
--Stanislav Lem
---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss