From b38e272b47e1bcf12232f2a78109d34210da4f89 Mon Sep 17 00:00:00 2001 From: Igor Shubovych Date: Wed, 23 Dec 2015 18:16:11 +0200 Subject: [PATCH 01/78] uname -a --- pages/common/uname.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/common/uname.md b/pages/common/uname.md index 4fe43c359f..a4773de8da 100644 --- a/pages/common/uname.md +++ b/pages/common/uname.md @@ -14,3 +14,7 @@ - Print the nodename (hostname) of the system `uname -n` + +- Print all available system information (hardware, software, nodename) + +`uname -a` From 1c82ae15f60248fa430b0c64e91b4f7dda52cce2 Mon Sep 17 00:00:00 2001 From: Eliot Sykes Date: Mon, 28 Dec 2015 18:00:06 +0000 Subject: [PATCH 02/78] git branch -a lists all branches --- pages/common/git-branch.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pages/common/git-branch.md b/pages/common/git-branch.md index f44573bb5a..14f9b07d0b 100644 --- a/pages/common/git-branch.md +++ b/pages/common/git-branch.md @@ -2,10 +2,14 @@ > Main command for working with branches -- List all existing branches +- List local branches. The current branch is highlighted by `*`. `git branch` +- List all local and remote branches + +`git branch -a` + - Create new branch based on current branch `git branch {{BRANCH-NAME}}` From 2038fc0f13c33a985501095163f5486e332d81bd Mon Sep 17 00:00:00 2001 From: Eliot Sykes Date: Mon, 28 Dec 2015 18:06:08 +0000 Subject: [PATCH 03/78] find -path option --- pages/common/find.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/common/find.md b/pages/common/find.md index a3ac88adcf..7abc644a7b 100644 --- a/pages/common/find.md +++ b/pages/common/find.md @@ -6,6 +6,10 @@ `find {{root_path}} -name {{'*.py'}}` +- find files matching path pattern + +`find {{root_path}} -path {{'**/lib/**/*.py'}}` + - run a command for each file, use {} within the command to access the filename `find {{root_path}} -name {{'*.py'}} -exec {{wc -l {} }}\;` From 6ac40a5b1a902d0c610413d7b6a4ebcd63726092 Mon Sep 17 00:00:00 2001 From: Michael Bemmerl Date: Mon, 28 Dec 2015 22:01:39 +0100 Subject: [PATCH 04/78] Add page for 'tac'. --- pages/common/tac.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 pages/common/tac.md diff --git a/pages/common/tac.md b/pages/common/tac.md new file mode 100644 index 0000000000..b89ebca45f --- /dev/null +++ b/pages/common/tac.md @@ -0,0 +1,11 @@ +# tac + +> Print and concatenate files in reverse. + +- Print the contents of *file1* reversed to the standard output + +`tac {{file1}}` + +- Concatenate several files reversed into the target file. + +`tac {{file1}} {{file2}} > {{target-file}}` From 395e8eaa54f73e652d0d408f8babf7cd7c85248b Mon Sep 17 00:00:00 2001 From: Jose Ricardo Ziviani Date: Mon, 28 Dec 2015 11:32:49 -0200 Subject: [PATCH 05/78] Add a new page about the printf command - printf is a bash command that acts like C's printf, supporting format strings and modifiers. Signed-off-by: Jose Ricardo Ziviani --- pages/common/printf.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 pages/common/printf.md diff --git a/pages/common/printf.md b/pages/common/printf.md new file mode 100644 index 0000000000..a3dc7efa2c --- /dev/null +++ b/pages/common/printf.md @@ -0,0 +1,23 @@ +# printf + +> Format and print text + +- Print a text message + +`printf {{"%s\n"}} {{"Hello world"}}` + +- Print an integer in bold blue + +`printf {{"\e[1;34m%.3d\e[0m\n"}} {{42}}` + +- Print a float number with the unicode Euro sign + +`printf {{"\u20AC %.2f\n"}} {{123.4}}` + +- Print a text message composed with environment variables + +`printf {{"var1: %s\tvar2: %s\n"}} {{"$VAR1"}} {{"$VAR2"}}` + +- Store a formatted message in a variable (does not work on zsh) + +`printf -v {{myvar}} {{"This is %s = %d\n" "a year" 2016}}` From 76f94dfac2886fefb7d37072229ce4ade96b8a8f Mon Sep 17 00:00:00 2001 From: Igor Shubovych Date: Tue, 29 Dec 2015 02:36:49 +0200 Subject: [PATCH 06/78] Improve Contributing Guidelines: - mention feature branches - have detailed workflow to work with pull requests - move it to the bottom - add link to license - some minor fixes --- CONTRIBUTING.md | 88 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 78 insertions(+), 10 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a64e1c24a3..0f7a1de0e6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,15 +1,8 @@ # Contributing -- Your favourite command isn't covered? -- You can think of more examples? - Contribution are most welcome! All `tldr` pages are stored in Markdown right here on GitHub. Just open an issue or send a pull request and we'll merge it as soon as possible. -*Note: when submitting a new command, don't forget to check if there's already a pull request in progress.* - -## Setup - -When setting up a brand new fork, run `make setup` to install the git pre-commit hook that will check errors in your changes with Markdown linter. +*Note*: when submitting a new command, don't forget to check if there's already a pull request in progress. ## Guidelines @@ -48,8 +41,83 @@ User-provided values should use the `{{token}}` syntax, to allow clients to high One of the reasons for this format is that it's well suited for command-line clients that need to extract a single description/example. ---------------------------------------- +## Submitting a pull request -**Footnote:** tldr is under MIT license. +TL;DR: fork, `make setup`, feature branch, commit, push, pull request. + +Detailed explanation: + +1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork, + and configure the remotes: + + ```bash + # Clone your fork of the repo into the current directory + git clone https://github.com//tldr + # Navigate to the newly cloned directory + cd tldr + # Assign the original repo to a remote called "upstream" + git remote add upstream https://github.com/tldr-pages/tldr + ``` + +2. Setup Ruby, Rubygems, bundler, Git pre-commit hooks with Markdown linter. + + ```bash + # Assuming Ruby is set up + # Install bundler Ruby gem + gem install bundler + make setup + ``` + +3. If you cloned a while ago, get the latest changes from upstream: + + ```bash + git checkout master + git pull upstream master + ``` + +4. Create a new topic branch (sometimes they are called feature branches) off + the main project development branch: + + ```bash + git checkout -b + ``` + +5. Run `make lint` to check that your page(s) are correct. + +6. Please use the following commit message format: + `: type of change`. + + Examples: + + - `ls: add page` + - `cat: fix typo` + - `git-push: add --force example` + - `uname: fix -a example` + +7. Push your topic branch up to your fork: + + ```bash + git push origin + ``` + +8. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) + with a clear title and description. + +9. Use Git's + [interactive rebase](https://help.github.com/articles/interactive-rebase) + feature to tidy up your commits before making them public. + In most cases it is better to squash commits before submitting a pull request. + +10. If you are asked to amend your changes before they can be merged in, please + use `git commit --amend` and force push to your remote feature branch. + You may also be asked to squash commits. + + +## Licensing + +`tldr` is under [MIT license](https://github.com/tldr-pages/tldr/blob/master/LICENSE.md). + +**IMPORTANT**: By submitting a patch, you agree to license your work under the +same license as that used by the project. You're free to modify or redistribute the content. That being said, but why not contribute over here? :) Say if you wanted to have `tldr` pages in `groff` format, why not have a client that uses [pandoc](http://johnmacfarlane.net/pandoc/) and periodically updates straight from this repo? From d143af0cbb04c4b10730c1abd3817f91f74b7d32 Mon Sep 17 00:00:00 2001 From: snollygolly Date: Mon, 28 Dec 2015 21:20:38 -0600 Subject: [PATCH 07/78] added kill detached screen command --- pages/common/screen.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/common/screen.md b/pages/common/screen.md index 6875b9af22..115daebeca 100644 --- a/pages/common/screen.md +++ b/pages/common/screen.md @@ -21,3 +21,7 @@ - Detach from inside a screen `ctrl+A D` + +- Kill a detached screen + +`screen -X -S {{screen id}} quit` From 9b421535ddffcafc00246bc0a683b04f39c25f65 Mon Sep 17 00:00:00 2001 From: William Date: Sun, 27 Dec 2015 17:58:53 +0800 Subject: [PATCH 08/78] add dd.md for osx and linux --- pages/linux/dd.md | 19 +++++++++++++++++++ pages/osx/dd.md | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 pages/linux/dd.md create mode 100644 pages/osx/dd.md diff --git a/pages/linux/dd.md b/pages/linux/dd.md new file mode 100644 index 0000000000..6b749df290 --- /dev/null +++ b/pages/linux/dd.md @@ -0,0 +1,19 @@ +# dd + +> convert and copy a file + +- Make a bootable usb drive from an isohybrid file (such like archlinux-xxx.iso) + +`dd if={{file.iso}} of=/dev/{{usb_drive}}` + +- Clone a drive to another drive with 4MB block and ignore error + +`dd if=/dev/{{source_drive}} of=/dev/{{dest_drive}} bs=4M conv=noerror` + +- Generating a file of 100 random bytes by using kernel random driver + +`dd if=/dev/urandom of={{random_file}} bs=100 count=1` + +- Benchmark the write performance of a disk + +`dd if=/dev/zero of={{file_1GB}} bs=1024 count=1000000` diff --git a/pages/osx/dd.md b/pages/osx/dd.md new file mode 100644 index 0000000000..edc6410c60 --- /dev/null +++ b/pages/osx/dd.md @@ -0,0 +1,19 @@ +# dd + +> convert and copy a file + +- Make a bootable usb drive from an isohybrid file (such like archlinux-xxx.iso) + +`dd if={{file.iso}} of=/dev/{{usb_drive}}` + +- Clone a drive to another drive with 4MB block and ignore error + +`dd if=/dev/{{source_drive}} of=/dev/{{dest_drive}} bs=4m conv=noerror` + +- Generating a file of 100 random bytes by using kernel random driver + +`dd if=/dev/urandom of={{random_file}} bs=100 count=1` + +- Benchmark the write performance of a disk + +`dd if=/dev/zero of={{file_1GB}} bs=1024 count=1000000` From c431dffe85f176e4ca9e6ba796e5a419bfadbf77 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Tue, 29 Dec 2015 10:11:10 +0800 Subject: [PATCH 09/78] Fix file format for cp command. ref: #402 Signed-off-by: Bo-Yi Wu --- pages/common/cp.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/pages/common/cp.md b/pages/common/cp.md index 789a371a51..f60ea70d73 100644 --- a/pages/common/cp.md +++ b/pages/common/cp.md @@ -8,14 +8,20 @@ - Copy a file to a parent directory -`cp {{/path/to/original}} ../{{/path/to/copy}}` +`cp {{/path/to/original}} ../{{path/to/copy}}` -- Copy directories recursive using the option -r. Optionally showing files as they are copied. +- Copy directories recursive using the option -r `cp -r {{/path/to/original}} {{/path/to/copy}}` + +- Show files as they are copied + `cp -vr {{/path/to/original}} {{/path/to/copy}}` -- Make a copy of a file adding and extension or changing an extension +- Make a copy of a file, adding an extension -`cp {{file.html}}\{,.backup\}` -`cp file.\{html,backup\}` +`cp {{file.html}}{,.backup}` + +- Make a copy of a file, changing the extension + +`cp {{file.}}{html,backup}` From 6b906eae18f9e1f8e5133f2628fa4b63d9d134a1 Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Tue, 29 Dec 2015 09:25:39 +0100 Subject: [PATCH 10/78] Make tar page consistent It might confuse users if everything has no dash in front but the last command does. tar doesn't need the dash so let's keep it that way. --- pages/common/tar.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/tar.md b/pages/common/tar.md index f9cb7717f1..56271dbf48 100644 --- a/pages/common/tar.md +++ b/pages/common/tar.md @@ -29,4 +29,4 @@ - list the contents of a tar file -`tar -tvf {{source.tar}}` +`tar tvf {{source.tar}}` From 0492cadd23aa7258f0799b4d2e130705a66eaac0 Mon Sep 17 00:00:00 2001 From: Nikhil Sonti Date: Mon, 28 Dec 2015 19:49:50 +0530 Subject: [PATCH 11/78] ifconfig.md: Adding ifconfig command --- pages/common/ifconfig.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 pages/common/ifconfig.md diff --git a/pages/common/ifconfig.md b/pages/common/ifconfig.md new file mode 100644 index 0000000000..e4a0563f35 --- /dev/null +++ b/pages/common/ifconfig.md @@ -0,0 +1,23 @@ +# ifconfig + +> ifconfig - Interface Configurator, used to configure network interfaces. + +- View network settings of an ethernet adapter. + +`ifconfig eth0` + +- Display details of all interfaces, including disabled interfaces. + +`ifconfig -a` + +- Disable eth0 interface. + +`ifconfig eth0 down` + +- Enable eth0 interface. + +`ifconfig eth0 up` + +- Assign IP address to eth0 interface. + +`ifconfig eth0 {{ip_address}}` From 8528cbb0d55e8566e1d3bb0afdc8a42a68b85290 Mon Sep 17 00:00:00 2001 From: Alberto Date: Tue, 29 Dec 2015 12:20:11 +0100 Subject: [PATCH 12/78] Added command 'pacman -Qe' Hey there, I took the liberty to add the command `pacman -Qe` for listing all and only the explicitly installed packages (`-e` option), still showing versions. Useful when you want a concise list of the packages you have without all the dependencies. --- pages/linux/pacman.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/linux/pacman.md b/pages/linux/pacman.md index c130d9b304..8d32c0e577 100644 --- a/pages/linux/pacman.md +++ b/pages/linux/pacman.md @@ -21,3 +21,7 @@ - list installed packages and versions `pacman -Q` + +- list only the explicitly installed packages and versions + +`pacman -Qe` From e6433eb8b7785ff77dbabcff9ec9d861630f1316 Mon Sep 17 00:00:00 2001 From: Ha Duy Trung Date: Tue, 29 Dec 2015 20:43:20 +0800 Subject: [PATCH 13/78] Add Android client Just published to Google Play, download link will only be available in a few hours. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1a7734d8ef..18a11aee5b 100644 --- a/README.md +++ b/README.md @@ -47,8 +47,10 @@ You can access these pages on your computer using one of the following clients: or [platform binaries](https://github.com/pranavraja/tldr/releases) - [Elixir client](https://github.com/tldr-pages/tldr_elixir_client): binaries available soon - [C++ client](https://github.com/tldr-pages/tldr-cpp-client): `brew tap tldr-pages/tldr && brew install tldr` -- [Android client](https://github.com/gianasista/tldr-viewer): available on +- Android client: + - [tldr-viewer](https://github.com/gianasista/tldr-viewer), available on [Google Play](https://play.google.com/store/apps/details?id=de.gianasista.tldr_viewer) + - [tldroid](https://github.com/hidroh/tldroid), available on [Google Play](https://play.google.com/store/apps/details?id=io.github.hidroh.tldroid) - [Ruby client](https://github.com/YellowApple/tldrb): `gem install tldrb` - [R client](https://github.com/kirillseva/tldrrr): `devtools::install_github('kirillseva/tldrrr')` - [Web client](https://github.com/ostera/tldr.js): try tldr on your browser From b48497fdeeab0304480d79451d52820bce36a834 Mon Sep 17 00:00:00 2001 From: Matthew Wo <9029537@gmail.com> Date: Mon, 28 Dec 2015 16:34:45 -0800 Subject: [PATCH 14/78] added fast scan for nmap --- pages/common/nmap.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pages/common/nmap.md b/pages/common/nmap.md index 95986bf393..a8861f0d47 100644 --- a/pages/common/nmap.md +++ b/pages/common/nmap.md @@ -9,3 +9,11 @@ - discover hosts in the 192.168.0.X area (no port scan) `nmap -sn {{192.168.0.1/24}}` + +- faster scan of a single host (scans for common ports) + +`nmap -F {{192.168.0.1}}` + +- faster scan of a subnet (scans for common ports) + +`nmap -F {{192.168.0.1/24}}` From 84b8d1ce7e84e42b6bee90120097947d181fb797 Mon Sep 17 00:00:00 2001 From: Nikhil Sonti Date: Tue, 29 Dec 2015 10:32:32 +0530 Subject: [PATCH 15/78] nice.md: Adding nice command --- pages/common/nice.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 pages/common/nice.md diff --git a/pages/common/nice.md b/pages/common/nice.md new file mode 100644 index 0000000000..77f1dc482c --- /dev/null +++ b/pages/common/nice.md @@ -0,0 +1,8 @@ +# nice + +> Execute a program with a custom scheduling priority (niceness). +> Niceness values range from -20 (the highest priority) to 19 (the lowest). + +- Launch a program with altered priority. + +`nice -n {{niceness_value}} {{command}}` From ba981e750eb7645c6c75683ce20051c35e29df50 Mon Sep 17 00:00:00 2001 From: Igor Shubovych Date: Tue, 29 Dec 2015 17:28:19 +0200 Subject: [PATCH 16/78] Remove .lgtm integration for now --- .lgtm | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 .lgtm diff --git a/.lgtm b/.lgtm deleted file mode 100644 index bc39c47fcb..0000000000 --- a/.lgtm +++ /dev/null @@ -1,2 +0,0 @@ -approvals = 2 -pattern = "(?i):shipit:|:\\+1:|LGTM|:ok_hand:" From 735588e0a111e4097f2912dca407410005cbee99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20D=C3=B6ring?= Date: Tue, 29 Dec 2015 16:50:01 +0100 Subject: [PATCH 17/78] Added common/phpunit.md page and examples. --- pages/common/phpunit.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 pages/common/phpunit.md diff --git a/pages/common/phpunit.md b/pages/common/phpunit.md new file mode 100644 index 0000000000..d4f7b49524 --- /dev/null +++ b/pages/common/phpunit.md @@ -0,0 +1,19 @@ +# phpunit + +> PHPUnit command-line test runner + +- Run tests in the current direcotry. Note: Expects you to have a 'phpunit.xml' + +`phpunit` + +- Run tests in a specific file. + +`phpunit {{path/to/TestFile.php}}` + +- Run tests annotated with the given group. + +`phpunit --group {{name}}` + +- Run tests and generate a coverage report in HTML. + +`phpunit --coverage-html {{directory}}` From 4a7ece70ace8f986b20cd31fbcc53c1f46e43489 Mon Sep 17 00:00:00 2001 From: Alex Flores Date: Mon, 28 Dec 2015 23:13:19 -0500 Subject: [PATCH 18/78] adds useful commands to tree --- pages/common/tree.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pages/common/tree.md b/pages/common/tree.md index b68ec4e6de..8faee5af75 100644 --- a/pages/common/tree.md +++ b/pages/common/tree.md @@ -17,3 +17,11 @@ - Print human readable size of files `tree -h` + +- Print the full path for each file + +`tree -f` + +- Print the tree without lines and indentation. Useful when used with -f + +`tree -i` From 3b6153bf96b4bf0eaa9e1385d6257a1cb8c2e252 Mon Sep 17 00:00:00 2001 From: Kang Jinwon Date: Wed, 30 Dec 2015 01:40:29 +0900 Subject: [PATCH 19/78] Update rsync.md --- pages/common/rsync.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/common/rsync.md b/pages/common/rsync.md index 5c21814180..ed29e8e494 100644 --- a/pages/common/rsync.md +++ b/pages/common/rsync.md @@ -20,6 +20,10 @@ `rsync -r mike@devbox:~/projects/cakeStore /Users/mike/devProjects/` +- transfer only updated files from remote host + +`rsync -ru mike@devbox:~/projects/ ./projects/` + - transfer file over SSH and show progress `rsync -e ssh --progress {{remote_host_name}}:{{remote_file}} {{local_file}}` From 459771a45a171897d4378b2e916cb0746eacb2fc Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Mon, 28 Dec 2015 14:04:58 +0100 Subject: [PATCH 20/78] add comm command --- pages/common/comm.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 pages/common/comm.md diff --git a/pages/common/comm.md b/pages/common/comm.md new file mode 100644 index 0000000000..1244d4bece --- /dev/null +++ b/pages/common/comm.md @@ -0,0 +1,23 @@ +# comm + +> Select or reject lines common to two files. Both files must be sorted. + +- Produce three tab-separated columns: lines only in first file, lines only in second file and common lines. + +`comm {{file1}} {{file2}}` + +- Print only lines common to both files. + +`comm -12 {{file1}} {{file2}}` + +- Print only lines common to both files, read one file from stdin. + +`cat {{file1}} | comm -12 - {{file2}}` + +- Print lines only found in first file. + +`comm -23 {{file1}} {{file2}}` + +- Print lines only found in second file. + +`comm -13 {{file1}} {{file2}}` From 125768b56ae016f099efa152930060789f077bdf Mon Sep 17 00:00:00 2001 From: Tony Marjakangas Date: Tue, 29 Dec 2015 21:31:19 +0100 Subject: [PATCH 21/78] Fixed typo in gzip.md --- pages/common/gzip.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/gzip.md b/pages/common/gzip.md index 5601641085..cd629978a3 100644 --- a/pages/common/gzip.md +++ b/pages/common/gzip.md @@ -6,7 +6,7 @@ `gzip {{file.ext}}` -- decompress a file, replacing it with the original uncomrpessed version +- decompress a file, replacing it with the original uncompressed version `gzip -d {{file.ext.gz}}` From c1c584fa7c00becb1331d4e7d25fd0a7df8dcfd8 Mon Sep 17 00:00:00 2001 From: Igor Shubovych Date: Wed, 30 Dec 2015 00:08:41 +0200 Subject: [PATCH 22/78] Add prerequisites task to Makefile which warns about installation of Ruby and bundler --- Makefile | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 4863bf043d..8a506acbdb 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,5 @@ default: lint -all: setup index - index: @echo "WARNING!" @echo "Index rebuilding is deprecated." @@ -10,7 +8,18 @@ index: @TLDRHOME=`pwd` ./scripts/build_index.rb @echo "Index rebuilt." -setup: hooks deps +setup: prerequisites hooks deps + +prerequisites: + @echo + @echo "IMPORTANT!" + @echo "Before setting up hooks, make sure you have read Contributing Guidelines" + @echo "https://github.com/tldr-pages/tldr/blob/master/CONTRIBUTING.md#submitting-a-pull-request" + @echo + @echo "TL;DR:" + @echo "1. Install Ruby suitable for your system" + @echo "2. Run 'gem install bundler'" + @echo hooks: @cp ./scripts/pre-commit .git/hooks @@ -24,4 +33,4 @@ deps: lint: @bundle exec mdl --style ./scripts/markdown-style.rb pages -.PHONY: default index setup hooks deps lint +.PHONY: default index setup prerequisites hooks deps lint From e5a0e5cf00b5b78ac32e288fd899d79100356182 Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Tue, 29 Dec 2015 23:34:26 +0000 Subject: [PATCH 23/78] adjust whitespace for source readability --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 18a11aee5b..d4da1a55b0 100644 --- a/README.md +++ b/README.md @@ -49,8 +49,9 @@ You can access these pages on your computer using one of the following clients: - [C++ client](https://github.com/tldr-pages/tldr-cpp-client): `brew tap tldr-pages/tldr && brew install tldr` - Android client: - [tldr-viewer](https://github.com/gianasista/tldr-viewer), available on - [Google Play](https://play.google.com/store/apps/details?id=de.gianasista.tldr_viewer) - - [tldroid](https://github.com/hidroh/tldroid), available on [Google Play](https://play.google.com/store/apps/details?id=io.github.hidroh.tldroid) + [Google Play](https://play.google.com/store/apps/details?id=de.gianasista.tldr_viewer) + - [tldroid](https://github.com/hidroh/tldroid), available on + [Google Play](https://play.google.com/store/apps/details?id=io.github.hidroh.tldroid) - [Ruby client](https://github.com/YellowApple/tldrb): `gem install tldrb` - [R client](https://github.com/kirillseva/tldrrr): `devtools::install_github('kirillseva/tldrrr')` - [Web client](https://github.com/ostera/tldr.js): try tldr on your browser From 4ddaf350f25be1fc2be72e4281b9ffc262b1a666 Mon Sep 17 00:00:00 2001 From: Robbie S Date: Tue, 29 Dec 2015 15:43:46 -0800 Subject: [PATCH 24/78] Fixed open.md --- pages/osx/open.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pages/osx/open.md b/pages/osx/open.md index 225d977292..09c25db2eb 100644 --- a/pages/osx/open.md +++ b/pages/osx/open.md @@ -4,11 +4,11 @@ - Open a file with the associated application -`open filename.ext` +`open {{file.ext}}` - Run a graphical MacOSX application -`open /Applications/iTunes.app` +`open /Applications/{{Application.app}}` - Open the current directory in Finder @@ -16,8 +16,8 @@ - Reveal a file in finder -`open -R /path/dir/file` +`open -R /path/dir/{{file}}` -- Open all the word docs in the current directory with Microsoft Word +- Open all the files of a given extension in the current directory with the associated application -`open *.doc` +`open {{*.ext}}` From ea1c76213a0a3325ad947f10aaf7f189391ae389 Mon Sep 17 00:00:00 2001 From: Chuancong Gao Date: Tue, 29 Dec 2015 19:41:32 -0800 Subject: [PATCH 25/78] paste: add page --- pages/common/paste.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 pages/common/paste.md diff --git a/pages/common/paste.md b/pages/common/paste.md new file mode 100644 index 0000000000..6dd8944f25 --- /dev/null +++ b/pages/common/paste.md @@ -0,0 +1,23 @@ +# paste + +> Merge lines of files. + +- join all the lines into a single line, using TAB as delimiter. + +`paste -s {{file}}` + +- join all the lines into a single line, using the specified delimiter. + +`paste -s -d {{delimiter}} {{file}}` + +- merge two files side by side, each in its column, using TAB as delimiter. + +`paste {{file1}} {{file2}}` + +- merge two files side by side, each in its column, using the specified delimiter. + +`paste -d {{delimiter}} {{file1}} {{file2}}` + +- merge two files, with lines added alternatively. + +`paste -d '\n' {{file1}} {{file2}}` From 39df861585ee056ae092e65bbdac2143a04e97d3 Mon Sep 17 00:00:00 2001 From: John Kleint Date: Tue, 29 Dec 2015 23:55:04 -0500 Subject: [PATCH 26/78] Add GNU Parallel --- pages/common/parallel.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 pages/common/parallel.md diff --git a/pages/common/parallel.md b/pages/common/parallel.md new file mode 100644 index 0000000000..1338b8451c --- /dev/null +++ b/pages/common/parallel.md @@ -0,0 +1,27 @@ +# GNU Parallel + +> Run commands on multiple CPU cores + +- gzip several files at once, using all cores + +`parallel gzip ::: {{file1}} {{file2}} {{file3}}` + +- read arguments from stdin, run 4 jobs at once + +`ls *.txt | parallel -j4 gzip` + +- Convert JPG images to PNG using replacement strings + +`parallel convert {} {.}.png ::: *.jpg` + +- parallel xargs, cram as many args as possible onto one command + +`{{args}} | parallel -X {{command}}` + +- break stdin into ~1M blocks, feed each block to stdin of new command + +`cat {{bigfile.txt}} | parallel --pipe --block 1M {{command}}` + +- run on multiple machines via SSH + +`parallel -S {{machine1}},{{machine2}} {{command}} ::: {{arg1}} {{arg2}}` From c21cba979b4a0c4321250cece3f2bdaeedb22f2e Mon Sep 17 00:00:00 2001 From: Christopher Doege Date: Tue, 29 Dec 2015 17:23:34 -0600 Subject: [PATCH 27/78] Added dnf and yum to linux. Fixed wording. Small grammar change. Fixed capitalization. Fixed line spacing. --- pages/linux/dnf.md | 24 ++++++++++++++++++++++++ pages/linux/yum.md | 24 ++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 pages/linux/dnf.md create mode 100644 pages/linux/yum.md diff --git a/pages/linux/dnf.md b/pages/linux/dnf.md new file mode 100644 index 0000000000..8cbf4cd4d4 --- /dev/null +++ b/pages/linux/dnf.md @@ -0,0 +1,24 @@ +# dnf + +>Package management utility for RHEL, Feodra, and CentOS (replaces yum) + +- Synchronize list of packages and versions available. This should be run first, before running subsequent dnf commands. + +`dnf update` + +- Install a new package + +`dnf install {{package}}` + +- Install a new package and assume yes to all questions + +`dnf -y install {{package}}` + +- Remove a package + +`dnf remove {{package}}` + +- Upgrade installed packages to newest available versions + +`dnf upgrade` + diff --git a/pages/linux/yum.md b/pages/linux/yum.md new file mode 100644 index 0000000000..aba0440b39 --- /dev/null +++ b/pages/linux/yum.md @@ -0,0 +1,24 @@ +# yum + +>Package management utility for RHEL, Feodra, and CentOS (for older versions) + +- Synchronize list of packages and versions available. This should be run first, before running subsequent yum commands. + +`yum update` + +- Install a new package + +`yum install {{package}}` + +- Install a new package and assume yes to all questions (Also works with update, great for automated updates) + +`yum -y install {{package}}` + +- Remove a package + +`yum remove {{package}}` + +- Upgrade installed packages to newest available versions + +`yum upgrade` + From 6e6ba15a89ee8984cc8b2b1f90bcfcf1086ddd32 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Wed, 30 Dec 2015 14:21:42 +0800 Subject: [PATCH 28/78] Remove trailing spaces for #476 --- pages/linux/dnf.md | 2 +- pages/linux/yum.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/linux/dnf.md b/pages/linux/dnf.md index 8cbf4cd4d4..f92826168a 100644 --- a/pages/linux/dnf.md +++ b/pages/linux/dnf.md @@ -11,7 +11,7 @@ `dnf install {{package}}` - Install a new package and assume yes to all questions - + `dnf -y install {{package}}` - Remove a package diff --git a/pages/linux/yum.md b/pages/linux/yum.md index aba0440b39..8d46557c36 100644 --- a/pages/linux/yum.md +++ b/pages/linux/yum.md @@ -11,7 +11,7 @@ `yum install {{package}}` - Install a new package and assume yes to all questions (Also works with update, great for automated updates) - + `yum -y install {{package}}` - Remove a package From 04eae51baf15d9adac52bfec6214fe51824061bf Mon Sep 17 00:00:00 2001 From: Eliot Sykes Date: Tue, 29 Dec 2015 10:05:57 +0000 Subject: [PATCH 29/78] git diff: Add --staged option --- pages/common/git-diff.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/common/git-diff.md b/pages/common/git-diff.md index 9eea981619..e32fa41972 100644 --- a/pages/common/git-diff.md +++ b/pages/common/git-diff.md @@ -13,3 +13,7 @@ - Output a condensed summary of extended header information. `git diff --summary {{PATHSPEC}}` + +- Show staged (added, but not yet committed) changes only. + +`git diff --staged` From 2479464ff365bb77210e76366de12849b4084c27 Mon Sep 17 00:00:00 2001 From: Vlad Date: Mon, 28 Dec 2015 22:49:37 +0000 Subject: [PATCH 30/78] Fixes pull request #433 and #434 Author: Vlad Date: Mon Dec 28 22:49:37 2015 +0000 --- pages/common/mysql.md | 4 ++-- pages/common/mysqldump.md | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pages/common/mysql.md b/pages/common/mysql.md index 8fe41fd526..8c8ea598f0 100644 --- a/pages/common/mysql.md +++ b/pages/common/mysql.md @@ -6,9 +6,9 @@ `mysql {{database_name}}` -- Connect to a database using credentials +- Connect to a database, user will be prompted for a password -`mysql -u {{user}} -p{{password}} {{database_name}}` +`mysql -u {{user}} --password {{database_name}}` - Execute SQL statements in a script file (batch file) diff --git a/pages/common/mysqldump.md b/pages/common/mysqldump.md index 994edb5ada..49786b8f6f 100644 --- a/pages/common/mysqldump.md +++ b/pages/common/mysqldump.md @@ -2,10 +2,10 @@ > Backups mysql databases -- creating a backup +- Create a backup, user will be prompted for a password -`mysqldump -u {{user}} -p{{password}} {{database_name}} > {{filename.sql}}` +`mysqldump -u {{user}} --password {{database_name}} > {{filename.sql}}` -- restoring a backup +- Restoring a backup, user will be prompted for a password -`mysql -u {{user}} -p{{password}} {{database_name}} < {{filename.sql}}` +`mysql -u {{user}} --password {{database_name}} < {{filename.sql}}` From 95fc5a0ef9135ca1edcaf6ea215156e83997381b Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Wed, 30 Dec 2015 13:04:40 +0000 Subject: [PATCH 31/78] minor capitalization change --- pages/linux/yum.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/linux/yum.md b/pages/linux/yum.md index 8d46557c36..9f7416157b 100644 --- a/pages/linux/yum.md +++ b/pages/linux/yum.md @@ -10,7 +10,7 @@ `yum install {{package}}` -- Install a new package and assume yes to all questions (Also works with update, great for automated updates) +- Install a new package and assume yes to all questions (also works with update, great for automated updates) `yum -y install {{package}}` From f4bd38bd8a62d1b40571287476b112f04096ecf2 Mon Sep 17 00:00:00 2001 From: Artem Szubowicz Date: Wed, 30 Dec 2015 14:07:35 +0100 Subject: [PATCH 32/78] Update psql.md --- pages/common/psql.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pages/common/psql.md b/pages/common/psql.md index 2f4cd88f80..e3b962429f 100644 --- a/pages/common/psql.md +++ b/pages/common/psql.md @@ -6,10 +6,14 @@ `psql {{database}}` -- Connect to *database* on given server *host* running on given *port* with *username* given +- Connect to *database* on given server *host* running on given *port* with *username* given, no password prompt `psql -h {{host}} -p {{port}} -U {{username}} {{database}}` +- Connect to *database*, user will be prompted for password + +`psql -h {{host}} -p {{port}} -U {{username}} -W {{database}}` + - Run single *query* against the given *database*. Note: useful in shell scripts `psql -c '{{query}}' {{database}}` From 5222aac447ce3e07ca8d7e2e9163b59bcb478fcc Mon Sep 17 00:00:00 2001 From: Artem Szubowicz Date: Wed, 30 Dec 2015 14:10:04 +0100 Subject: [PATCH 33/78] Update npm.md Added cleanup --- pages/common/npm.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/common/npm.md b/pages/common/npm.md index 67bd44d1ff..6949cfbd23 100644 --- a/pages/common/npm.md +++ b/pages/common/npm.md @@ -21,3 +21,7 @@ - Publish the current project `npm publish` + +- Cleanup packages (removes packages, which are installed but are not listed in `package.json`) + +`npm prune` From 21c10a39e5036d5f4f8397b9905cc8c330ebebbc Mon Sep 17 00:00:00 2001 From: Artem Szubowicz Date: Wed, 30 Dec 2015 14:14:38 +0100 Subject: [PATCH 34/78] Started tldr for emacs --- pages/common/emacs.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 pages/common/emacs.md diff --git a/pages/common/emacs.md b/pages/common/emacs.md new file mode 100644 index 0000000000..22f67f1a27 --- /dev/null +++ b/pages/common/emacs.md @@ -0,0 +1,7 @@ +# emacs + +> The extensible, customizable, self-documenting, real-time display editor + +- open emacs in console mode (without X window) + +`emacs -nw` From 0c373e9db7b68266c6b05cfdb5baa6e3c646d427 Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Wed, 30 Dec 2015 14:53:38 +0000 Subject: [PATCH 35/78] minor grammar fix: remove comma --- pages/common/npm.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/npm.md b/pages/common/npm.md index 6949cfbd23..6fb0195c5f 100644 --- a/pages/common/npm.md +++ b/pages/common/npm.md @@ -22,6 +22,6 @@ `npm publish` -- Cleanup packages (removes packages, which are installed but are not listed in `package.json`) +- Cleanup packages (removes packages which are installed but are not listed in `package.json`) `npm prune` From e3c41d22ba0c1717cc39f1ea774085e3a4880e40 Mon Sep 17 00:00:00 2001 From: Seth Woodworth Date: Tue, 29 Dec 2015 18:11:42 -0500 Subject: [PATCH 36/78] adds emacs docs to quit and open file --- pages/common/emacs.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pages/common/emacs.md b/pages/common/emacs.md index 22f67f1a27..362d319397 100644 --- a/pages/common/emacs.md +++ b/pages/common/emacs.md @@ -2,6 +2,14 @@ > The extensible, customizable, self-documenting, real-time display editor -- open emacs in console mode (without X window) +- Open emacs in console mode (without X window) `emacs -nw` + +- Open a file in emacs + +`emacs {{filename}}` + +- Exit emacs + +`C-x C-c` From 2de7c9f932b0c69abeaa0e6ae12eace2124f2edf Mon Sep 17 00:00:00 2001 From: Robbie S Date: Tue, 29 Dec 2015 18:45:42 -0800 Subject: [PATCH 37/78] cat: added the append example --- pages/common/cat.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pages/common/cat.md b/pages/common/cat.md index 3122ae4713..a9c03f6810 100644 --- a/pages/common/cat.md +++ b/pages/common/cat.md @@ -2,10 +2,14 @@ > Print and concatenate files. -- Print the contents of *file1* to the standard output +- Print the contents of a file to the standard output -`cat {{file1}}` +`cat {{file}}` - Concatenate several files into the target file. `cat {{file1}} {{file2}} > {{target-file}}` + +- Append serveral files into the target file. + +`cat {{file1}} {{file2}} >> {{target-file}}` From 36f1b3ec726711547923a7e9b350e5aadc92cb22 Mon Sep 17 00:00:00 2001 From: "Son A. Pham" Date: Tue, 29 Dec 2015 22:46:40 -0600 Subject: [PATCH 38/78] Add npm -g option --- pages/common/npm.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/common/npm.md b/pages/common/npm.md index 67bd44d1ff..c264546766 100644 --- a/pages/common/npm.md +++ b/pages/common/npm.md @@ -10,6 +10,10 @@ `npm install` +- Download and install a module globally + +`npm install -g {{module_name}}` + - Download a given dependency, and add it to the package.json `npm install {{module_name}}@{{version}} --save` From 9f3b9aa636d353d8f6eac64cc3a0a7c988175863 Mon Sep 17 00:00:00 2001 From: Son Pham Date: Tue, 29 Dec 2015 23:38:43 -0600 Subject: [PATCH 39/78] add virtualenv page --- pages/common/virtualenv.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 pages/common/virtualenv.md diff --git a/pages/common/virtualenv.md b/pages/common/virtualenv.md new file mode 100644 index 0000000000..f48780be17 --- /dev/null +++ b/pages/common/virtualenv.md @@ -0,0 +1,16 @@ +# virtualenv + +> Create virtual isolated Python environments + +- Create a new environment + +`virtualenv {{path/to/venv}}` + +- Start (select) the environment + +`source {{path/to/venv}}/bin/activate` + +- Stop the environment + +`deactivate` + From 9da8263cfdf3125e7f8ed1eea7d2490f6be3e212 Mon Sep 17 00:00:00 2001 From: Paul Haller Date: Wed, 30 Dec 2015 22:01:40 +0100 Subject: [PATCH 40/78] Fixed tldr for gem Specific version instruction missed gem name and mixed up -v and --version --- pages/common/gem.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/gem.md b/pages/common/gem.md index 44a71ea824..e781a2eadf 100644 --- a/pages/common/gem.md +++ b/pages/common/gem.md @@ -8,7 +8,7 @@ - Install specific version of a gem -`gem install -v={{0.0.15}}` +`gem install {{gemname}} -v {{1.0.0}} - Update a gem From 775a858aa6feba44fa3ca7c48637489ad7d74a6e Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 30 Dec 2015 16:30:37 -0500 Subject: [PATCH 41/78] add bashmarks.sh https://github.com/huyng/bashmarks --- pages/common/bashmarks.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 pages/common/bashmarks.md diff --git a/pages/common/bashmarks.md b/pages/common/bashmarks.md new file mode 100644 index 0000000000..cfa3cd7f43 --- /dev/null +++ b/pages/common/bashmarks.md @@ -0,0 +1,23 @@ +# bashmarks + +> Save and jump to commonly used directories using 1 character commands. + +- List available bookmarks + +`l` + +- Saves the current directory as "bookmark_name" + +`s {{bookmark_name}}` + +- Goes (cd) to the directory associated with "bookmark_name" + +`g {{bookmark_name}}` + +- Prints the directory associated with "bookmark_name" + +`p {{bookmark_name}}` + +- Deletes the bookmark + +`d {{bookmark_name}}` From 76d44e6192426ad6495c4645519bfb9845261600 Mon Sep 17 00:00:00 2001 From: Igor Shubovych Date: Wed, 23 Dec 2015 14:45:11 +0200 Subject: [PATCH 42/78] whoami: add page --- pages/common/whoami.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 pages/common/whoami.md diff --git a/pages/common/whoami.md b/pages/common/whoami.md new file mode 100644 index 0000000000..3582689fa1 --- /dev/null +++ b/pages/common/whoami.md @@ -0,0 +1,7 @@ +# whoami + +> Show the username of the current user + +- Display currently logged user name + +`whoami` From a4768ccd28e54efa495e0e11da1a3e9feef2abfc Mon Sep 17 00:00:00 2001 From: Eddie Antonio Santos Date: Wed, 30 Dec 2015 15:05:57 -0700 Subject: [PATCH 43/78] ar: add examples and clean-up --- pages/common/ar.md | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pages/common/ar.md b/pages/common/ar.md index d52f322565..2e46b2d51c 100644 --- a/pages/common/ar.md +++ b/pages/common/ar.md @@ -2,10 +2,22 @@ > Create, modify, and extract from archives (.a .so .o) -- Extract members of the archive +- Extract all members from an archive -`ar -x libfoo.a` +`ar -x {{libfoo.a}}` -- List the content (files) of libfoo.a +- List the members of an archive -`ar -t libfoo.a` +`ar -t {{libfoo.a}}` + +- Replace or add files to an archive + +`ar -r {{libfoo.a}} {{foo.o}} {{bar.o}} {{baz.o}}` + +- Insert an object file index (equivalent to using `ranlib`) + +`ar -s {{libfoo.a}}` + +- Create an archive with files and an accompanying object file index + +`ar -rs {{libfoo.a}} {{foo.o}} {{bar.o}} {{baz.o}}` From 85cde43d8534fb4e1bbb2fa9069e8ff5579261f1 Mon Sep 17 00:00:00 2001 From: Eddie Antonio Santos Date: Wed, 30 Dec 2015 15:22:13 -0700 Subject: [PATCH 44/78] strings: add page --- pages/common/strings.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 pages/common/strings.md diff --git a/pages/common/strings.md b/pages/common/strings.md new file mode 100644 index 0000000000..517e068506 --- /dev/null +++ b/pages/common/strings.md @@ -0,0 +1,19 @@ +# strings + +> Find printable strings in an object file or binary + +- Print all strings in a binary + +`strings {{file}}` + +- Limit results to strings at least *length* characters long + +`strings -n {{length}} {{file}}` + +- Prefix each result with its offset within the file + +`strings -t d {{file}}` + +- Prefix each result with its offset within the file in hexadecimal + +`strings -t x {{file}}` From 10232ce7c21adcccdf23c14fc9c372676883c645 Mon Sep 17 00:00:00 2001 From: Sam D Date: Wed, 30 Dec 2015 18:21:59 -0500 Subject: [PATCH 45/78] removes no-longer-there diskutil verb As of El Capitan, `sudo diskutil repairPermissions /` returns `diskutil: did not recognize verb "repairPermissions"; type "diskutil" for a list` since repairPermissions has been removed. In the interest of keeping this tldr-compatible I've removed it. In the interest of not leaving things out, there could instead be a "this no longer works" notice. --- pages/osx/diskutil.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pages/osx/diskutil.md b/pages/osx/diskutil.md index a9ed26dad4..dd70d12418 100644 --- a/pages/osx/diskutil.md +++ b/pages/osx/diskutil.md @@ -6,10 +6,6 @@ `diskutil list` -- Repair permissions on a volume - -`diskutil repairPermissions {{/Volumes/Name}}` - - Repair the file system data structures of a volume `diskutil repairVolume {{/dev/diskX}}` From a41b1c087553abee07706f02a2af3c71f6741804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lal?= Date: Tue, 29 Dec 2015 15:18:59 +0100 Subject: [PATCH 46/78] Add host --- pages/common/host.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 pages/common/host.md diff --git a/pages/common/host.md b/pages/common/host.md new file mode 100644 index 0000000000..6a5927eda4 --- /dev/null +++ b/pages/common/host.md @@ -0,0 +1,15 @@ +# host + +Lookup Domain Name Server + +- Lookup A, AAAA, and MX records of a domain + +`host {{domain}}` + +- Lookup a field (CNAME, TXT,...) of a domain + +`host -t {{field}} {{domain}}` + +- Reverse lookup an IP + +`host {{ip_address}}` From 27b2bfac54437bf13812134c5640a955cee464ec Mon Sep 17 00:00:00 2001 From: lagel Date: Wed, 30 Dec 2015 23:04:51 +0800 Subject: [PATCH 47/78] Add gradle commands --- pages/common/gradle.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 pages/common/gradle.md diff --git a/pages/common/gradle.md b/pages/common/gradle.md new file mode 100644 index 0000000000..561e3bae28 --- /dev/null +++ b/pages/common/gradle.md @@ -0,0 +1,15 @@ +# Gradle + +> Gradle is the official build system for Android Studio + +- Compile a package + +`gradle build` + +- Clear the build folder + +`gradle clean` + +- Compile and Release package + +`gradle assembleRelease` From c9807c9cda9b71a6f9ec6e6cb3cddef9b579de87 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Thu, 31 Dec 2015 13:12:49 +1100 Subject: [PATCH 48/78] Fixed typo --- pages/osx/netstat.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/osx/netstat.md b/pages/osx/netstat.md index 76839d4a53..ed7e063f42 100644 --- a/pages/osx/netstat.md +++ b/pages/osx/netstat.md @@ -18,6 +18,6 @@ `netstat -p {PROTOCOL}` -- List information continiously +- List information continuously `netstat -c` From 44eb0501023a5eb2f2263089e2406332faf35c0e Mon Sep 17 00:00:00 2001 From: Igor Shubovych Date: Wed, 23 Dec 2015 15:02:45 +0200 Subject: [PATCH 49/78] vagrant: add page --- pages/common/vagrant.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 pages/common/vagrant.md diff --git a/pages/common/vagrant.md b/pages/common/vagrant.md new file mode 100644 index 0000000000..b7efaba8bf --- /dev/null +++ b/pages/common/vagrant.md @@ -0,0 +1,23 @@ +# vagrant + +> Manage lightweight, reproducible, and portable development environments + +- Create Vagrantfile in current folder with the base Vagrant box + +`vagrant init` + +- Create Vagrantfile with the Ubuntu 14.04 (Trusty Tahr) box from HashiCorp Atlas + +`vagrant init ubuntu/trusty32` + +- Start and provision the vagrant environment + +`vagrant up` + +- Suspend the machine + +`vagrant suspend` + +- Connect to machine via SSH + +`vagrant ssh` From 268a6fefd48f8e4ce641c7200847124b42a185f2 Mon Sep 17 00:00:00 2001 From: Matt McFarland Date: Wed, 30 Dec 2015 21:31:24 -0500 Subject: [PATCH 50/78] Update bashmarks.md --- pages/common/bashmarks.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/common/bashmarks.md b/pages/common/bashmarks.md index cfa3cd7f43..7ba7035d8b 100644 --- a/pages/common/bashmarks.md +++ b/pages/common/bashmarks.md @@ -6,18 +6,18 @@ `l` -- Saves the current directory as "bookmark_name" +- Save the current folder as "bookmark_name" `s {{bookmark_name}}` -- Goes (cd) to the directory associated with "bookmark_name" +- Go to a bookmarked folder `g {{bookmark_name}}` -- Prints the directory associated with "bookmark_name" +- Print a bookmarked folder's contents `p {{bookmark_name}}` -- Deletes the bookmark +- Delete a bookmark `d {{bookmark_name}}` From fe6223160717b1c217fd1b2ca2252d1de5bfee42 Mon Sep 17 00:00:00 2001 From: Leandro Ostera Date: Thu, 31 Dec 2015 04:40:04 +0100 Subject: [PATCH 51/78] Updates links to point to tldr.jsx --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d4da1a55b0..6f5a66e0d9 100644 --- a/README.md +++ b/README.md @@ -54,8 +54,8 @@ You can access these pages on your computer using one of the following clients: [Google Play](https://play.google.com/store/apps/details?id=io.github.hidroh.tldroid) - [Ruby client](https://github.com/YellowApple/tldrb): `gem install tldrb` - [R client](https://github.com/kirillseva/tldrrr): `devtools::install_github('kirillseva/tldrrr')` -- [Web client](https://github.com/ostera/tldr.js): try tldr on your browser - [here](https://ostera.github.io/tldr.js)! +- [Web client](https://github.com/ostera/tldr.jsx): try tldr on your browser + [here](https://ostera.github.io/tldr.jsx)! Let us know if you are building one and we can add it to this list! From c9b0b290f98d5875fe7fdc9a4cb3222f148a3ea5 Mon Sep 17 00:00:00 2001 From: ElectricSquid Date: Wed, 30 Dec 2015 23:41:06 -0600 Subject: [PATCH 52/78] Addition to shutdown.md Added section to indicate how to shutdown at a specific time rather than shutting down X minutes from now --- pages/linux/shutdown.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/linux/shutdown.md b/pages/linux/shutdown.md index ff0982165a..9ae3bb7a4d 100644 --- a/pages/linux/shutdown.md +++ b/pages/linux/shutdown.md @@ -14,6 +14,10 @@ `shutdown -r +{{5}} &` +- Shutdown at 1:00 pm (Uses 24h clock) + +`shutdown -h 13:00` + - Cancel a pending shutdown/reboot operation `shutdown -c` From d5f8b3f4275f341fe4f6863b79519ade3d56b31a Mon Sep 17 00:00:00 2001 From: Harry Terkelsen Date: Wed, 30 Dec 2015 22:11:45 -0800 Subject: [PATCH 53/78] Add Dart client to README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6f5a66e0d9..0f681f3da1 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,7 @@ You can access these pages on your computer using one of the following clients: [Google Play](https://play.google.com/store/apps/details?id=io.github.hidroh.tldroid) - [Ruby client](https://github.com/YellowApple/tldrb): `gem install tldrb` - [R client](https://github.com/kirillseva/tldrrr): `devtools::install_github('kirillseva/tldrrr')` +- [Dart client](https://github.com/hterkelsen/tldr): `pub global activate tldr` - [Web client](https://github.com/ostera/tldr.jsx): try tldr on your browser [here](https://ostera.github.io/tldr.jsx)! From b6ca634bb1e7511fa18517fa6549db9764fd0ce1 Mon Sep 17 00:00:00 2001 From: Jacek Wielemborek Date: Tue, 29 Dec 2015 16:28:01 +0100 Subject: [PATCH 54/78] Update nmap.md. --- pages/common/nmap.md | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/pages/common/nmap.md b/pages/common/nmap.md index a8861f0d47..4c13ea37d6 100644 --- a/pages/common/nmap.md +++ b/pages/common/nmap.md @@ -1,19 +1,28 @@ # nmap -> Network exploration tool and security / port scanner +> Network exploration tool and security / port scanner. +> Some features only activate when Nmap is run with privileges. -- scan open ports of a single host +- Try to determine whether the specified hosts are up and what are their names. -`nmap {{192.168.0.1}}` +`nmap -sn {{ip_or_hostname}} {{optional_another_address}}` -- discover hosts in the 192.168.0.X area (no port scan) +- Like above, but also run a default 1000-port TCP scan if host seems up. -`nmap -sn {{192.168.0.1/24}}` +`nmap {{ip_or_hostname}} {{optional_another_address}}` -- faster scan of a single host (scans for common ports) +- Also enable service detection, OS fingerprinting and traceroute. -`nmap -F {{192.168.0.1}}` +`nmap -A {{address_or_addresses}}` -- faster scan of a subnet (scans for common ports) +- Assume good network connection and speed up execution: -`nmap -F {{192.168.0.1/24}}` +`nmap -T4 {{address_or_addresses}}` + +- Scan a specific list of ports (use -p- for all ports 1-65535) + +`nmap -p {{port1,port2,...,portN}} {{address_or_addresses}}` + +- Perform TCP and UDP scanning (use -sU for UDP only, -sZ for SCTP, -sO for IP): + +`nmap -sSU {{address_or_addresses}}` From bdfa9c394f6f2b275228937be8161a1d9ba442d1 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Wed, 30 Dec 2015 19:53:12 +0000 Subject: [PATCH 55/78] Add apt-cache --- pages/linux/apt-cache.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 pages/linux/apt-cache.md diff --git a/pages/linux/apt-cache.md b/pages/linux/apt-cache.md new file mode 100644 index 0000000000..73317742a8 --- /dev/null +++ b/pages/linux/apt-cache.md @@ -0,0 +1,15 @@ +# apt-cache + +> Debian and Ubuntu package query tool + + - Search for a package in your current sources + +`apt-cache search {{query}}` + + - Show information about a package + +`apt-cache show {{package}}` + + - Show whether a package is installed and up to date + +`apt-cache policy {{package}}` From c7f5c3440206a0bc32f7fdd52768ada09cd43a15 Mon Sep 17 00:00:00 2001 From: Igor Shubovych Date: Thu, 31 Dec 2015 12:33:21 +0200 Subject: [PATCH 56/78] Linting after merging #507 --- pages/linux/apt-cache.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/linux/apt-cache.md b/pages/linux/apt-cache.md index 73317742a8..e66886b8d3 100644 --- a/pages/linux/apt-cache.md +++ b/pages/linux/apt-cache.md @@ -2,14 +2,14 @@ > Debian and Ubuntu package query tool - - Search for a package in your current sources +- Search for a package in your current sources `apt-cache search {{query}}` - - Show information about a package +- Show information about a package `apt-cache show {{package}}` - - Show whether a package is installed and up to date - +- Show whether a package is installed and up to date + `apt-cache policy {{package}}` From a3f0d36a80501bcbfd38fea37fd0e196a9d980e6 Mon Sep 17 00:00:00 2001 From: 85pando <85pando@googlemail.com> Date: Thu, 31 Dec 2015 11:54:03 +0100 Subject: [PATCH 57/78] Fix another much needed imagemagick command. --- pages/common/convert.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/common/convert.md b/pages/common/convert.md index 8c4e9f4618..e4b2c79ed2 100644 --- a/pages/common/convert.md +++ b/pages/common/convert.md @@ -10,6 +10,10 @@ `convert {{image.png}} -resize 50% {{image2.png}}` +- Scale an image keeping the original aspect ratio to a maximum dimension of 640x480. + +`convert {{image.png}} -resize 640x480 {{image2.png}}` + - Horizontally append images `convert {{image1.png}} {{image2.png}} {{image3.png}} +append {{image123.png}}` From b63075e51f8254a684ae61eb650b06a242ae3e1f Mon Sep 17 00:00:00 2001 From: Jeroen Meulemeester Date: Thu, 31 Dec 2015 10:43:10 +0100 Subject: [PATCH 58/78] xrandr: add page --- pages/linux/xrandr.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 pages/linux/xrandr.md diff --git a/pages/linux/xrandr.md b/pages/linux/xrandr.md new file mode 100644 index 0000000000..ba3c06e912 --- /dev/null +++ b/pages/linux/xrandr.md @@ -0,0 +1,23 @@ +# xrandr + +> Set the size, orientation and/or reflection of the outputs for a screen + +- Display the current state of the system (known screens, resolutions, ...) + +`xrandr --query` + +- Disable disconnected outputs and enable connected ones with default settings + +`xrandr --auto` + +- Change the resolution and update frequency of DisplayPort 1 to 1920x1080, 60Hz + +`xrandr --output {{DP1}} --mode {{1920x1080}} --rate {{60}}` + +- Set the resolution of HDMI2 to 1280x1024 and put it on the right of DP1 + +`xrandr --output {{HDMI2}} --mode {{1280x1024}} --right-of {{DP1}}` + +- Disable the VGA1 output + +`xrandr --output {{VGA1}} --off` From 7d60083f20af4c79f5dd84c200c77f3b24eafaee Mon Sep 17 00:00:00 2001 From: amine hajyoussef Date: Thu, 31 Dec 2015 13:28:12 +0100 Subject: [PATCH 59/78] fix markup --- pages/common/gem.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/gem.md b/pages/common/gem.md index e781a2eadf..44380f546f 100644 --- a/pages/common/gem.md +++ b/pages/common/gem.md @@ -8,7 +8,7 @@ - Install specific version of a gem -`gem install {{gemname}} -v {{1.0.0}} +`gem install {{gemname}} -v {{1.0.0}}` - Update a gem From 29717aac4cea0897bcf127347c41c076fac47907 Mon Sep 17 00:00:00 2001 From: 85pando <85pando@googlemail.com> Date: Thu, 31 Dec 2015 12:20:13 +0100 Subject: [PATCH 60/78] Add steam-locomotive --- pages/common/sl.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 pages/common/sl.md diff --git a/pages/common/sl.md b/pages/common/sl.md new file mode 100644 index 0000000000..ae2f5a5ec0 --- /dev/null +++ b/pages/common/sl.md @@ -0,0 +1,15 @@ +# sl + +> Steam locomotive running through your terminal. + +- Let a steam locomotive run through your terminal. + +`sl` + +- The train burns, people scream. + +`sl -a` + +- Let the train fly. + +`sl -F` From 3fe8681e19acf79351509fb46b1988a0ab64397f Mon Sep 17 00:00:00 2001 From: Amine Hajyoussef Date: Thu, 31 Dec 2015 14:11:18 +0100 Subject: [PATCH 61/78] consistent markup --- pages/common/host.md | 2 +- pages/common/passwd.md | 8 ++++---- pages/common/salt.md | 6 +++--- pages/common/sed.md | 3 +-- pages/common/touch.md | 6 +++--- pages/linux/hostname.md | 2 +- 6 files changed, 13 insertions(+), 14 deletions(-) diff --git a/pages/common/host.md b/pages/common/host.md index 6a5927eda4..784f242456 100644 --- a/pages/common/host.md +++ b/pages/common/host.md @@ -1,6 +1,6 @@ # host -Lookup Domain Name Server +> Lookup Domain Name Server - Lookup A, AAAA, and MX records of a domain diff --git a/pages/common/passwd.md b/pages/common/passwd.md index e4ebbe043b..ddf4893e71 100644 --- a/pages/common/passwd.md +++ b/pages/common/passwd.md @@ -2,18 +2,18 @@ > passwd is a tool used to change a user's password. -* Change the password of the current user +- Change the password of the current user `passwd {{new password}}` -* Change the password of the specified user +- Change the password of the specified user `passwd {{username}} {{new password}}` -* Get the current statuts of the user +- Get the current statuts of the user `passwd -S` -* Make the password of the account blank (it will set the named account passwordless) +- Make the password of the account blank (it will set the named account passwordless) `passwd -d` diff --git a/pages/common/salt.md b/pages/common/salt.md index 4044e92755..b11b247598 100644 --- a/pages/common/salt.md +++ b/pages/common/salt.md @@ -8,12 +8,12 @@ - Execute a highstate on all connected minions: -`salt '*' state.highstate +`salt '*' state.highstate` - Upgrade packages using the OS package manager (apt, yum, brew) on a subset of minions -`salt '*.domain.com' pkg.upgrade +`salt '*.domain.com' pkg.upgrade` - Execute an arbitrary command on a particular minion: -`salt '{{minion_id}}' cmd.run "ls " +`salt '{{minion_id}}' cmd.run "ls "` diff --git a/pages/common/sed.md b/pages/common/sed.md index 249d9d58aa..6ae128e8f2 100644 --- a/pages/common/sed.md +++ b/pages/common/sed.md @@ -6,8 +6,7 @@ `sed 's/{{find}}/{{replace}}/g' {{filename}}` -- replace all occurrences of a string in a file, and overwrite the file - contents +- replace all occurrences of a string in a file, and overwrite the file contents `sed -i 's/{{find}}/{{replace}}/g' {{filename}}` diff --git a/pages/common/touch.md b/pages/common/touch.md index fb7c4e1161..7937c861fa 100644 --- a/pages/common/touch.md +++ b/pages/common/touch.md @@ -2,14 +2,14 @@ > Change a file access and modification times (atime, mtime) -- Create a new empty file(s) or change the times for existing file(s) to current time.` +- Create a new empty file(s) or change the times for existing file(s) to current time `touch {{filename}}` - Set the times on a file to those specified -`touch -t 201412250801.59 {{filename}} -`touch -t {{YYYYMMDDHHMM.SS}} {{filename}} +`touch -t 201412250801.59 {{filename}}` +`touch -t {{YYYYMMDDHHMM.SS}} {{filename}}` - Set the times on a file to match those on second file diff --git a/pages/linux/hostname.md b/pages/linux/hostname.md index b807d87b6d..592179bc2d 100644 --- a/pages/linux/hostname.md +++ b/pages/linux/hostname.md @@ -1,6 +1,6 @@ # hostname -Show or set the system's host name +> Show or set the system's host name - Show current host name From f8fb3381ec186e596a73a0278c7748e47c381747 Mon Sep 17 00:00:00 2001 From: Amine Hajyoussef Date: Thu, 31 Dec 2015 14:26:31 +0100 Subject: [PATCH 62/78] last fix --- pages/osx/hostname.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/osx/hostname.md b/pages/osx/hostname.md index ed4c36a6cf..abc0269c4c 100644 --- a/pages/osx/hostname.md +++ b/pages/osx/hostname.md @@ -1,6 +1,6 @@ # hostname -Show or set the system's host name +> Show or set the system's host name - Show current host name From fc835b18bbe7e0e2741d190d5f17f055f3d7cb78 Mon Sep 17 00:00:00 2001 From: Cvetomird91 Date: Thu, 31 Dec 2015 00:46:40 +0200 Subject: [PATCH 63/78] last: edited to stick to the convetion and added more options --- pages/common/last.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 pages/common/last.md diff --git a/pages/common/last.md b/pages/common/last.md new file mode 100644 index 0000000000..c796082a52 --- /dev/null +++ b/pages/common/last.md @@ -0,0 +1,27 @@ +# last + +> View the last logged in users + +- view last logins, their duration and other information as read from /var/log/wtmp + +`last` + +- specify how many of the last logins to show + +`last -n {{login_count}}` + +- view full login times and dates + +`last -F` + +- view the last login by a specific user + +`last {{user_name}}` + +- view the last reboot (last login of the pseudo user reboot) + +`last reboot` + +- view the last shutdown (last login of the pseudo user shutdown) + +`last shutdown` From 856351df98807931819b756648a6275b2d93e205 Mon Sep 17 00:00:00 2001 From: Timothy Sutton Date: Thu, 31 Dec 2015 22:36:21 -0500 Subject: [PATCH 64/78] Typo "it's" in mdfind --- pages/osx/mdfind.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/osx/mdfind.md b/pages/osx/mdfind.md index a2c104008a..b2eae54dc8 100644 --- a/pages/osx/mdfind.md +++ b/pages/osx/mdfind.md @@ -2,11 +2,11 @@ > List files matching a given query -- Find a file by it's name +- Find a file by its name `mdfind -name {{file}}` -- Find a file by it's content +- Find a file by its content `mdfind {{query}}` From 88e15c9cc0a1f3acad72a9034739a07ce5b3fff1 Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Fri, 1 Jan 2016 20:05:46 +0000 Subject: [PATCH 65/78] README.md: rework clients section a bit --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 0f681f3da1..afe362d3fe 100644 --- a/README.md +++ b/README.md @@ -41,13 +41,14 @@ for the most common UNIX / Linux / OSX / SunOS commands. You can access these pages on your computer using one of the following clients: - [Node.js client](https://github.com/tldr-pages/tldr-node-client) : `npm install -g tldr` -- [Python client](https://github.com/tldr-pages/tldr-python-client) : `pip install tldr` -- [Python client](https://github.com/lord63/tldr.py): `pip install tldr.py` +- Python clients: + - [tldr-python-client](https://github.com/tldr-pages/tldr-python-client) : `pip install tldr` + - [tldr.py](https://github.com/lord63/tldr.py): `pip install tldr.py` - [Go client](https://github.com/pranavraja/tldr): `go get github.com/pranavraja/tldr` - or [platform binaries](https://github.com/pranavraja/tldr/releases) -- [Elixir client](https://github.com/tldr-pages/tldr_elixir_client): binaries available soon + (or [platform binaries](https://github.com/pranavraja/tldr/releases)) +- [Elixir client](https://github.com/tldr-pages/tldr_elixir_client) (binaries not yet available) - [C++ client](https://github.com/tldr-pages/tldr-cpp-client): `brew tap tldr-pages/tldr && brew install tldr` -- Android client: +- Android clients: - [tldr-viewer](https://github.com/gianasista/tldr-viewer), available on [Google Play](https://play.google.com/store/apps/details?id=de.gianasista.tldr_viewer) - [tldroid](https://github.com/hidroh/tldroid), available on @@ -55,8 +56,7 @@ You can access these pages on your computer using one of the following clients: - [Ruby client](https://github.com/YellowApple/tldrb): `gem install tldrb` - [R client](https://github.com/kirillseva/tldrrr): `devtools::install_github('kirillseva/tldrrr')` - [Dart client](https://github.com/hterkelsen/tldr): `pub global activate tldr` -- [Web client](https://github.com/ostera/tldr.jsx): try tldr on your browser - [here](https://ostera.github.io/tldr.jsx)! +- [Web client](https://github.com/ostera/tldr.jsx): https://ostera.github.io/tldr.jsx Let us know if you are building one and we can add it to this list! From ba7b7861f64e340d90941eea4489609c7be768e3 Mon Sep 17 00:00:00 2001 From: Cvetomird91 Date: Thu, 31 Dec 2015 00:27:57 +0200 Subject: [PATCH 66/78] soft and hard file limits - edited descriptions --- pages/linux/ulimit.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 pages/linux/ulimit.md diff --git a/pages/linux/ulimit.md b/pages/linux/ulimit.md new file mode 100644 index 0000000000..b7973d1c95 --- /dev/null +++ b/pages/linux/ulimit.md @@ -0,0 +1,19 @@ +# ulimit + +> Get and set user limits + +- get the properties of all the user limits + +`ulimit -a` + +- get hard limit for the number of simultaneously opened files + +`ulimit -H -n` + +- get soft limit for the number of simultaneously opened files + +`ulimit -S -n` + +- set max per-user process limit + +`ulimit -u 30` From dda6e37954fee455993c3b7689f96319a9be136b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20DECOOL?= Date: Sat, 2 Jan 2016 01:19:38 +0100 Subject: [PATCH 67/78] Add ssh-copy-id page --- pages/linux/ssh-copy-id.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 pages/linux/ssh-copy-id.md diff --git a/pages/linux/ssh-copy-id.md b/pages/linux/ssh-copy-id.md new file mode 100644 index 0000000000..727764b538 --- /dev/null +++ b/pages/linux/ssh-copy-id.md @@ -0,0 +1,11 @@ +# ssh-copy-id + +> Install your public key in a remote machine's authorized_keys. + +- Copy the given public key to the remote + +`ssh-copy-id -i {{path/to/certificate}} {{username}}@{{remote_host}}` + +- Copy the given public key to the remote with specific port + +`ssh-copy-id -i {{path/to/certificate}} -p {{port}} {{username}}@{{remote_host}}` From 652933225fca218ec724acd33e2b1d822462590f Mon Sep 17 00:00:00 2001 From: Katy Moe Date: Fri, 1 Jan 2016 03:48:36 +0000 Subject: [PATCH 68/78] pkill: add page --- pages/common/pkill.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 pages/common/pkill.md diff --git a/pages/common/pkill.md b/pages/common/pkill.md new file mode 100644 index 0000000000..d6121443b8 --- /dev/null +++ b/pages/common/pkill.md @@ -0,0 +1,12 @@ +# pkill + +> Signal process by name +> Mostly used for stopping processes + +- kill all processes which match + +`pkill -9 {{process_name}}` + +- send SIGUSR1 signal to processes which match + +`pkill -USR1 {{process_name}}` From e45b0d7198312bd0acf9063244c185399a0ce457 Mon Sep 17 00:00:00 2001 From: Igor Shubovych Date: Sat, 2 Jan 2016 03:09:44 +0200 Subject: [PATCH 69/78] Linting --- pages/common/last.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/common/last.md b/pages/common/last.md index c796082a52..90b44a63ee 100644 --- a/pages/common/last.md +++ b/pages/common/last.md @@ -1,4 +1,4 @@ -# last +# last > View the last logged in users @@ -10,7 +10,7 @@ `last -n {{login_count}}` -- view full login times and dates +- view full login times and dates `last -F` From c163deea80a38a4e1b5bbd5da8d26b2bf4f6d1c8 Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Sat, 2 Jan 2016 10:43:05 +0000 Subject: [PATCH 70/78] ulimit: fix linting (remove trailing spaces) --- pages/linux/ulimit.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/linux/ulimit.md b/pages/linux/ulimit.md index b7973d1c95..b5ef0f4bfb 100644 --- a/pages/linux/ulimit.md +++ b/pages/linux/ulimit.md @@ -6,14 +6,14 @@ `ulimit -a` -- get hard limit for the number of simultaneously opened files +- get hard limit for the number of simultaneously opened files `ulimit -H -n` -- get soft limit for the number of simultaneously opened files +- get soft limit for the number of simultaneously opened files -`ulimit -S -n` +`ulimit -S -n` -- set max per-user process limit +- set max per-user process limit `ulimit -u 30` From ce9b0e1059f71ab435a93c36888dce53678404ed Mon Sep 17 00:00:00 2001 From: Katy Moe Date: Sat, 2 Jan 2016 01:12:34 +0000 Subject: [PATCH 71/78] pgrep: remove pkill example and correct tokens --- pages/common/pgrep.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/pages/common/pgrep.md b/pages/common/pgrep.md index 8768690f2d..750a5f69d4 100644 --- a/pages/common/pgrep.md +++ b/pages/common/pgrep.md @@ -4,16 +4,12 @@ - return PIDs of any running processes with a matching command string -`pgrep {{Finder}}` +`pgrep {{process_name}}` - search full command line with parameters instead of just the process name -`pgrep -f "{{ssh root}}"` +`pgrep -f "{{process_name}} {{parameter}}"` - search for process run by a specific user -`pgrep -u root {{firefox}}` - -- kill all processes which match - -`pkill -9 {{Finder}}` +`pgrep -u root {{process_name}}` From 17993eadcfa300a931c3eade2de04425dc4c30c7 Mon Sep 17 00:00:00 2001 From: Rizky Luthfianto Date: Sun, 3 Jan 2016 00:10:44 +0700 Subject: [PATCH 72/78] Add Rust client to README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index afe362d3fe..226a988041 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,7 @@ You can access these pages on your computer using one of the following clients: - [tldroid](https://github.com/hidroh/tldroid), available on [Google Play](https://play.google.com/store/apps/details?id=io.github.hidroh.tldroid) - [Ruby client](https://github.com/YellowApple/tldrb): `gem install tldrb` +- [Rust client](https://github.com/rilut/rust-tldr): `cargo install tldr` - [R client](https://github.com/kirillseva/tldrrr): `devtools::install_github('kirillseva/tldrrr')` - [Dart client](https://github.com/hterkelsen/tldr): `pub global activate tldr` - [Web client](https://github.com/ostera/tldr.jsx): https://ostera.github.io/tldr.jsx From 481a1d9bc9680ed91b4e247e85f60e2792074e70 Mon Sep 17 00:00:00 2001 From: Katy Moe Date: Sat, 2 Jan 2016 18:20:58 +0000 Subject: [PATCH 73/78] useradd, userdel, usermod: move from common to linux directory --- pages/{common => linux}/useradd.md | 0 pages/{common => linux}/userdel.md | 0 pages/{common => linux}/usermod.md | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename pages/{common => linux}/useradd.md (100%) rename pages/{common => linux}/userdel.md (100%) rename pages/{common => linux}/usermod.md (100%) diff --git a/pages/common/useradd.md b/pages/linux/useradd.md similarity index 100% rename from pages/common/useradd.md rename to pages/linux/useradd.md diff --git a/pages/common/userdel.md b/pages/linux/userdel.md similarity index 100% rename from pages/common/userdel.md rename to pages/linux/userdel.md diff --git a/pages/common/usermod.md b/pages/linux/usermod.md similarity index 100% rename from pages/common/usermod.md rename to pages/linux/usermod.md From 0fdd370a27f4c557428b8a7ba71694061f5af786 Mon Sep 17 00:00:00 2001 From: webb04 Date: Thu, 31 Dec 2015 00:50:05 +0000 Subject: [PATCH 74/78] ditto: add page --- pages/osx/ditto.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 pages/osx/ditto.md diff --git a/pages/osx/ditto.md b/pages/osx/ditto.md new file mode 100644 index 0000000000..ff0bf86c48 --- /dev/null +++ b/pages/osx/ditto.md @@ -0,0 +1,15 @@ +# ditto + +> Copy files and folders + +- Overwrites contents of destination folder with contents of source folder + +`ditto {{path/to/source}} {{path/to/destination}}` + +- print a line to the Terminal window for every file that’s being copied + +`ditto -V {{path/to/source}} {{path/to/destination}}` + +- copy a given file or folder, while retaining the original file permissions. + +`ditto -rsrc {{path/to/source}} {{path/to/destination}}` From c4d1f7e7e2c60a7d7345cadcbbca136112580493 Mon Sep 17 00:00:00 2001 From: Maonx Date: Sun, 3 Jan 2016 15:15:37 +0800 Subject: [PATCH 75/78] timedatectl: add page --- pages/linux/timedatectl.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 pages/linux/timedatectl.md diff --git a/pages/linux/timedatectl.md b/pages/linux/timedatectl.md new file mode 100644 index 0000000000..1327cf66fe --- /dev/null +++ b/pages/linux/timedatectl.md @@ -0,0 +1 @@ +# timedatectl > Control the system time and date - To check the current system clock time `timedatectl` - To set the local time of the system clock directly `timedatectl set-time {{"yyyy-MM-dd hh:mm:ss"}}` - To list available timezones `timedatectl list-timezones` - To change timezones `timedatectl set-timezone {{timezone}}` \ No newline at end of file From c9e197e8d7ff6ba79b8e50ef9bf9d20e6bbd2b67 Mon Sep 17 00:00:00 2001 From: Jeroen Meulemeester Date: Sat, 2 Jan 2016 23:59:49 +0100 Subject: [PATCH 76/78] cowsay: add page --- pages/common/cowsay.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 pages/common/cowsay.md diff --git a/pages/common/cowsay.md b/pages/common/cowsay.md new file mode 100644 index 0000000000..4def52df42 --- /dev/null +++ b/pages/common/cowsay.md @@ -0,0 +1,15 @@ +# cowsay + +> Generate an ASCII character like a cow or sheep saying or thinking something + +- Print an ASCII cow saying "Hello world!" + +`cowsay "Hello world!"` + +- Print an ASCII dragon saying "Hello!" + +`echo "Hello!" | cowsay -f dragon` + +- Print a stoned thinking ASCII cow + +`cowthink -s "I'm just a cow, not a great thinker ..."` From 3ae561740558cf79688bea197076f2fa9dc09690 Mon Sep 17 00:00:00 2001 From: Igor Shubovych Date: Sun, 3 Jan 2016 12:01:16 +0200 Subject: [PATCH 77/78] Improve Contributing Guidelines --- CONTRIBUTING.md | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0f7a1de0e6..f4941afa68 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -82,7 +82,7 @@ Detailed explanation: git checkout -b ``` -5. Run `make lint` to check that your page(s) are correct. +5. Run `make lint` to check that your page(s) are correct. Try to run the commands you are describing to ensure the syntax is correct. 6. Please use the following commit message format: `: type of change`. @@ -102,15 +102,31 @@ Detailed explanation: 8. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) with a clear title and description. + + If page is not about a standard Unix/Linux tool, please include a link to the tool home page. + + If you are changing something non-trivial, not just adding a page for a new tool, please describe why you are doing this. 9. Use Git's [interactive rebase](https://help.github.com/articles/interactive-rebase) feature to tidy up your commits before making them public. + + If you are not familiar with `git rebase`, it might be helpful to check out these video tutorials: + - [Git Rebase: squash last commits](https://www.youtube.com/watch?v=qh9KtjfjzCU) + - [Learning Git Tutorial: Interactive Rebasing](https://www.youtube.com/watch?v=NW46XmvJh5Q) + In most cases it is better to squash commits before submitting a pull request. -10. If you are asked to amend your changes before they can be merged in, please - use `git commit --amend` and force push to your remote feature branch. - You may also be asked to squash commits. +10. If you do not want to do a rebasing, you can overwrite your last commit in pull request, while you have only a single commit. You can achieve this with `git commit --amend` command. + + ```bash + # When you are on topic branch of your pull request + # Fix your files + + git add . # Register edited files + git commit --amend # Do amended commit + git push --force # Overwrite your branch + ``` ## Licensing From 5d39eadde1484007c61cf0e6588c790121e6e486 Mon Sep 17 00:00:00 2001 From: Igor Shubovych Date: Sun, 3 Jan 2016 14:45:57 +0200 Subject: [PATCH 78/78] Linting --- pages/linux/timedatectl.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/pages/linux/timedatectl.md b/pages/linux/timedatectl.md index 1327cf66fe..7d720139e4 100644 --- a/pages/linux/timedatectl.md +++ b/pages/linux/timedatectl.md @@ -1 +1,19 @@ -# timedatectl > Control the system time and date - To check the current system clock time `timedatectl` - To set the local time of the system clock directly `timedatectl set-time {{"yyyy-MM-dd hh:mm:ss"}}` - To list available timezones `timedatectl list-timezones` - To change timezones `timedatectl set-timezone {{timezone}}` \ No newline at end of file +# timedatectl + +> Control the system time and date + +- To check the current system clock time + +`timedatectl` + +- To set the local time of the system clock directly + +`timedatectl set-time {{"yyyy-MM-dd hh:mm:ss"}}` + +- To list available timezones + +`timedatectl list-timezones` + +- To change timezones + +`timedatectl set-timezone {{timezone}}`