Re: Linux CP command

2010-08-16 Thread Alex Dean


On Aug 13, 2010, at 7:32 AM, Shawn Badger wrote:


Mysql stores the databases in an individual folder for each database.


mysql MYISAM does that.  Innodb  other storage engines uses other  
mechanisms.

---
PLUG-discuss mailing list - 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


Re: Linux CP command

2010-08-16 Thread Matt Graham
From: Alex Dean a...@crackpot.org
 On Aug 13, 2010, at 7:32 AM, Shawn Badger wrote:
 Mysql stores the databases in an individual folder for each database.
 mysql MYISAM does that.  Innodb  other storage engines uses other  
 mechanisms.

innodb_file_per_table = 1

...will make InnoDB store one table in one file in one dir, similar to what
MyISAM does.  Downside:  More inodes used.  Upside:  Easier to back up and
restore individual InnoDB tables, but not quite as easy as it is with MyISAM
tables since you still need that ibdata1 file and you may need a couple of
ALTER TABLE commands when restoring.

I'd set that option in a new MySQL install, but that's just me.

-- 
Matt G / Dances With Crows
The Crow202 Blog:  http://crow202.org/wordpress/
There is no Darkness in Eternity/But only Light too dim for us to see

---
PLUG-discuss mailing list - 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


Re: Linux CP command

2010-08-13 Thread Michael March
I personally use 'tar' in place of 'cp' all the time:

tar cf - * | ( cd /target; tar xfp -)

On Thu, Aug 12, 2010 at 4:17 PM, keith smith klsmith2...@yahoo.com 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


-- 
admiral
---
PLUG-discuss mailing list - 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

Re: Linux CP command

2010-08-13 Thread Shawn Badger
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 br...@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 - 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 - 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 - 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

Re: Linux CP command

2010-08-13 Thread keith smith

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 badger.sh...@gmail.com wrote:

From: Shawn Badger badger.sh...@gmail.com
Subject: Re: Linux CP command
To: Main PLUG discussion list plug-discuss@lists.plug.phoenix.az.us
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 br...@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 - 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 - 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 - 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 - 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

Re: Linux CP command

2010-08-13 Thread Stephen
the problem you are running into is with file structure,

*cp /home/public_html/mylog.txt /home/public_html/backup/mylog.bak*

in that example from your page you see that it starts at / and works down.
so you would need to do something similar

