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 diff --git a/pages/common/mysql.md b/pages/common/mysql.md new file mode 100644 index 000000000..7170969dc --- /dev/null +++ b/pages/common/mysql.md @@ -0,0 +1,15 @@ +# mysql + +> the MySQL command-line tool + +- Connect to a database + +`mysql {{database_name}}` + +- Connect to a database using credentials + +`mysql -u {{user}} -p{{password}} {{database_name}}` + +- Execute SQL statements in a script file (batch file) + +`mysql {{database_name}} < {{script.sql}}` 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