From ce3cbad34c35aed3465a2e349eed0da1c763e920 Mon Sep 17 00:00:00 2001 From: Igor Shubovych Date: Thu, 8 May 2014 22:37:47 +0300 Subject: [PATCH 1/4] Pages: mysql --- pages/common/mysql.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 pages/common/mysql.md diff --git a/pages/common/mysql.md b/pages/common/mysql.md new file mode 100644 index 000000000..db1b2c5dc --- /dev/null +++ b/pages/common/mysql.md @@ -0,0 +1,19 @@ +# mysql + +> the MySQL command-line tool + +- Connect to database *database_name* + +`mysql {{database_name}}` + +- Connect to database *database_name* using *user* and *password* credentials. + +`mysql -u {{user}} -p{{password}} {{database_name}}` + +or + +`mysql --user={{user}} --password={{password}} {{database_name}}` + +- Execute SQL statements in a script file (batch file) + +`mysql {database_name} < script.sql` \ No newline at end of file From 888b33c3d5982ced49a64f2f47accaa40d47447c Mon Sep 17 00:00:00 2001 From: Igor Shubovych Date: Thu, 8 May 2014 23:25:52 +0300 Subject: [PATCH 2/4] Pages: locate --- pages/linux/locate.md | 11 +++++++++++ pages/osx/locate.md | 12 ++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 pages/linux/locate.md create mode 100644 pages/osx/locate.md diff --git a/pages/linux/locate.md b/pages/linux/locate.md new file mode 100644 index 000000000..b5da37878 --- /dev/null +++ b/pages/linux/locate.md @@ -0,0 +1,11 @@ +# locate + +> find filenames quickly + +- Look for pattern in the database. Note: the database is recomputed periodically (usually weekly or daily). + +`locate {{pattern}}` + +- Recompute the database. You need to do it if you want to find recently added files. + +`sudo updatedb` \ No newline at end of file diff --git a/pages/osx/locate.md b/pages/osx/locate.md new file mode 100644 index 000000000..52e8dc070 --- /dev/null +++ b/pages/osx/locate.md @@ -0,0 +1,12 @@ + +# locate + +> find filenames quickly + +- Look for pattern in the database. Note: the database is recomputed periodically (usually weekly or daily). + +`locate {{pattern}}` + +- Recompute the database. You need to do it if you want to find recently added files. + +`sudo /usr/libexec/locate.updatedb` \ No newline at end of file From 837ab109e37553bc9e254c18d499d7a7a5e8dd43 Mon Sep 17 00:00:00 2001 From: Igor Shubovych Date: Thu, 8 May 2014 23:45:56 +0300 Subject: [PATCH 3/4] Pages: cd --- pages/common/cd.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 pages/common/cd.md diff --git a/pages/common/cd.md b/pages/common/cd.md new file mode 100644 index 000000000..82c4efecf --- /dev/null +++ b/pages/common/cd.md @@ -0,0 +1,19 @@ +# cd + +> Change the current working directory + +- Go to the given directory + +`cd {{/path/to/directoryl}}` + +- Go to home directory of current user + +`cd` + +- Go up to the parent of the current directory + +`cd ..` + +- Go to the previously chosen directory + +`cd -` \ No newline at end of file From 76b344227dfbf795c5d37b21a2026b4a42bdc3e5 Mon Sep 17 00:00:00 2001 From: Romain Prieto Date: Sun, 11 May 2014 11:20:38 +1000 Subject: [PATCH 4/4] mysql: remove "or" example + fix token syntax The "or" example breaks tools that assume 1 command example per description --- pages/common/mysql.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/pages/common/mysql.md b/pages/common/mysql.md index db1b2c5dc..7170969dc 100644 --- a/pages/common/mysql.md +++ b/pages/common/mysql.md @@ -2,18 +2,14 @@ > the MySQL command-line tool -- Connect to database *database_name* +- Connect to a database `mysql {{database_name}}` -- Connect to database *database_name* using *user* and *password* credentials. +- Connect to a database using credentials `mysql -u {{user}} -p{{password}} {{database_name}}` -or - -`mysql --user={{user}} --password={{password}} {{database_name}}` - - Execute SQL statements in a script file (batch file) -`mysql {database_name} < script.sql` \ No newline at end of file +`mysql {{database_name}} < {{script.sql}}`