cp  /var/lib/mysql/DB1/*.* to /var/lib/mysql/DB2/



On Thu, Aug 12, 2010 at 4:17 PM, keith smith klsmith2...@yahoo.com 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 - 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




-- 
A mouse trap, placed on top of your alarm clock, will prevent you from
rolling over and going back to sleep after you hit the snooze button.

Stephen
---
PLUG-discuss mailing list - 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

Re: Linux CP command

2010-08-13 Thread Stephen
yeah i forgot the -r

On Fri, Aug 13, 2010 at 7:32 AM, Shawn Badger badger.sh...@gmail.com wrote:
 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 br...@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 - 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 - 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 - 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




-- 
A mouse trap, placed on top of your alarm clock, will prevent you from
rolling over and going back to sleep after you hit the snooze button.

Stephen
---
PLUG-discuss mailing list - 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


Re: Linux CP command

2010-08-13 Thread Lisa Kachold
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 klsmith2...@yahoo.com 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 badger.sh...@gmail.com* wrote:


 From: Shawn Badger badger.sh...@gmail.com
 Subject: Re: Linux CP command
 To: Main PLUG discussion list plug-discuss@lists.plug.phoenix.az.us
 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 
 br...@snaptek.comhttp://mc/compose?to=br...@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 - 
 PLUG-discuss@lists.plug.phoenix.az.ushttp://mc/compose?to=plug-disc...@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 - 
 PLUG-discuss@lists.plug.phoenix.az.ushttp://mc/compose?to=plug-disc...@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 - 
 PLUG-discuss@lists.plug.phoenix.az.ushttp://mc/compose?to=plug-disc...@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 - 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




-- 
Office: (602)239-3392
ATT: (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 - 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

Re: Linux CP command

2010-08-13 Thread keith smith

No you all did a great job!!  Thank all of you for your suggestions!  I just 
need to play with cp some more.  It does not work the way I expect.  Probably 
those 10 years I spent on the DOS command line - my formative years :)



Keith Smith

--- On Fri, 8/13/10, Lisa Kachold lisakach...@obnosis.com wrote:

From: Lisa Kachold lisakach...@obnosis.com
Subject: Re: Linux CP command
To: Main PLUG discussion list plug-discuss@lists.plug.phoenix.az.us
Date: Friday, August 13, 2010, 11:26 AM

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 klsmith2...@yahoo.com 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 badger.sh...@gmail.com wrote:


From: Shawn Badger badger.sh...@gmail.com
Subject: Re: Linux CP command
To: Main PLUG discussion list plug-discuss@lists.plug.phoenix.az.us

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 br...@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 - 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 - 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 - 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 - 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



-- 
Office: (602)239-3392

ATT: (503)754-4452 
http://it-clowns.com
Faith is, at one and the same time, absolutely necessary and altogether 
impossible.

--Stanislav Lem
















-Inline Attachment Follows-

---
PLUG-discuss mailing list - 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 - 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

Re: Linux CP command

2010-08-13 Thread Stephen
the funny thing is i keep trying to use Linux command line functions in
windows command prompt, and swear then wish i could use it.

On Fri, Aug 13, 2010 at 2:19 PM, keith smith klsmith2...@yahoo.com wrote:


 No you all did a great job!!  Thank all of you for your suggestions!  I
 just need to play with cp some more.  It does not work the way I expect.
 Probably those 10 years I spent on the DOS command line - my formative years
 :)

 
 Keith Smith

 --- On *Fri, 8/13/10, Lisa Kachold lisakach...@obnosis.com* wrote:


 From: Lisa Kachold lisakach...@obnosis.com
 Subject: Re: Linux CP command
 To: Main PLUG discussion list plug-discuss@lists.plug.phoenix.az.us
 Date: Friday, August 13, 2010, 11:26 AM

 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.





-- 
A mouse trap, placed on top of your alarm clock, will prevent you from
rolling over and going back to sleep after you hit the snooze button.

Stephen
---
PLUG-discuss mailing list - 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

Re: Linux CP command

2010-08-13 Thread Eric Shubert

You can! Just install cygwin. Then you'll feel right at home. :)

--
-Eric 'shubes'

Stephen wrote:
the funny thing is i keep trying to use Linux command line functions in 
windows command prompt, and swear then wish i could use it.


On Fri, Aug 13, 2010 at 2:19 PM, keith smith klsmith2...@yahoo.com 
mailto:klsmith2...@yahoo.com wrote:



No you all did a great job!!  Thank all of you for your
suggestions!  I just need to play with cp some more.  It does not
work the way I expect.  Probably those 10 years I spent on the DOS
command line - my formative years :)


Keith Smith

--- On *Fri, 8/13/10, Lisa Kachold /lisakach...@obnosis.com
mailto:lisakach...@obnosis.com/* wrote:


From: Lisa Kachold lisakach...@obnosis.com
mailto:lisakach...@obnosis.com
Subject: Re: Linux CP command
To: Main PLUG discussion list
plug-discuss@lists.plug.phoenix.az.us
mailto:plug-discuss@lists.plug.phoenix.az.us
Date: Friday, August 13, 2010, 11:26 AM

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.





--
A mouse trap, placed on top of your alarm clock, will prevent you from 
rolling over and going back to sleep after you hit the snooze button.


Stephen




---
PLUG-discuss mailing list - 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


Re: Linux CP command

2010-08-13 Thread Stephen
tried it, and you have to launch a cygwin shell specifically, it was a
mess, maybe ill try again this year and see how it had advanced.

On Fri, Aug 13, 2010 at 2:44 PM, Eric Shubert e...@shubes.net wrote:
 You can! Just install cygwin. Then you'll feel right at home. :)

 --
 -Eric 'shubes'

 Stephen wrote:

 the funny thing is i keep trying to use Linux command line functions in
 windows command prompt, and swear then wish i could use it.

 On Fri, Aug 13, 2010 at 2:19 PM, keith smith klsmith2...@yahoo.com
 mailto:klsmith2...@yahoo.com wrote:


    No you all did a great job!!  Thank all of you for your
    suggestions!  I just need to play with cp some more.  It does not
    work the way I expect.  Probably those 10 years I spent on the DOS
    command line - my formative years :)

    
    Keith Smith

    --- On *Fri, 8/13/10, Lisa Kachold /lisakach...@obnosis.com
    mailto:lisakach...@obnosis.com/* wrote:


        From: Lisa Kachold lisakach...@obnosis.com
        mailto:lisakach...@obnosis.com
        Subject: Re: Linux CP command
        To: Main PLUG discussion list
        plug-discuss@lists.plug.phoenix.az.us
        mailto:plug-discuss@lists.plug.phoenix.az.us
        Date: Friday, August 13, 2010, 11:26 AM

        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.





 --
 A mouse trap, placed on top of your alarm clock, will prevent you from
 rolling over and going back to sleep after you hit the snooze button.

 Stephen



 ---
 PLUG-discuss mailing list - 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




-- 
A mouse trap, placed on top of your alarm clock, will prevent you from
rolling over and going back to sleep after you hit the snooze button.

Stephen
---
PLUG-discuss mailing list - 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


Re: Linux CP command

2010-08-13 Thread Eric Shubert
I vaguely remember something (from years ago) that would let you do 
this. How about http://openetwork.com/berk.html ?


Stephen wrote:

tried it, and you have to launch a cygwin shell specifically, it was a
mess, maybe ill try again this year and see how it had advanced.

On Fri, Aug 13, 2010 at 2:44 PM, Eric Shubert e...@shubes.net wrote:

You can! Just install cygwin. Then you'll feel right at home. :)

--
-Eric 'shubes'

Stephen wrote:

the funny thing is i keep trying to use Linux command line functions in
windows command prompt, and swear then wish i could use it.

On Fri, Aug 13, 2010 at 2:19 PM, keith smith klsmith2...@yahoo.com
mailto:klsmith2...@yahoo.com wrote:


   No you all did a great job!!  Thank all of you for your
   suggestions!  I just need to play with cp some more.  It does not
   work the way I expect.  Probably those 10 years I spent on the DOS
   command line - my formative years :)

   
   Keith Smith

   --- On *Fri, 8/13/10, Lisa Kachold /lisakach...@obnosis.com
   mailto:lisakach...@obnosis.com/* wrote:


   From: Lisa Kachold lisakach...@obnosis.com
   mailto:lisakach...@obnosis.com
   Subject: Re: Linux CP command
   To: Main PLUG discussion list
   plug-discuss@lists.plug.phoenix.az.us
   mailto:plug-discuss@lists.plug.phoenix.az.us
   Date: Friday, August 13, 2010, 11:26 AM

   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.





--
A mouse trap, placed on top of your alarm clock, will prevent you from
rolling over and going back to sleep after you hit the snooze button.

Stephen



---
PLUG-discuss mailing list - 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








--
-Eric 'shubes'

---
PLUG-discuss mailing list - 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


Linux CP command

2010-08-12 Thread keith smith

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 - 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

Re: Linux CP command

2010-08-12 Thread Carl Parrish
Use mysqldump
Ask me about free travel

-Original Message-
From: keith smith klsmith2...@yahoo.com
Sender: plug-discuss-boun...@lists.plug.phoenix.az.us
Date: Thu, 12 Aug 2010 16:17:11 
To: Main PLUG discussion listplug-discuss@lists.plug.phoenix.az.us
Reply-To: Main PLUG discussion list plug-discuss@lists.plug.phoenix.az.us
Subject: Linux CP command

---
PLUG-discuss mailing list - 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 - 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


Re: Linux CP command

2010-08-12 Thread Lisa Kachold
Hi Kevin:

On Thu, Aug 12, 2010 at 4:17 PM, keith smith klsmith2...@yahoo.com 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


Linux is exactly like a good domestic or business partner, telling you very
clearly directly and completely what an issue might be.

It it says:

cannot stat `/var/lib/mysql/baseline/*': No such file or directory

There IS not such file or directory.

Did you run a nice:

ls -al

first to determine what was there?

You can use the TAB key to autocomplete your commands, which is very useful
for linux.

It sounds like you might actually want a mysqldump and import instead?



-- 
Office: (602)239-3392
ATT: (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 - 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

Re: Linux CP command

2010-08-12 Thread Brian Cluff
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 - 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 - 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


Re: Linux CP command

2010-08-12 Thread keith smith

I used the tab complete and still not working.  



Keith Smith

--- On Thu, 8/12/10, Brian Cluff br...@snaptek.com wrote:

From: Brian Cluff br...@snaptek.com
Subject: Re: Linux CP command
To: Main PLUG discussion list plug-discuss@lists.plug.phoenix.az.us
Date: Thursday, August 12, 2010, 4:38 PM

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 - 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 - 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 - 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

Re: Linux CP command

2010-08-12 Thread keith smith

Thanks!



Keith Smith

--- On Thu, 8/12/10, Alex Dean a...@crackpot.org wrote:

From: Alex Dean a...@crackpot.org
Subject: Re: Linux CP command
To: Main PLUG discussion list plug-discuss@lists.plug.phoenix.az.us
Date: Thursday, August 12, 2010, 4:52 PM

Is mysql running when you do this copy?  You'll never get a consistent snapshot 
of your data if it is.

Either use mysqldump, or stop the server prior to doing your copies.  If you 
use mysqldump, make sure you use the options to lock the database, so you get a 
consistent dump.  If your application can't tolerate the amount of database 
unavailability which is required (either locking or from the server shutdown), 
set up a database slave and take your copies/backups from the slave.

alex

On Aug 12, 2010, at 4:38 PM, Brian Cluff 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 - 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 - 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 - 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 - 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

Re: Linux CP command

2010-08-12 Thread John
I just tried this in Ubuntu 10.04 and I couldn't navigate to the the 
/var/lib/mysql directory as non-root and the sudo cd /var/lib/mysql command 
didn't work so I just did a sudo -s and then navigated to the directory and did 
a copy like you have and it worked. As the others said though, I'd do a 
mysqldump instead.

--- On Thu, 8/12/10, keith smith klsmith2...@yahoo.com wrote:

From: keith smith klsmith2...@yahoo.com
Subject: Linux CP command
To: Main PLUG discussion list plug-discuss@lists.plug.phoenix.az.us
Date: Thursday, August 12, 2010, 6:17 PM


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


  
-Inline Attachment Follows-

---
PLUG-discuss mailing list - 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 - 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