From 58cec2619dcd4eb64348bbb4843e22c544b98ebd Mon Sep 17 00:00:00 2001 From: Igor Shubovych Date: Wed, 23 Dec 2015 15:30:24 +0200 Subject: [PATCH 01/69] fortune: add page --- pages/common/fortune.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 pages/common/fortune.md diff --git a/pages/common/fortune.md b/pages/common/fortune.md new file mode 100644 index 000000000..e3327f05f --- /dev/null +++ b/pages/common/fortune.md @@ -0,0 +1,27 @@ +# fortune + +> Print a random quotation (fortune-cookie style) + +- Print a quotation + +`fortune` + +- Print a quotation from a given database + +`fortune {{database}}` + +- Print a list of quotation databases + +`fortune -f` + +- Print an offensive quotation + +`fortune -o` + +- Print a long quotation + +`fortune -l` + +- Print a short quotation + +`fortune -s` From b590b10dbd9f6ddf03665a94649e3692e456ff47 Mon Sep 17 00:00:00 2001 From: SushiDude Date: Tue, 29 Dec 2015 09:47:46 -0500 Subject: [PATCH 02/69] There is no need to have pacman force a refresh of all package lists. https://wiki.archlinux.org/index.php/Pacman#Upgrading_packages --- pages/linux/pacman.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/linux/pacman.md b/pages/linux/pacman.md index 8d32c0e57..fcff48f5b 100644 --- a/pages/linux/pacman.md +++ b/pages/linux/pacman.md @@ -4,7 +4,7 @@ - synchronize and update all packages -`pacman -Syyu` +`pacman -Syu` - install a new package From 3d7f9aebfa313cb7e91077dd17d53eb60726ee68 Mon Sep 17 00:00:00 2001 From: Alex Flores Date: Mon, 28 Dec 2015 23:25:31 -0500 Subject: [PATCH 03/69] adds commands for working with images --- pages/common/docker.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pages/common/docker.md b/pages/common/docker.md index 961946ee9..56d47f152 100644 --- a/pages/common/docker.md +++ b/pages/common/docker.md @@ -18,3 +18,11 @@ - Stop a container `docker stop {{container}}` + +- Start a container from an image and get a shell inside of it + +`docker run -it {{image}} bash` + +- Run a command inside of an already running container + +`docker exec {{container}} {{command}}` From 775a858aa6feba44fa3ca7c48637489ad7d74a6e Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 30 Dec 2015 16:30:37 -0500 Subject: [PATCH 04/69] 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 000000000..cfa3cd7f4 --- /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 44eb0501023a5eb2f2263089e2406332faf35c0e Mon Sep 17 00:00:00 2001 From: Igor Shubovych Date: Wed, 23 Dec 2015 15:02:45 +0200 Subject: [PATCH 05/69] 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 000000000..b7efaba8b --- /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 06/69] 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 cfa3cd7f4..7ba7035d8 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 d5f8b3f4275f341fe4f6863b79519ade3d56b31a Mon Sep 17 00:00:00 2001 From: Harry Terkelsen Date: Wed, 30 Dec 2015 22:11:45 -0800 Subject: [PATCH 07/69] Add Dart client to README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6f5a66e0d..0f681f3da 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 29717aac4cea0897bcf127347c41c076fac47907 Mon Sep 17 00:00:00 2001 From: 85pando <85pando@googlemail.com> Date: Thu, 31 Dec 2015 12:20:13 +0100 Subject: [PATCH 08/69] 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 000000000..ae2f5a5ec --- /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 09/69] 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 6a5927eda..784f24245 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 e4ebbe043..ddf4893e7 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 4044e9275..b11b24759 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 249d9d58a..6ae128e8f 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 fb7c4e116..7937c861f 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 b807d87b6..592179bc2 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 10/69] 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 ed4c36a6c..abc0269c4 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 11/69] 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 000000000..c796082a5 --- /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 12/69] 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 a2c104008..b2eae54dc 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 13/69] 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 0f681f3da..afe362d3f 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 14/69] 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 000000000..b7973d1c9 --- /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 15/69] 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 000000000..727764b53 --- /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 16/69] 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 000000000..d6121443b --- /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 17/69] 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 c796082a5..90b44a63e 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 18/69] 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 b7973d1c9..b5ef0f4bf 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 19/69] 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 8768690f2..750a5f69d 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 20/69] Add Rust client to README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index afe362d3f..226a98804 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 21/69] 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 22/69] 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 000000000..ff0bf86c4 --- /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 23/69] 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 000000000..1327cf66f --- /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 24/69] 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 000000000..4def52df4 --- /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 25/69] Improve Contributing Guidelines --- CONTRIBUTING.md | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0f7a1de0e..f4941afa6 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 26/69] 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 1327cf66f..7d720139e 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}}` From 41f5b4603a018ca4a2345339d549240b1c6f1dc9 Mon Sep 17 00:00:00 2001 From: Igor Shubovych Date: Sun, 3 Jan 2016 15:34:57 +0200 Subject: [PATCH 27/69] Mention similar (related) projects in README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 226a98804..c2f8698d4 100644 --- a/README.md +++ b/README.md @@ -69,3 +69,9 @@ Let us know if you are building one and we can add it to this list! Contributions are most welcome! Have a look at the [contributing guidelines](https://github.com/tldr-pages/tldr/blob/master/CONTRIBUTING.md) and go ahead! + +## Similar projects + +- [Cheat](https://github.com/chrisallenlane/cheat) allows you to create and view interactive cheatsheets on the command-line. It was designed to help remind *nix system administrators of options for commands that they use frequently, but not frequently enough to remember. + +- [Bro pages](http://bropages.org/) are a highly readable supplement to man pages. Bro pages show concise, common-case examples for Unix commands. From c016a93b7babc5eee3177a3b4df9215de60aef25 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Mon, 4 Jan 2016 03:17:07 +0900 Subject: [PATCH 28/69] strace: add -T example --- pages/linux/strace.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/linux/strace.md b/pages/linux/strace.md index c50915d40..4e17a77f0 100644 --- a/pages/linux/strace.md +++ b/pages/linux/strace.md @@ -13,3 +13,7 @@ - Count time, calls, and errors for each system call and report a summary on program exit. `strace -p {{pid}} -c` + +- Show the time spent in every system call + +`strace -p {{pid}} -T` From ce3982007f674e070f15f5f19178837b26c11aff Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 3 Jan 2016 23:53:15 +0100 Subject: [PATCH 29/69] Add another Rust client to the list @rilut beat me to it :) Here's another Rust client that aims to support offline caching, the way the NodeJS client does it. Maybe we can merge the two clients somehow (rilut/rust-tldr#1), otherwise they can coexist as they have a different focus: One fetches the pages from the net on each command invocation, the other does local caching. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 226a98804..e295285c4 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,9 @@ 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` +- Rust clients: + - [rust-tldr](https://github.com/rilut/rust-tldr) (online lookup): `cargo install tldr` + - [tldr-rs](https://github.com/dbrgn/tldr-rs) (offline caching, not yet published) - [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 f3c40e2fe03fea924a766f1731a801a9d4239841 Mon Sep 17 00:00:00 2001 From: Dylan Rees Date: Sun, 3 Jan 2016 21:17:33 -0500 Subject: [PATCH 30/69] Create su.md --- pages/common/su.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 pages/common/su.md diff --git a/pages/common/su.md b/pages/common/su.md new file mode 100644 index 000000000..885ab59c8 --- /dev/null +++ b/pages/common/su.md @@ -0,0 +1,11 @@ +# su + +> switch shell to another user + +- Switch to user {{username}} (password required): + +`su {{username}}` + +- Switch to superuser (admin password required): + +`su` From 17a6fb99b3c64b28f4a8b55c7bede1443d061f3b Mon Sep 17 00:00:00 2001 From: Parth Mehrotra Date: Sun, 3 Jan 2016 23:11:03 -0500 Subject: [PATCH 31/69] Head args are supposed to be in bytes rather than KB commit 32490f087fce93beadae3c59b10c1b8200734106 Author: Parth Mehrotra Date: Sun Jan 3 23:09:09 2016 -0500 replaced spaces with underscores commit 51c680741e497aa891848e2008f55e5c316c18f0 Author: Parth Mehrotra Date: Sat Jan 2 22:23:37 2016 -0500 head args are supposed to be in bytes, rather thank KB commit 52e1aefe5bdcf05084222ec2c184bdd5ff96cc8e Author: Parth Mehrotra Date: Sat Jan 2 13:31:56 2016 -0500 head args aren't in bytes --- pages/linux/head.md | 8 ++++---- pages/osx/head.md | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pages/linux/head.md b/pages/linux/head.md index 192145d47..948b8f84b 100644 --- a/pages/linux/head.md +++ b/pages/linux/head.md @@ -4,16 +4,16 @@ - Output the first few lines of a file -`head -n {{count of lines}} {{filename}}` +`head -n {{count_of_lines}} {{filename}}` - Output the first few bytes of a file -`head -c {{size in kilobytes}} {{filename}}` +`head -c {{size_in_bytes}} {{filename}}` - Output everything but the last few lines of a file -`head -n -{{count of lines}} {{filename}}` +`head -n -{{count_of_lines}} {{filename}}` - Output everything but the last few bytes of a file -`head -c -{{size in kilobytes}} {{filename}}` +`head -c -{{size_in_bytes}} {{filename}}` diff --git a/pages/osx/head.md b/pages/osx/head.md index f748591ca..16f5fba16 100644 --- a/pages/osx/head.md +++ b/pages/osx/head.md @@ -4,8 +4,8 @@ - Output the first few lines of a file -`head -n {{count of lines}} {{filename}}` +`head -n {{count_of_lines}} {{filename}}` - Output the first few bytes of a file -`head -c {{number in kilobytes}} {{filename}}` +`head -c {{number_in_bytes}} {{filename}}` From d2b681ad9d6b450c46c03012bb398e7c37ccde3e Mon Sep 17 00:00:00 2001 From: Igor Shubovych Date: Mon, 4 Jan 2016 09:50:18 +0200 Subject: [PATCH 32/69] Removing MAINTAINERS, because we are not going to use lgtm.co in the nearest future --- MAINTAINERS | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 MAINTAINERS diff --git a/MAINTAINERS b/MAINTAINERS deleted file mode 100644 index b291a7397..000000000 --- a/MAINTAINERS +++ /dev/null @@ -1,6 +0,0 @@ -Romain Prieto (@rprieto) -Igor Shubovych (@igorshubovych) -Ruben Vereecken (@rubenvereecken) -Waldir Pimenta (@waldyrious) -Felix Yan (@felixonmars) -Leandro Ostera (@ostera) From bcf3b6b99748b5ce8aee61eb2f443db8d7d32367 Mon Sep 17 00:00:00 2001 From: marklee Date: Mon, 4 Jan 2016 18:27:47 +0800 Subject: [PATCH 33/69] mailx: add page --- pages/common/mailx.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 pages/common/mailx.md diff --git a/pages/common/mailx.md b/pages/common/mailx.md new file mode 100644 index 000000000..0e20c0012 --- /dev/null +++ b/pages/common/mailx.md @@ -0,0 +1,27 @@ +# mailx + +> Send and receive mail. + +- To send mail, the content is typed after the command and ended with Control-D + +`mailx -s "{{subject}}" {{to_addr}}` + +- Send mail with short content. + +`echo "{{content}}" | mailx -s "{{subject}}" {{to_addr}}` + +- Send mail with content which written in a file. + +`mailx -s "{{subject}}" {{to_addr}} < {{content.txt}}` + +- Send mail to a recipient and CC to another address. + +`mailx -s "{{subject}}" -c {{cc_addr}} {{to_addr}}` + +- Send mail and set sender address. + +`mailx -s "{{subject}}" -r {{from_addr}} {{to_addr}}` + +- Send mail with an attachment. + +`mailx -a {{file}} -s "{{subject}}" {{to_addr}}` From 31234c9e4bc28c0c9f64013c016c9a4025f52805 Mon Sep 17 00:00:00 2001 From: Joe Archer Date: Mon, 4 Jan 2016 10:34:40 +0000 Subject: [PATCH 34/69] nginx: add -t example --- pages/common/nginx.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/common/nginx.md b/pages/common/nginx.md index 4bbe43127..65cd778a3 100644 --- a/pages/common/nginx.md +++ b/pages/common/nginx.md @@ -13,3 +13,7 @@ - Start server with a prefix for all relative paths in config file `nginx -c {{config_file}} -p {{prefix/for/relative/paths}}` + +- Test configuration without affecting the running server + +`nginx -t` From 1e936f5388e6f4850d45b429e6f6d2653846e452 Mon Sep 17 00:00:00 2001 From: sabour_f Date: Mon, 4 Jan 2016 11:23:09 +0100 Subject: [PATCH 35/69] make: add page --- pages/common/make.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 pages/common/make.md diff --git a/pages/common/make.md b/pages/common/make.md new file mode 100644 index 000000000..05694fa93 --- /dev/null +++ b/pages/common/make.md @@ -0,0 +1,21 @@ +# make + +> Task runner for rules described in Makefile. +> Mostly used to control the compilation of an executable from source code. + +- Call the all rule + +`make` + +- Call a specific rule + +`make {{rule}}` + +- Use specific Makefile + +`make -f {{file}}` + +- Execute make from another directory + +`make -C {{directory}}` + From eff4eae123ace271e975157da8e83d6ce74ad98c Mon Sep 17 00:00:00 2001 From: Shoichi Kaji Date: Mon, 4 Jan 2016 22:55:37 +0900 Subject: [PATCH 36/69] add a perl5 client --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 226a98804..b365eb1e8 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,7 @@ You can access these pages on your computer using one of the following clients: - [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 +- [Perl5 client](https://github.com/shoichikaji/perl-tldr): `cpanm App::tldr` Let us know if you are building one and we can add it to this list! From 2827f15c69f924e6a3b2fcf13dcade24f1092cc6 Mon Sep 17 00:00:00 2001 From: kumon Date: Tue, 5 Jan 2016 00:15:09 +0900 Subject: [PATCH 37/69] Added ionice --- pages/common/ionice.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 pages/common/ionice.md diff --git a/pages/common/ionice.md b/pages/common/ionice.md new file mode 100644 index 000000000..5cc37d429 --- /dev/null +++ b/pages/common/ionice.md @@ -0,0 +1,15 @@ +# ionice + +> get/set program io scheduling class and priority + +- sets process with PID 89 as an idle io process + +`ionice -c 3 -p 89` + +- runs 'bash' as a best-effort program with highest priority + +`ionice -c 2 -n 0 bash` + +- prints the class and priority of the processes with PID 89 + +`ionice -p 89` From 99ad79e207f6508e05cbc496788fdbb6bf62c0d2 Mon Sep 17 00:00:00 2001 From: Aarin Smith Date: Mon, 4 Jan 2016 10:29:19 -0800 Subject: [PATCH 38/69] Added page for Sass --- pages/common/sass.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 pages/common/sass.md diff --git a/pages/common/sass.md b/pages/common/sass.md new file mode 100644 index 000000000..71e49b95b --- /dev/null +++ b/pages/common/sass.md @@ -0,0 +1,12 @@ +# Sass + +> Converts SCSS or Sass files to CSS +> .scss and .sass can be used interchangeably in below examples depending on your preferred syntax + +- Immediately one time convert SCSS or Sass file to CSS + +`sass {{inputfile}}.scss:{{outputfile}}.css` + +- Watch SCSS or Sass file for changes and update CSS file + +`sass --watch {{inputfile}}.scss:{{outputfile}}.css` \ No newline at end of file From a46d450306cc4a5d1c37fd548bb5ce8383fc9d79 Mon Sep 17 00:00:00 2001 From: kuanyui Date: Tue, 5 Jan 2016 02:32:04 +0800 Subject: [PATCH 39/69] Add linux/zypper --- pages/linux/zypper.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 pages/linux/zypper.md diff --git a/pages/linux/zypper.md b/pages/linux/zypper.md new file mode 100644 index 000000000..5cd58e8a2 --- /dev/null +++ b/pages/linux/zypper.md @@ -0,0 +1,23 @@ +# zypper + +> SUSE & openSUSE package management utility + +- Synchronize list of packages and versions available. + +`zypper refresh` + +- install a new package + +`zypper install {{package}}` + +- remove a package + +`zypper remove {{package}}` + +- Upgrade installed packages to newest available versions + +`zypper update` + +- Search package via keyword + +`zypper search {{keyword}}` From b8b02811d625a20954d12b9441f784047c74d2b2 Mon Sep 17 00:00:00 2001 From: Aarin Smith Date: Mon, 4 Jan 2016 10:33:52 -0800 Subject: [PATCH 40/69] Add sass page --- pages/common/sass.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/common/sass.md b/pages/common/sass.md index 71e49b95b..4025dc886 100644 --- a/pages/common/sass.md +++ b/pages/common/sass.md @@ -1,7 +1,7 @@ # Sass > Converts SCSS or Sass files to CSS -> .scss and .sass can be used interchangeably in below examples depending on your preferred syntax +> .scss and .sass can be used interchangeably in below examples depending on your preference - Immediately one time convert SCSS or Sass file to CSS @@ -9,4 +9,4 @@ - Watch SCSS or Sass file for changes and update CSS file -`sass --watch {{inputfile}}.scss:{{outputfile}}.css` \ No newline at end of file +`sass --watch {{inputfile}}.scss:{{outputfile}}.css` From 0b1f296b875d4ae709cbbe61340953f0d973e4e6 Mon Sep 17 00:00:00 2001 From: Aarin Smith Date: Mon, 4 Jan 2016 12:21:59 -0800 Subject: [PATCH 41/69] Updated sass to documented syntax. Added commands for non-specified naming Signed-off-by: Aarin Smith --- pages/common/sass.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pages/common/sass.md b/pages/common/sass.md index 4025dc886..a4d349b32 100644 --- a/pages/common/sass.md +++ b/pages/common/sass.md @@ -3,10 +3,18 @@ > Converts SCSS or Sass files to CSS > .scss and .sass can be used interchangeably in below examples depending on your preference -- Immediately one time convert SCSS or Sass file to CSS +- Immediately convert scss file and output css with same filename -`sass {{inputfile}}.scss:{{outputfile}}.css` +`sass {{inputfile}}.scss` -- Watch SCSS or Sass file for changes and update CSS file +- Immediately convert SCSS or Sass file to CSS to specified output file -`sass --watch {{inputfile}}.scss:{{outputfile}}.css` +`sass {{inputfile}}.scss {{outputfile}}.css` + +- Watch SCSS or Sass file for changes and output or update CSS file with same filename + +`sass --watch {{inputfile}}.scss` + +- Watch SCSS or Sass file for changes and output or update CSS file with specified filename + +`sass --watch {{inputfile}}.scss:{{outputfile}}.css` \ No newline at end of file From 38de59f8cd2e8b8f65bddd204b3b441c5e8fe1af Mon Sep 17 00:00:00 2001 From: Ivan Miskovic Date: Tue, 5 Jan 2016 13:29:24 +1300 Subject: [PATCH 42/69] vim doc grammar fix Changed `a programmers text editor` to `a programmer's text editor` --- pages/common/vim.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/vim.md b/pages/common/vim.md index c2dd198de..14ed709da 100644 --- a/pages/common/vim.md +++ b/pages/common/vim.md @@ -1,6 +1,6 @@ # vim -> Vi IMproved, a programmers text editor +> Vi IMproved, a programmer's text editor - open a file with cursor at the given line number From 01ab02d1eff7c0739617af79d733a3236e58dca6 Mon Sep 17 00:00:00 2001 From: sabour_f Date: Mon, 4 Jan 2016 20:55:14 +0100 Subject: [PATCH 43/69] bash: add page --- pages/common/bash.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 pages/common/bash.md diff --git a/pages/common/bash.md b/pages/common/bash.md new file mode 100644 index 000000000..4174bd4bf --- /dev/null +++ b/pages/common/bash.md @@ -0,0 +1,20 @@ +# bash + +> Bourne-Again SHell +> `sh`-compatible command line interpreter. + +- Start interactive command line interpreter + +`bash` + +- Execute command passed as parameter + +`bash -c {{command}}` + +- Run commands from file (script) + +`bash {{file}}` + +- Run commands from file and print them as they are executed + +`bash -x {{file}}` From f87170536f9b44e397137a9f8fd8341a68aa8402 Mon Sep 17 00:00:00 2001 From: Gergely Imreh Date: Tue, 5 Jan 2016 10:19:53 +0800 Subject: [PATCH 44/69] linux/pacman: add more useful commands --- pages/linux/pacman.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pages/linux/pacman.md b/pages/linux/pacman.md index 8d32c0e57..84e88c6f9 100644 --- a/pages/linux/pacman.md +++ b/pages/linux/pacman.md @@ -25,3 +25,11 @@ - list only the explicitly installed packages and versions `pacman -Qe` + +- find which package owns a certain file + +`pacman -Qo filename` + +- empty package cache to free up space + +`pacman -Scc` From 53ac09746b185734c0d0888535c37c3585a2ce0f Mon Sep 17 00:00:00 2001 From: kumon Date: Tue, 5 Jan 2016 11:24:03 +0900 Subject: [PATCH 45/69] Add class & level details and update usage. --- pages/common/ionice.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/pages/common/ionice.md b/pages/common/ionice.md index 5cc37d429..33b05e67e 100644 --- a/pages/common/ionice.md +++ b/pages/common/ionice.md @@ -1,15 +1,17 @@ # ionice -> get/set program io scheduling class and priority +> Get or set program I/O scheduling class and priority. +> Scheduling classes: 1(realtime), 2(best-effort), 3(idle). +> Priority levels: 0(the highest) - 7(the lowest). -- sets process with PID 89 as an idle io process +- Set I/O scheduling class of a running process -`ionice -c 3 -p 89` +`ionice -c {{scheduling_class}} -p {{pid}}` -- runs 'bash' as a best-effort program with highest priority +- Run a command with altered I/O scheduling class and priority -`ionice -c 2 -n 0 bash` +`ionice -c {{scheduling_class}} -n {{priority}} {{command}}` -- prints the class and priority of the processes with PID 89 +- Print the I/O scheduling class and priority of a running process -`ionice -p 89` +`ionice -p {{pid}}` From b0adce01cbd1813b23fb4bee63b86a146df93ca0 Mon Sep 17 00:00:00 2001 From: Antonio Date: Tue, 5 Jan 2016 00:30:21 -0500 Subject: [PATCH 46/69] grep: add line number --- pages/common/grep.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/common/grep.md b/pages/common/grep.md index 8b1a2ed37..e25f44842 100644 --- a/pages/common/grep.md +++ b/pages/common/grep.md @@ -23,6 +23,10 @@ `grep -c {{something}} {{file_path}}` +- print line number for each match + +`grep -n {{something}} {{file_path}}` + - use the standard input instead of a file `cat {{file_path}} | grep {{something}}` From b02eda97a5a68ec9de6e389f57c0b7ca16f7def3 Mon Sep 17 00:00:00 2001 From: Cvetomird91 Date: Tue, 5 Jan 2016 00:17:45 +0200 Subject: [PATCH 47/69] removed typo - changed witch to with --- pages/linux/jobs.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 pages/linux/jobs.md diff --git a/pages/linux/jobs.md b/pages/linux/jobs.md new file mode 100644 index 000000000..351ac6330 --- /dev/null +++ b/pages/linux/jobs.md @@ -0,0 +1,27 @@ +# jobs + +> BASH builtin for viewing information about processes spawned by the current shell. + +- view jobs spawned by the current shell + +`jobs` + +- list jobs and their process ids + +`jobs -l` + +- display information about jobs with changed status + +`jobs -n` + +- display process id of process group leader + +`jobs -p` + +- display running processes + +`jobs -r` + +- display stopped processes + +`jobs -s` From 3fb81447ca12bc903bab0d1f45ae275700a3c7c3 Mon Sep 17 00:00:00 2001 From: kuanyui Date: Tue, 5 Jan 2016 15:18:22 +0800 Subject: [PATCH 48/69] Capitalize first character. --- pages/linux/zypper.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/linux/zypper.md b/pages/linux/zypper.md index 5cd58e8a2..cb012779d 100644 --- a/pages/linux/zypper.md +++ b/pages/linux/zypper.md @@ -2,15 +2,15 @@ > SUSE & openSUSE package management utility -- Synchronize list of packages and versions available. +- Synchronize list of packages and versions available `zypper refresh` -- install a new package +- Install a new package `zypper install {{package}}` -- remove a package +- Remove a package `zypper remove {{package}}` From 0c8ec98b756201e3475c63ceaeafb8b58abf6e6e Mon Sep 17 00:00:00 2001 From: Joel Huang Date: Tue, 5 Jan 2016 09:03:43 +0800 Subject: [PATCH 49/69] git-svn: add page --- pages/common/git-svn.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 pages/common/git-svn.md diff --git a/pages/common/git-svn.md b/pages/common/git-svn.md new file mode 100644 index 000000000..4ceb825d5 --- /dev/null +++ b/pages/common/git-svn.md @@ -0,0 +1,15 @@ +# git svn + +> Bidirectional operation between a Subversion repository and Git + +- clone an SVN repository + +`git svn clone {{http://example.com/my_subversion_repo}} {{local_dir}}` + +- update local clone from the upstream SVN repository + +`git svn rebase` + +- commit back to SVN repository + +`git svn dcommit` From 3d6b4aed47c5bc3acf3309f016988f8475a46aeb Mon Sep 17 00:00:00 2001 From: kumon Date: Tue, 5 Jan 2016 19:45:42 +0900 Subject: [PATCH 50/69] improve description --- pages/common/ionice.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/common/ionice.md b/pages/common/ionice.md index 33b05e67e..0886354e4 100644 --- a/pages/common/ionice.md +++ b/pages/common/ionice.md @@ -1,14 +1,14 @@ # ionice > Get or set program I/O scheduling class and priority. -> Scheduling classes: 1(realtime), 2(best-effort), 3(idle). -> Priority levels: 0(the highest) - 7(the lowest). +> Scheduling classes: 1 (realtime), 2 (best-effort), 3 (idle). +> Priority levels: 0 (the highest) - 7 (the lowest). - Set I/O scheduling class of a running process `ionice -c {{scheduling_class}} -p {{pid}}` -- Run a command with altered I/O scheduling class and priority +- Run a command with custom I/O scheduling class and priority `ionice -c {{scheduling_class}} -n {{priority}} {{command}}` From 45e74285a3d82bd114af4659dc8782501b613c7b Mon Sep 17 00:00:00 2001 From: Joel Huang Date: Tue, 5 Jan 2016 09:06:05 +0800 Subject: [PATCH 51/69] unrar: add page --- pages/common/unrar.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 pages/common/unrar.md diff --git a/pages/common/unrar.md b/pages/common/unrar.md new file mode 100644 index 000000000..1dfdb09bf --- /dev/null +++ b/pages/common/unrar.md @@ -0,0 +1,19 @@ +# unrar + +> Extract RAR archives + +- extract files into current directory, losing directory structure in the archive + +`unrar e {{compressed.rar}}` + +- extract files with original directory structure + +`unrar x {{compressed.rar}}` + +- test integrity of each file inside the archive file + +`unrar t {{compressed.rar}}` + +- list files inside the archive file without decompressing it + +`unrar l {{compressed.rar}}` From 7459888c0c10b143a8ba27c4a691e837317d9b2a Mon Sep 17 00:00:00 2001 From: Joel Huang Date: Tue, 5 Jan 2016 09:02:34 +0800 Subject: [PATCH 52/69] 7za: add page --- pages/common/7za.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 pages/common/7za.md diff --git a/pages/common/7za.md b/pages/common/7za.md new file mode 100644 index 000000000..0f75e9a32 --- /dev/null +++ b/pages/common/7za.md @@ -0,0 +1,19 @@ +# 7za + +> A file archiver with high compression ratio + +- compress directory or file + +`7za a {{compressed.7z}} {{directory_or_file_to_compress}}` + +- decompress an existing 7z file with original directory structure + +`7za x {{compressed.7z}}` + +- compress to zip format + +`7za a -tzip {{compressed.zip}} {{directory_or_file_to_compress}}` + +- create multipart 7zip file; `part_size` specifies part size in Bytes, Kilobytes, Megabytes or Gigabytes. + +`7za -v{{part_size}}{{[b|k|m|g]}} {{compressed.7z}} {{directory_or_file_to_compress}}` From d7ab35d47321a5d25e5962d5cba2993c9eeef0f9 Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Tue, 5 Jan 2016 17:31:30 +0000 Subject: [PATCH 53/69] unrar: reorder examples extracting with original directory structure is arguably a more common use case than extracting the files in a flattened manner --- pages/common/unrar.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/common/unrar.md b/pages/common/unrar.md index 1dfdb09bf..1f7e2d0b0 100644 --- a/pages/common/unrar.md +++ b/pages/common/unrar.md @@ -2,14 +2,14 @@ > Extract RAR archives -- extract files into current directory, losing directory structure in the archive - -`unrar e {{compressed.rar}}` - - extract files with original directory structure `unrar x {{compressed.rar}}` +- extract files into current directory, losing directory structure in the archive + +`unrar e {{compressed.rar}}` + - test integrity of each file inside the archive file `unrar t {{compressed.rar}}` From 71bf38c94e69a8979f3a0f6c83b1fb4bcc92a7d2 Mon Sep 17 00:00:00 2001 From: Aarin Smith Date: Tue, 5 Jan 2016 09:49:09 -0800 Subject: [PATCH 54/69] Updated sass scss file extensions. Corrected description for sass command with no output file. --- pages/common/sass.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pages/common/sass.md b/pages/common/sass.md index a4d349b32..cd6454fef 100644 --- a/pages/common/sass.md +++ b/pages/common/sass.md @@ -3,18 +3,18 @@ > Converts SCSS or Sass files to CSS > .scss and .sass can be used interchangeably in below examples depending on your preference -- Immediately convert scss file and output css with same filename +- Output converted file to stdout -`sass {{inputfile}}.scss` +`sass {{inputfile.(scss|sass)}}` - Immediately convert SCSS or Sass file to CSS to specified output file -`sass {{inputfile}}.scss {{outputfile}}.css` +`sass {{inputfile.(scss|sass)}} {{outputfile.css}}` - Watch SCSS or Sass file for changes and output or update CSS file with same filename -`sass --watch {{inputfile}}.scss` +`sass --watch {{inputfile.(scss|sass)}}` - Watch SCSS or Sass file for changes and output or update CSS file with specified filename -`sass --watch {{inputfile}}.scss:{{outputfile}}.css` \ No newline at end of file +`sass --watch {{inputfile.(scss|sass)}}:{{outputfile.css}}` \ No newline at end of file From 61634c9703b25814bbda639dbbdba57be664dad3 Mon Sep 17 00:00:00 2001 From: Denis Sokolov Date: Tue, 5 Jan 2016 20:37:25 +0200 Subject: [PATCH 55/69] ssh: remove quotes around remote command --- pages/common/ssh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/ssh.md b/pages/common/ssh.md index c34da4e26..446e51a08 100644 --- a/pages/common/ssh.md +++ b/pages/common/ssh.md @@ -17,7 +17,7 @@ - run a command on a remote server -`ssh {{remote_host}} "{{command -with -flags}}"` +`ssh {{remote_host}} {{command -with -flags}}` - ssh tunneling: dynamic port forwarding (SOCKS proxy on localhost:9999) From b1a3ac963157adf911a8c592e83a0c5506f92e34 Mon Sep 17 00:00:00 2001 From: Aarin Smith Date: Tue, 5 Jan 2016 11:16:13 -0800 Subject: [PATCH 56/69] Removed unnecessary sass vs scss line in overall description. --- pages/common/sass.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pages/common/sass.md b/pages/common/sass.md index cd6454fef..9a990e8fb 100644 --- a/pages/common/sass.md +++ b/pages/common/sass.md @@ -1,7 +1,6 @@ # Sass > Converts SCSS or Sass files to CSS -> .scss and .sass can be used interchangeably in below examples depending on your preference - Output converted file to stdout @@ -17,4 +16,4 @@ - Watch SCSS or Sass file for changes and output or update CSS file with specified filename -`sass --watch {{inputfile.(scss|sass)}}:{{outputfile.css}}` \ No newline at end of file +`sass --watch {{inputfile.(scss|sass)}}:{{outputfile.css}}` From 6d9e6405c4260ecb64e7b723b4115a12a641f26a Mon Sep 17 00:00:00 2001 From: kuanyui Date: Wed, 6 Jan 2016 04:20:01 +0800 Subject: [PATCH 57/69] Add tldr client for Emacs. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 008bae206..829a78504 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,7 @@ You can access these pages on your computer using one of the following clients: - [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 - [Perl5 client](https://github.com/shoichikaji/perl-tldr): `cpanm App::tldr` +- [Emacs client](https://github.com/kuanyui/tldr.el) Let us know if you are building one and we can add it to this list! From 5c694e6f9c61bf98c7065edaaa843350eed588a6 Mon Sep 17 00:00:00 2001 From: Denis Sokolov Date: Tue, 5 Jan 2016 22:31:52 +0200 Subject: [PATCH 58/69] ln: remove note about hard links for directories Hard links are generally not allowed for directories. --- pages/common/ln.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/ln.md b/pages/common/ln.md index c8a8590c2..327093102 100644 --- a/pages/common/ln.md +++ b/pages/common/ln.md @@ -14,6 +14,6 @@ `ln -sfT {{path/to/new/original/file}} {{path/to/folder/link}}` -- create a hard link to a file or folder +- create a hard link to a file `ln {{path/to/original/file}} {{path/to/link}}` From 5554a6d2a430f13130d6f9e5747540e9cb4c41ad Mon Sep 17 00:00:00 2001 From: Denis Sokolov Date: Tue, 5 Jan 2016 23:18:49 +0200 Subject: [PATCH 59/69] ln: remove overwrite option for directories -T is not present on my system, and the behavior itself is completely unintuitive. How exactly do you overwrite a directory? Do you recursively delete its children? --- pages/common/ln.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pages/common/ln.md b/pages/common/ln.md index c8a8590c2..027f8928d 100644 --- a/pages/common/ln.md +++ b/pages/common/ln.md @@ -10,10 +10,6 @@ `ln -sf {{path/to/new/original/file}} {{path/to/file/link}}` -- overwrite a symbolic link to a folder - -`ln -sfT {{path/to/new/original/file}} {{path/to/folder/link}}` - - create a hard link to a file or folder `ln {{path/to/original/file}} {{path/to/link}}` From 1fbc6d3ae26a941ee4796ebf57736047d541fb06 Mon Sep 17 00:00:00 2001 From: Shaun Jackman Date: Tue, 5 Jan 2016 19:26:04 -0800 Subject: [PATCH 60/69] README.md: Shorten brew installation instructions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 829a78504..833ddfb0b 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ You can access these pages on your computer using one of the following clients: - [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 not yet available) -- [C++ client](https://github.com/tldr-pages/tldr-cpp-client): `brew tap tldr-pages/tldr && brew install tldr` +- [C++ client](https://github.com/tldr-pages/tldr-cpp-client): `brew install tldr-pages/tldr/tldr` - 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) From 875e59f44b1685c1b7308191a654d05bdbcc4999 Mon Sep 17 00:00:00 2001 From: SeverinFuerbringer Date: Tue, 5 Jan 2016 20:54:50 +0100 Subject: [PATCH 61/69] nethogs: add page Added sudo --- pages/linux/nethogs.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 pages/linux/nethogs.md diff --git a/pages/linux/nethogs.md b/pages/linux/nethogs.md new file mode 100644 index 000000000..f40209583 --- /dev/null +++ b/pages/linux/nethogs.md @@ -0,0 +1,19 @@ +# nethogs + +> Monitor bandwidth usage per process + +- Start nethogs as root (default device is eth0) + +`sudo nethogs` + +- Monitor bandwidth on specific device + +`sudo nethogs {{device}}` + +- Monitor bandwidth on multiple devices + +`sudo nethogs {{device1}} {{device2}}` + +- Specify refresh rate + +`sudo nethogs -t {{seconds}}` From 16d9553b6c5d91ad0a707a34e81a384775c7cef2 Mon Sep 17 00:00:00 2001 From: Maks Makrovets Date: Wed, 6 Jan 2016 13:05:23 +0200 Subject: [PATCH 62/69] curl: fix example according to style guide. --- pages/common/curl.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/curl.md b/pages/common/curl.md index d0ee68265..b7cbd8504 100644 --- a/pages/common/curl.md +++ b/pages/common/curl.md @@ -5,7 +5,7 @@ - Download a URL to a file -`curl "{{URL}}" -o filename` +`curl "{{URL}}" -o {{filename}}` - send form-encoded data From 459ae43490b424c488cb4885822df49fbf8a629e Mon Sep 17 00:00:00 2001 From: Ruben Vereecken Date: Wed, 6 Jan 2016 13:38:13 +0100 Subject: [PATCH 63/69] Added dpkg-query to linux --- pages/linux/dpkg-query.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 pages/linux/dpkg-query.md diff --git a/pages/linux/dpkg-query.md b/pages/linux/dpkg-query.md new file mode 100644 index 000000000..a7e9c778e --- /dev/null +++ b/pages/linux/dpkg-query.md @@ -0,0 +1,19 @@ +# dpkg-query + +> A tool that shows information about installed packages. + +- List all installed packages. + +`dpkg-query -l` + +- List installed packages matching a pattern. + +`dpkg-query -l '{{pattern}}'` + +- List all files installed by a package. + +`dpkg-query -L {{package_name}}` + +- Show information about a package. + +`dpkg-query -s {{package_name}}` From 56367535e0202a21c010edbfbd61400b2fe3d8d1 Mon Sep 17 00:00:00 2001 From: Igor Shubovych Date: Wed, 6 Jan 2016 14:53:18 +0200 Subject: [PATCH 64/69] Adding Bash client --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 833ddfb0b..ab956975f 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ You can access these pages on your computer using one of the following clients: - [Web client](https://github.com/ostera/tldr.jsx): https://ostera.github.io/tldr.jsx - [Perl5 client](https://github.com/shoichikaji/perl-tldr): `cpanm App::tldr` - [Emacs client](https://github.com/kuanyui/tldr.el) +- [Bash client](https://github.com/raylee/tldr) Let us know if you are building one and we can add it to this list! From 5bbc71e9cf0d8786e0d47050d06322eb559f45f3 Mon Sep 17 00:00:00 2001 From: lagel Date: Wed, 6 Jan 2016 14:18:54 +0800 Subject: [PATCH 65/69] Add adb commands --- pages/common/adb.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 pages/common/adb.md diff --git a/pages/common/adb.md b/pages/common/adb.md new file mode 100644 index 000000000..59c4ec967 --- /dev/null +++ b/pages/common/adb.md @@ -0,0 +1,19 @@ +# Android Debug Bridge + +> Communicate with an Android emulator instance or connected Android devices + +- Check whether the adb server process is running and start it + +`adb start-server` + +- Terminate the adb server process + +`adb kill-server` + +- Start a remote shell in the target emulator/device instance + +`adb shell` + +- Push an Android application to an emulator/device + +`adb install -r {{apk.path}}` From 3e355c7f366a8bbffc1bb32613e08591b54b15c5 Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Wed, 6 Jan 2016 22:30:53 +0530 Subject: [PATCH 66/69] tcpdump: fixed syntax error and added better params --- pages/common/tcpdump.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/common/tcpdump.md b/pages/common/tcpdump.md index 8a62767a1..f3e427d11 100644 --- a/pages/common/tcpdump.md +++ b/pages/common/tcpdump.md @@ -14,9 +14,9 @@ `tcpdump host {{www.example.com}}` -- capture the traffic from a specific interface, source, destination and port +- capture the traffic from a specific interface, source, destination and destination port -`tcpdump -i {{eth0}} src {{192.168.1.1}} dest {{192.168.1.2}} and port 80` +`tcpdump -i {{eth0}} src {{192.168.1.1}} and dst {{192.168.1.2}} and dst port 80` - capture the traffic of a network From 186d3f2e25f25c0a30e51e84f11cde10fa79d120 Mon Sep 17 00:00:00 2001 From: Kyle Kamperschroer Date: Tue, 5 Jan 2016 10:09:12 -0800 Subject: [PATCH 67/69] Add mocha.md --- pages/common/mocha.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 pages/common/mocha.md diff --git a/pages/common/mocha.md b/pages/common/mocha.md new file mode 100644 index 000000000..53fdc2109 --- /dev/null +++ b/pages/common/mocha.md @@ -0,0 +1,23 @@ +# mocha + +> Execute Mocha JavaScript test runner + +- Run tests with default configuration or as configured in `mocha.opts` + +`mocha` + +- Run tests contained at a specific location + +`mocha {{folder/with/tests}}` + +- Run tests that match a specific grep pattern + +`mocha --grep {{^regex$}}` + +- Run tests on changes to JavaScript files in the current directory and once initially + +`mocha --watch` + +- Run tests with a specific reporter + +`mocha --reporter {{reporter}}` From 6a9e8533dca3c33e4ebcd40fee9ebd6a199a9b2b Mon Sep 17 00:00:00 2001 From: Miguel Palhas Date: Wed, 6 Jan 2016 19:23:32 +0000 Subject: [PATCH 68/69] Add pass command http://www.passwordstore.org/ --- pages/common/pass.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 pages/common/pass.md diff --git a/pages/common/pass.md b/pages/common/pass.md new file mode 100644 index 000000000..f12fde24f --- /dev/null +++ b/pages/common/pass.md @@ -0,0 +1,28 @@ +# pass + +> safely store and read passwords or other sensitive data easily +> all data is GPG-encrypted, and managed with a git repository + +- initialize the storage using a gpg-id for encryption + +`pass init {{gpg_id}}` + +- save a new password (prompts you for the value without echoing it) + +`pass insert {{path/to/data}}` + +- copy a password (first line of the data file) to the clipboard + +`pass -c {{path/to/data}}` + +- list the whole store tree + +`pass` + +- generate a new random password with a given length, and copy it to the clipboard + +`pass generate -c {{path/to/data}} {{num}}` + +- run any git command against the underlying store repository + +`pass git {{git-arguments}}` From 85355d1ed6b22cdbdda166cc27874c153bbac765 Mon Sep 17 00:00:00 2001 From: Joel Huang Date: Tue, 5 Jan 2016 09:32:37 +0800 Subject: [PATCH 69/69] enca: add page --- pages/common/enca.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 pages/common/enca.md diff --git a/pages/common/enca.md b/pages/common/enca.md new file mode 100644 index 000000000..b19308a74 --- /dev/null +++ b/pages/common/enca.md @@ -0,0 +1,19 @@ +# enca + +> Detect and convert encoding of text files + +- detect file(s) encoding according to your system's locale + +`enca {{file(s)}}` + +- detect file(s) encoding; -L option tells enca the current language; language is in the POSIX/C locale format, e.g. zh_CN, en_US etc. + +`enca -L {{language}} {{file(s)}}` + +- convert file(s) to specified encoding + +`enca -L {{language}} -x {{to_encoding}} {{file(s)}}` + +- save original_file as new_file and convert new_file to specified encoding + +`enca -L {{language}} -x {{to_encoding}} < {{original_file}} > {{new_file}}`