diff --git a/pages.cn/common/7z.md b/pages.cn/common/7z.md deleted file mode 100644 index fd94d72b9..000000000 --- a/pages.cn/common/7z.md +++ /dev/null @@ -1,31 +0,0 @@ -# 7z - -> A file archiver with high compression ratio. - -- Archive a file or folder: - -`7z a {{archived.7z}} {{path/to/file}}` - -- Encrypt an existing archive (including headers): - -`7z a {{encrypted.7z}} -p{{password}} -mhe {{archived.7z}}` - -- Extract an existing 7z file with original directory structure: - -`7z x {{archived.7z}}` - -- Extract an archive with user-defined output path: - -`7z x {{archived.7z}} -o{{path/to/output}}` - -- Archive using a specific archive type: - -`7z a -t {{zip|gzip|bzip2|tar|...}} {{archived.7z}} {{path/to/file}}` - -- List available archive types: - -`7z i` - -- List the contents of an archive file: - -`7z l {{archived.7z}}` diff --git a/pages.cn/common/7za.md b/pages.cn/common/7za.md deleted file mode 100644 index 67d3b0a18..000000000 --- a/pages.cn/common/7za.md +++ /dev/null @@ -1,24 +0,0 @@ -# 7za - -> A file archiver with high compression ratio. -> A standalone version of `7z` with support for fewer archive types. - -- Archive a file or folder: - -`7za a {{archived.7z}} {{path/to/file}}` - -- Extract an existing 7z file with original directory structure: - -`7za x {{archived}}` - -- Archive using a specific archive type: - -`7za a -t{{zip|gzip|bzip2|tar|...}} {{archived}} {{path/to/file}}` - -- List available archive types: - -`7za i` - -- List the contents of an archive file: - -`7za l {{archived}}` diff --git a/pages.cn/common/7zr.md b/pages.cn/common/7zr.md deleted file mode 100644 index 99f7044ad..000000000 --- a/pages.cn/common/7zr.md +++ /dev/null @@ -1,16 +0,0 @@ -# 7zr - -> A file archiver with high compression ratio. -> A standalone version of `7z` that only supports .7z files. - -- Archive a file or folder: - -`7zr a {{archived.7z}} {{path/to/file}}` - -- Extract an existing 7z file with original directory structure: - -`7zr x {{archived.7z}}` - -- List the contents of an archive file: - -`7zr l {{archived.7z}}` diff --git a/pages.cn/common/ab.md b/pages.cn/common/ab.md deleted file mode 100644 index 274dcf11f..000000000 --- a/pages.cn/common/ab.md +++ /dev/null @@ -1,19 +0,0 @@ -# ab - -> Apache Benchmarking tool. The simplest tool to perform a load testing. - -- Execute 100 HTTP GET requests to given URL: - -`ab -n {{100}} {{url}}` - -- Execute 100 HTTP GET requests, processing up to 10 requests concurrently, to given URL: - -`ab -n {{100}} -c {{10}} {{url}}` - -- Use keep alive: - -`ab -k {{url}}` - -- Set the maximum number of seconds to spend for benchmarking: - -`ab -t {{60}} {{url}}` diff --git a/pages.cn/common/abduco.md b/pages.cn/common/abduco.md deleted file mode 100644 index dbfef4eef..000000000 --- a/pages.cn/common/abduco.md +++ /dev/null @@ -1,23 +0,0 @@ -# abduco - -> Terminal session manager. - -- List sessions: - -`abduco` - -- Attach to a session, creating it if it doesn't exist: - -`abduco -A {{name}} {{bash}}` - -- Attach to a session with `dvtm`, creating it if it doesn't exist: - -`abduco -A {{name}}` - -- Detach from a session: - -`Ctrl + \` - -- Attach to a session in read-only mode: - -`abduco -Ar {{name}}` diff --git a/pages.cn/common/ack.md b/pages.cn/common/ack.md deleted file mode 100644 index 9ffed1806..000000000 --- a/pages.cn/common/ack.md +++ /dev/null @@ -1,19 +0,0 @@ -# ack - -> A search tool like grep, optimized for programmers. - -- Find files containing "foo": - -`ack {{foo}}` - -- Find files in a specific language: - -`ack --ruby {{each_with_object}}` - -- Count the total number of matches for the term "foo": - -`ack -ch {{foo}}` - -- Show the file names containing "foo" and number of matches in each file: - -`ack -cl {{foo}}` diff --git a/pages.cn/common/adb.md b/pages.cn/common/adb.md deleted file mode 100644 index 323c6fcf5..000000000 --- a/pages.cn/common/adb.md +++ /dev/null @@ -1,31 +0,0 @@ -# adb - -> 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 {{path/to/file.apk}}` - -- Copy a file/folder from the target device: - -`adb pull {{path/to/device_file_or_folder}} {{path/to/local_destination_folder}}` - -- Copy a file/folder to the target device: - -`adb push {{path/to/local_file_or_folder}} {{path/to/device_destination_folder}}` - -- Get a list of connected devices: - -`adb devices` diff --git a/pages.cn/common/ag.md b/pages.cn/common/ag.md deleted file mode 100644 index 204a23a12..000000000 --- a/pages.cn/common/ag.md +++ /dev/null @@ -1,31 +0,0 @@ -# ag - -> The Silver Searcher. Like ack, but faster. - -- Find files containing "foo", and print the line matches in context: - -`ag {{foo}}` - -- Find files containing "foo" in a specific directory: - -`ag {{foo}} {{path/to/folder}}` - -- Find files containing "foo", but only list the filenames: - -`ag -l {{foo}}` - -- Find files containing "FOO" case-insensitively, and print only the match, rather than the whole line: - -`ag -i -o {{FOO}}` - -- Find "foo" in files with a name matching "bar": - -`ag {{foo}} -G {{bar}}` - -- Find files whose contents match a regular expression: - -`ag '{{^ba(r|z)$}}'` - -- Find files with a name matching "foo": - -`ag -g {{foo}}` diff --git a/pages.cn/common/airpaste.md b/pages.cn/common/airpaste.md deleted file mode 100644 index 00fc49b47..000000000 --- a/pages.cn/common/airpaste.md +++ /dev/null @@ -1,23 +0,0 @@ -# airpaste - -> Share messages and files on the same network. - -- Wait for message and display when received: - -`airpaste` - -- Send text: - -`echo {{text}} | airpaste` - -- Send file: - -`airpaste < {{path/to/file}}` - -- Receive file: - -`airpaste > {{path/to/file}}` - -- Create/Join channel: - -`airpaste {{channel_name}}` diff --git a/pages.cn/common/alias.md b/pages.cn/common/alias.md deleted file mode 100644 index 99c9c3c8a..000000000 --- a/pages.cn/common/alias.md +++ /dev/null @@ -1,28 +0,0 @@ -# alias - -> Creates aliases -- words that are replaced by a command string. -> Aliases expire with the current shell session, unless they're defined in the shell's configuration file, e.g. `~/.bashrc`. - -- Create a generic alias: - -`alias {{word}}="{{command}}"` - -- View the command associated to a given alias: - -`alias {{word}}` - -- Remove an aliased command: - -`unalias {{word}}` - -- List all aliased words: - -`alias -p` - -- Turn rm into an interactive command: - -`alias {{rm}}="{{rm -i}}"` - -- Create `la` as a shortcut for `ls -a`: - -`alias {{la}}="{{ls -a}}"` diff --git a/pages.cn/common/ansible-galaxy.md b/pages.cn/common/ansible-galaxy.md deleted file mode 100644 index 5ce91bb76..000000000 --- a/pages.cn/common/ansible-galaxy.md +++ /dev/null @@ -1,23 +0,0 @@ -# ansible-galaxy - -> Create and manage Ansible roles. - -- Install a role: - -`ansible-galaxy install {{username.role_name}}` - -- Remove a role: - -`ansible-galaxy remove {{username.role_name}}` - -- List installed roles: - -`ansible-galaxy list` - -- Search for a given role: - -`ansible-galaxy search {{role_name}}` - -- Create a new role: - -`ansible-galaxy init {{role_name}}` diff --git a/pages.cn/common/ansible-playbook.md b/pages.cn/common/ansible-playbook.md deleted file mode 100644 index 74791d5cc..000000000 --- a/pages.cn/common/ansible-playbook.md +++ /dev/null @@ -1,19 +0,0 @@ -# ansible-playbook - -> Execute tasks defined in playbook on remote machines over SSH. - -- Run tasks in playbook: - -`ansible-playbook {{playbook}}` - -- Run tasks in playbook with custom host inventory: - -`ansible-playbook {{playbook}} -i {{inventory_file}}` - -- Run tasks in playbook with extra variables defined via the command line: - -`ansible-playbook {{playbook}} -e "{{variable1}}={{value1}} {{variable2}}={{value2}}"` - -- Run tasks in playbook with extra variables defined in a json file: - -`ansible-playbook {{playbook}} -e "@{{variables.json}}"` diff --git a/pages.cn/common/ansible.md b/pages.cn/common/ansible.md deleted file mode 100644 index d38ec6408..000000000 --- a/pages.cn/common/ansible.md +++ /dev/null @@ -1,28 +0,0 @@ -# ansible - -> Manage groups of computers remotely over SSH. -> Use the /etc/ansible/hosts file to add new groups/hosts. - -- List hosts belonging to a group: - -`ansible {{group}} --list-hosts` - -- Ping a group of hosts by invoking the ping module: - -`ansible {{group}} -m ping` - -- Display facts about a group of hosts by invoking the setup module: - -`ansible {{group}} -m setup` - -- Execute a command on a group of hosts by invoking command module with arguments: - -`ansible {{group}} -m command -a '{{my_command}}'` - -- Execute a command with administrative privileges: - -`ansible {{group}} --become --ask-become-pass -m command -a '{{my_command}}'` - -- Execute a command using a custom inventory file: - -`ansible {{group}} -i {{inventory_file}} -m command -a '{{my_command}}'` diff --git a/pages.cn/common/ansiweather.md b/pages.cn/common/ansiweather.md deleted file mode 100644 index b15a74709..000000000 --- a/pages.cn/common/ansiweather.md +++ /dev/null @@ -1,15 +0,0 @@ -# ansiweather - -> A shell script for displaying the current weather conditions in your terminal. - -- Display a forecast using metric units for the next five days for Rzeszow, Poland: - -`ansiweather -u {{metric}} -f {{5}} -l {{Rzeszow,PL}}` - -- Display a forecast showing symbols and daylight data for your current location: - -`ansiweather -s {{true}} -d {{true}}` - -- Display a forecast showing wind and humidity data for your current location: - -`ansiweather -w {{true}} -h {{true}}` diff --git a/pages.cn/common/apg.md b/pages.cn/common/apg.md deleted file mode 100644 index f9cd62055..000000000 --- a/pages.cn/common/apg.md +++ /dev/null @@ -1,23 +0,0 @@ -# apg - -> Creates arbitrarily complex random passwords. - -- Create random passwords (default password length is 8): - -`apg` - -- Create a password with at least 1 symbol (S), 1 number (N), 1 uppercase (C), 1 lowercase (L): - -`apg -M SNCL` - -- Create a password with 16 characters: - -`apg -m {{16}}` - -- Create a password with maximum length of 16: - -`apg -x {{16}}` - -- Create a password that doesn't appear in a dictionary (the dictionary file has to be provided): - -`apg -r {{dictionary_file}}` diff --git a/pages.cn/common/apm.md b/pages.cn/common/apm.md deleted file mode 100644 index 63c83e99d..000000000 --- a/pages.cn/common/apm.md +++ /dev/null @@ -1,16 +0,0 @@ -# apm - -> Atom editor Package Manager. -> See `atom`. - -- Install packages from http://atom.io/packages and themes from http://atom.io/themes: - -`apm install {{package_name}}` - -- Remove packages/themes: - -`apm remove {{package_name}}` - -- Upgrade packages/themes: - -`apm upgrade {{package_name}}` diff --git a/pages.cn/common/apropos.md b/pages.cn/common/apropos.md deleted file mode 100644 index 7b9ca837f..000000000 --- a/pages.cn/common/apropos.md +++ /dev/null @@ -1,11 +0,0 @@ -# apropos - -> Search in manpages, for example to find a new command. - -- Search for keyword: - -`apropos {{regular_expression}}` - -- Search without restricting output to terminal width: - -`apropos -l {{regular_expression}}` diff --git a/pages.cn/common/ar.md b/pages.cn/common/ar.md deleted file mode 100644 index 9066b7fe9..000000000 --- a/pages.cn/common/ar.md +++ /dev/null @@ -1,23 +0,0 @@ -# ar - -> Create, modify, and extract from archives (.a, .so, .o). - -- Extract all members from an archive: - -`ar -x {{libfoo.a}}` - -- List the members of an archive: - -`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}}` diff --git a/pages.cn/common/aria2c.md b/pages.cn/common/aria2c.md deleted file mode 100644 index 604ecc81a..000000000 --- a/pages.cn/common/aria2c.md +++ /dev/null @@ -1,28 +0,0 @@ -# aria2c - -> Fast download utility. -> Supports HTTP(S), FTP, SFTP, BitTorrent, and Metalink. - -- Download a URI to a file: - -`aria2c {{url}}` - -- Download from multiple sources: - -`aria2c {{url_1}} {{url_2}}` - -- Download the URIs listed in a file: - -`aria2c -i {{filename}}` - -- Download with multiple connections: - -`aria2c -s {{connections_num}} {{url}}` - -- FTP download with username and password: - -`aria2c --ftp-user={{username}} --ftp-passwd={{password}} {{url}}` - -- Limit download speed in bytes/s: - -`aria2c --max-download-limit={{speed}} {{url}}` diff --git a/pages.cn/common/arp.md b/pages.cn/common/arp.md deleted file mode 100644 index 7c6a70eac..000000000 --- a/pages.cn/common/arp.md +++ /dev/null @@ -1,19 +0,0 @@ -# arp - -> Show and manipulate your system's ARP cache. - -- Show current arp table: - -`arp -a` - -- Clear the entire cache: - -`sudo arp -a -d` - -- Delete a specific entry: - -`arp -d {{address}}` - -- Create an entry: - -`arp -s {{address}} {{mac_address}}` diff --git a/pages.cn/common/asar.md b/pages.cn/common/asar.md deleted file mode 100644 index 8cf1cf543..000000000 --- a/pages.cn/common/asar.md +++ /dev/null @@ -1,19 +0,0 @@ -# asar - -> A file archiver for the Electron platform. - -- Archive a file or folder: - -`asar pack {{path/to/file}} {{archived.asar}}` - -- Extract an archive: - -`asar extract {{archived.asar}}` - -- Extract a specific file from an archive: - -`asar extract-file {{archived.asar}} {{file}}` - -- List the contents of an archive file: - -`asar list {{archived.asar}}` diff --git a/pages.cn/common/asciinema.md b/pages.cn/common/asciinema.md deleted file mode 100644 index d0b631464..000000000 --- a/pages.cn/common/asciinema.md +++ /dev/null @@ -1,35 +0,0 @@ -# asciinema - -> Record and replay terminal sessions, and optionally share them on asciinema.org. - -- Associate the local install of `asciinema` with an asciinema.org account: - -`asciinema auth` - -- Make a new recording (once finished, user will be prompted to upload it or save it locally): - -`asciinema rec` - -- Make a new recording and save it to a local file: - -`asciinema rec {{path/to/file}}.cast` - -- Replay a terminal recording from a local file: - -`asciinema play {{path/to/file}}.cast` - -- Replay a terminal recording hosted on asciinema.org: - -`asciinema play https://asciinema.org/a/{{cast_id}}` - -- Make a new recording, limiting any idle time to at most 2.5 seconds: - -`asciinema rec -i {{2.5}}` - -- Print the full output of a locally saved recording: - -`asciinema cat {{path/to/file}}.cast` - -- Upload a locally saved terminal session to asciinema.org: - -`asciinema upload {{path/to/file}}.cast` diff --git a/pages.cn/common/assimp.md b/pages.cn/common/assimp.md deleted file mode 100644 index be6a98f82..000000000 --- a/pages.cn/common/assimp.md +++ /dev/null @@ -1,32 +0,0 @@ -# assimp - -> Command-line client for the Open Asset Import Library. -> Supports loading of 40+ 3D file formats, and exporting to several popular 3D formats. - -- List all supported import formats: - -`assimp listext` - -- List all supported export formats: - -`assimp listexport` - -- Convert a file to one of the supported output formats, using the default parameters: - -`assimp export {{input_file.stl}} {{output_file.obj}}` - -- Convert a file using custom parameters (the dox_cmd.h file in assimp's source code lists available parameters): - -`assimp export {{input_file.stl}} {{output_file.obj}} {{parameters}}` - -- Display a summary of a 3D file's contents: - -`assimp info {{path/to/file}}` - -- List all supported subcommands ("verbs"): - -`assimp help` - -- Get help on a specific subcommand (e.g. the parameters specific to it): - -`assimp {{subcommand}} --help` diff --git a/pages.cn/common/astyle.md b/pages.cn/common/astyle.md deleted file mode 100644 index 09619b761..000000000 --- a/pages.cn/common/astyle.md +++ /dev/null @@ -1,24 +0,0 @@ -# astyle - -> Source code indenter, formatter, and beautifier for the C, C++, C# and Java programming languages. -> Upon running, a copy of the original file is created with an ".orig" appended to the original file name. - -- Apply the default style of 4 spaces per indent and no formatting changes: - -`astyle {{source_file}}` - -- Apply the java style with attached braces: - -`astyle --style=java {{path/to/file}}` - -- Apply the allman style with broken braces: - -`astyle --style=allman {{path/to/file}}` - -- Apply a custom indent using spaces. Choose between 2 and 20 spaces: - -`astyle --indent=spaces={{number_of_spaces}} {{path/to/file}}` - -- Apply a custom indent using tabs. Choose between 2 and 20 tabs: - -`astyle --indent=tab={{number_of_tabs}} {{path/to/file}}` diff --git a/pages.cn/common/at.md b/pages.cn/common/at.md deleted file mode 100644 index e7aacecee..000000000 --- a/pages.cn/common/at.md +++ /dev/null @@ -1,16 +0,0 @@ -# at - -> Execute commands once at a later time. -> Service atd (or atrun) should be running for the actual executions. - -- Execute commands from standard input in 5 minutes (press `Ctrl + D` after entering commands): - -`at now + 5 minutes` - -- Execute a command from standard input at 10:00 AM today: - -`echo "{{./make_db_backup.sh}}" | at 1000` - -- Execute commands from a given file next Tuesday: - -`at -f {{path/to/file}} 9:30 PM Tue` diff --git a/pages.cn/common/atom.md b/pages.cn/common/atom.md deleted file mode 100644 index 9ae6664f1..000000000 --- a/pages.cn/common/atom.md +++ /dev/null @@ -1,24 +0,0 @@ -# atom - -> A cross-platform pluggable text editor. -> Plugins are managed by `apm`. - -- Open a file or folder: - -`atom {{path/to/file_or_folder}}` - -- Open a file or folder in a new window: - -`atom -n {{path/to/file_or_folder}}` - -- Open a file or folder in an existing window: - -`atom --add {{path/to/file_or_folder}}` - -- Open atom in safe mode (does not load any additional packages): - -`atom --safe` - -- Prevent atom from forking into the background, keeping atom attached to the terminal: - -`atom --foreground` diff --git a/pages.cn/common/atq.md b/pages.cn/common/atq.md deleted file mode 100644 index 4b993a447..000000000 --- a/pages.cn/common/atq.md +++ /dev/null @@ -1,15 +0,0 @@ -# atq - -> Show jobs scheduled by `at` or `batch` commands. - -- Show the current user's scheduled jobs: - -`atq` - -- Show jobs from queue named 'a' (queues have single-character names): - -`atq -q {{a}}` - -- Show jobs of all users (run as super user): - -`sudo atq` diff --git a/pages.cn/common/atrm.md b/pages.cn/common/atrm.md deleted file mode 100644 index f874220c9..000000000 --- a/pages.cn/common/atrm.md +++ /dev/null @@ -1,12 +0,0 @@ -# atrm - -> Remove jobs scheduled by `at` or `batch` commands. -> To find job numbers use `atq`. - -- Remove job number 10: - -`atrm {{10}}` - -- Remove many jobs, separated by spaces: - -`atrm {{15}} {{17}} {{22}}` diff --git a/pages.cn/common/autoflake.md b/pages.cn/common/autoflake.md deleted file mode 100644 index 625186b17..000000000 --- a/pages.cn/common/autoflake.md +++ /dev/null @@ -1,19 +0,0 @@ -# autoflake - -> A tool to remove unused imports and variables from Python code. - -- Remove unused variables from a single file and display the diff: - -`autoflake --remove-unused-variables {{file.py}}` - -- Remove unused imports from multiple files and display the diffs: - -`autoflake --remove-all-unused-imports {{file1.py}} {{file2.py}} {{file3.py}}` - -- Remove unused variables from a file, overwriting the file: - -`autoflake --remove-unused-variables --in-place {{file.py}}` - -- Remove unused variables recursively from all files in a directory, overwriting each file: - -`autoflake --remove-unused-variables --in-place --recursive {{path/to/directory}}` diff --git a/pages.cn/common/autojump.md b/pages.cn/common/autojump.md deleted file mode 100644 index 9a6a0f5b9..000000000 --- a/pages.cn/common/autojump.md +++ /dev/null @@ -1,24 +0,0 @@ -# autojump - -> Quickly jump among the directories you visit the most. -> Aliases like j or jc are provided for even less typing. - -- Jump to a directory that contains the given pattern: - -`j {{pattern}}` - -- Jump to a sub-directory (child) of the current directory that contains the given pattern: - -`jc {{pattern}}` - -- Open a directory that contains the given pattern in the operating system file manager: - -`jo {{pattern}}` - -- Remove non-existing directories from the autojump database: - -`j --purge` - -- Show the entries in the autojump database: - -`j -s` diff --git a/pages.cn/common/autossh.md b/pages.cn/common/autossh.md deleted file mode 100644 index fafe9a7b9..000000000 --- a/pages.cn/common/autossh.md +++ /dev/null @@ -1,28 +0,0 @@ -# autossh - -> Runs, monitors and restarts SSH connections. -> Auto-reconnects to keep port forwarding tunnels up. Accepts all ssh flags. - -- Open an SSH session, restarting when a monitoring port fails return data: - -`autossh -M {{monitor_port}} {{ssh_command}}` - -- Open an SSH session which forwards a local port to a remote one, restarting if necessary: - -`autossh -M {{monitor_port}} -L {{local_port}}:localhost:{{remote_port}} {{user}}@{{host}}` - -- Fork before executing ssh (runs in the background) and don't open a remote shell: - -`autossh -f -M {{monitor_port}} -N {{ssh_command}}` - -- Run autossh in the background, with no monitoring port, instead relying on SSH keep-alives every 10 seconds to detect failure: - -`autossh -f -M 0 -N -o "ServerAliveInterval 10" -o "ServerAliveCountMax 3" {{ssh_command}}` - -- Run autossh in the background, with no monitoring port, no remote shell, exiting if the port forward fails: - -`autossh -f -M 0 -N -o "ServerAliveInterval 10" -o "ServerAliveCountMax 3" -o ExitOnForwardFailure=yes -L {{local_port}}:localhost:{{remote_port}} {{user}}@{{host}}` - -- Run autossh in the background with debug output logged to a file and ssh verbose output logged to a second file: - -`AUTOSSH_DEBUG=1 AUTOSSH_LOGFILE={{log_file}} autossh -f -M {{monitor_port}} -v -E {{ssh_log_file}} {{ssh_command}}` diff --git a/pages.cn/common/avrdude.md b/pages.cn/common/avrdude.md deleted file mode 100644 index 4e3094d6e..000000000 --- a/pages.cn/common/avrdude.md +++ /dev/null @@ -1,19 +0,0 @@ -# avrdude - -> Driver program for Atmel AVR microcontrollers programming. - -- Read AVR microcontroller: - -`avrdude -p {{AVR_device}} -c {{programmer}} -U flash:r:{{file.hex}}:i` - -- Write AVR microcontroller: - -`avrdude -p {{AVR_device}} -c {{programmer}} -U flash:w:{{file.hex}}` - -- List available AVR devices: - -`avrdude -p \?` - -- List available AVR programmers: - -`avrdude -c \?` diff --git a/pages.cn/common/awk.md b/pages.cn/common/awk.md deleted file mode 100644 index e526de359..000000000 --- a/pages.cn/common/awk.md +++ /dev/null @@ -1,27 +0,0 @@ -# awk - -> A versatile programming language for working on files. - -- Print the fifth column (a.k.a. field) in a space-separated file: - -`awk '{print $5}' {{filename}}` - -- Print the second column of the lines containing "something" in a space-separated file: - -`awk '/{{something}}/ {print $2}' {{filename}}` - -- Print the last column of each line in a file, using a comma (instead of space) as a field separator: - -`awk -F ',' '{print $NF}' {{filename}}` - -- Sum the values in the first column of a file and print the total: - -`awk '{s+=$1} END {print s}' {{filename}}` - -- Sum the values in the first column and pretty-print the values and then the total: - -`awk '{s+=$1; print $1} END {print "--------"; print s}' {{filename}}` - -- Print every third line starting from the first line: - -`awk 'NR%3==1' {{filename}}` diff --git a/pages.cn/common/aws-s3.md b/pages.cn/common/aws-s3.md deleted file mode 100644 index e16cfc16a..000000000 --- a/pages.cn/common/aws-s3.md +++ /dev/null @@ -1,27 +0,0 @@ -# aws s3 - -> CLI for AWS S3 - provides storage through web services interfaces. - -- Show files in a bucket: - -`aws s3 ls {{bucket_name}}` - -- Sync files and folders from local to bucket: - -`aws s3 sync {{path/to/files}} s3://{{bucket_name}}` - -- Sync files and folders from bucket to local: - -`aws s3 sync s3://{{bucket_name}} {{path/to/target}}` - -- Sync files and folders with exclusions: - -`aws s3 sync {{path/to/files}} s3://{{bucket_name}} --exclude {{path/to/file}} --exclude {{path/to/folder}}/*` - -- Remove file from bucket: - -`aws s3 rm s3://{{bucket}}/{{path/to/file}}` - -- Preview changes only: - -`aws s3 {{any_command}} --dryrun` diff --git a/pages.cn/common/aws.md b/pages.cn/common/aws.md deleted file mode 100644 index 16b047280..000000000 --- a/pages.cn/common/aws.md +++ /dev/null @@ -1,23 +0,0 @@ -# aws - -> The official CLI tool for Amazon Web Services. - -- List all IAM users: - -`aws iam list-users` - -- List all EC2 instances from a specific region: - -`aws ec2 describe-instances --region {{us-east-1}}` - -- Receive message from a specific SQS queue: - -`aws sqs receive-message --queue-url {{https://queue.amazonaws.com/546123/Test}}` - -- Publish message to the specific SNS topic: - -`aws sns publish --topic-arn {{arn:aws:sns:us-east-1:54633:testTopic}} --message "Message"` - -- To see help text for the AWS command: - -`aws {{command}} help` diff --git a/pages.cn/common/axel.md b/pages.cn/common/axel.md deleted file mode 100644 index c6687c92b..000000000 --- a/pages.cn/common/axel.md +++ /dev/null @@ -1,24 +0,0 @@ -# axel - -> Download accelerator. -> Supports HTTP, HTTPS, and FTP. - -- Download a URL to a file: - -`axel {{url}}` - -- Download and specify filename: - -`axel {{url}} -o {{filename}}` - -- Download with multiple connections: - -`axel -n {{connections_num}} {{url}}` - -- Search for mirrors: - -`axel -S {{mirrors_num}} {{url}}` - -- Limit download speed (bytes per second): - -`axel -s {{speed}} {{url}}` diff --git a/pages.cn/common/az.md b/pages.cn/common/az.md deleted file mode 100644 index fc99b20c2..000000000 --- a/pages.cn/common/az.md +++ /dev/null @@ -1,27 +0,0 @@ -# az - -> The official CLI tool for Microsoft Azure. - -- Log in to Azure: - -`az login` - -- Manage azure subscription information: - -`az account` - -- List all Azure Managed Disks: - -`az disk list` - -- List all Azure virtual machines: - -`az vm list` - -- Manage Azure Kubernetes Services: - -`az aks` - -- Manage Azure Network resources: - -`az network` diff --git a/pages.cn/common/b2sum.md b/pages.cn/common/b2sum.md deleted file mode 100644 index 23c865ebc..000000000 --- a/pages.cn/common/b2sum.md +++ /dev/null @@ -1,19 +0,0 @@ -# b2sum - -> Calculate BLAKE2 cryptographic checksums. - -- Calculate the BLAKE2 checksum for a file: - -`b2sum {{filename1}}` - -- Calculate BLAKE2 checksums for multiple files: - -`b2sum {{filename1}} {{filename2}}` - -- Read a file of BLAKE2 sums and filenames and verify all files have matching checksums: - -`b2sum -c {{filename.b2}}` - -- Calculate the BLAKE2 checksum from stdin: - -`{{somecommand}} | shasum` diff --git a/pages.cn/common/babel.md b/pages.cn/common/babel.md deleted file mode 100644 index 7a4a90a89..000000000 --- a/pages.cn/common/babel.md +++ /dev/null @@ -1,35 +0,0 @@ -# babel - -> A transpiler which converts code from JavaScript ES6/ES7 syntax to ES5 syntax. - -- Transpile a specified input file and output to stdout: - -`babel {{path/to/file}}` - -- Transpile a specified input file and output to a specific file: - -`babel {{path/to/input_file}} --out-file {{path/to/output_file}}` - -- Transpile the input file every time it is changed: - -`babel {{path/to/input_file}} --watch` - -- Transpile a whole directory of files: - -`babel {{path/to/input_directory}}` - -- Ignore specified comma-separated files in a directory: - -`babel {{path/to/input_directory}} --ignore {{ignored_files}}` - -- Transpile and output as minified JavaScript: - -`babel {{path/to/input_file}} --minified` - -- Choose a set of presets for output formatting: - -`babel {{path/to/input_file}} --presets {{presets}}` - -- Output all available options: - -`babel --help` diff --git a/pages.cn/common/badblocks.md b/pages.cn/common/badblocks.md deleted file mode 100644 index 2102c3f11..000000000 --- a/pages.cn/common/badblocks.md +++ /dev/null @@ -1,16 +0,0 @@ -# badblocks - -> Search a device for bad blocks. -> Some usages of badblocks can cause destructive actions, such as erasing all the data on a disk, including the partition table. - -- Search a disk for bad blocks by using a non-destructive read-only test: - -`sudo badblocks {{/dev/sda}}` - -- Search an unmounted disk for bad blocks with a non-destructive read-write test: - -`sudo badblocks -n {{/dev/sda}}` - -- Search an unmounted disk for bad blocks with a destructive write test: - -`sudo badblocks -w {{/dev/sda}}` diff --git a/pages.cn/common/banner.md b/pages.cn/common/banner.md deleted file mode 100644 index 01b903fa6..000000000 --- a/pages.cn/common/banner.md +++ /dev/null @@ -1,15 +0,0 @@ -# banner - -> Print the given argument as a large ASCII art. - -- Print the text message as a large banner (quotes are optional): - -`banner {{"Hello World"}}` - -- Print the text message as a banner with a width of 50 characters: - -`banner -w {{50}} {{"Hello World"}}` - -- Read text from stdin: - -`banner` diff --git a/pages.cn/common/base32.md b/pages.cn/common/base32.md deleted file mode 100644 index 6bb4db2c9..000000000 --- a/pages.cn/common/base32.md +++ /dev/null @@ -1,19 +0,0 @@ -# base32 - -> Encode or decode file or standard input, to standard output. - -- Encode a file: - -`base32 {{filename}}` - -- Decode a file: - -`base32 -d {{filename}}` - -- Encode from stdin: - -`{{somecommand}} | base32` - -- Decode from stdin: - -`{{somecommand}} | base32 -d` diff --git a/pages.cn/common/base64.md b/pages.cn/common/base64.md deleted file mode 100644 index 293ae7954..000000000 --- a/pages.cn/common/base64.md +++ /dev/null @@ -1,19 +0,0 @@ -# base64 - -> Encode or decode file or standard input, to standard output. - -- Encode a file: - -`base64 {{filename}}` - -- Decode a file: - -`base64 -d {{filename}}` - -- Encode from stdin: - -`{{somecommand}} | base64` - -- Decode from stdin: - -`{{somecommand}} | base64 -d` diff --git a/pages.cn/common/basename.md b/pages.cn/common/basename.md deleted file mode 100644 index 1fcafd915..000000000 --- a/pages.cn/common/basename.md +++ /dev/null @@ -1,11 +0,0 @@ -# basename - -> Returns non-directory portion of a pathname. - -- Show only the file name from a path: - -`basename {{path/to/file}}` - -- Show only the file name from a path, with a suffix removed: - -`basename {{path/to/file}} {{suffix}}` diff --git a/pages.cn/common/bash.md b/pages.cn/common/bash.md deleted file mode 100644 index a4fe53922..000000000 --- a/pages.cn/common/bash.md +++ /dev/null @@ -1,28 +0,0 @@ -# bash - -> Bourne-Again SHell. -> `sh`-compatible command line interpreter. - -- Start interactive shell: - -`bash` - -- Execute a command: - -`bash -c "{{command}}"` - -- Run commands from a file: - -`bash {{file.sh}}` - -- Run commands from a file, logging all commands executed to the terminal: - -`bash -x {{file.sh}}` - -- Run commands from STDIN: - -`bash -s` - -- Print the version information of bash (use `echo $BASH_VERSION` to show just the version string): - -`bash --version` diff --git a/pages.cn/common/bashmarks.md b/pages.cn/common/bashmarks.md deleted file mode 100644 index cdf05203b..000000000 --- a/pages.cn/common/bashmarks.md +++ /dev/null @@ -1,23 +0,0 @@ -# bashmarks - -> Save and jump to commonly used directories using 1 character commands. - -- List available bookmarks: - -`l` - -- Save the current folder as "bookmark_name": - -`s {{bookmark_name}}` - -- Go to a bookmarked folder: - -`g {{bookmark_name}}` - -- Print a bookmarked folder's contents: - -`p {{bookmark_name}}` - -- Delete a bookmark: - -`d {{bookmark_name}}` diff --git a/pages.cn/common/bat.md b/pages.cn/common/bat.md deleted file mode 100644 index fce3e2fce..000000000 --- a/pages.cn/common/bat.md +++ /dev/null @@ -1,28 +0,0 @@ -# bat - -> Print and concatenate files. -> A `cat` clone with syntax highlighting and Git integration. - -- Print the contents of a file to the standard output: - -`bat {{file}}` - -- Concatenate several files into the target file: - -`bat {{file1}} {{file2}} > {{target_file}}` - -- Append several files into the target file: - -`bat {{file1}} {{file2}} >> {{target_file}}` - -- Number all output lines: - -`bat -n {{file}}` - -- Syntax highlight a json file: - -`bat --language json {{file.json}}` - -- Display all supported languages: - -`bat --list-languages` diff --git a/pages.cn/common/batch.md b/pages.cn/common/batch.md deleted file mode 100644 index d290f2150..000000000 --- a/pages.cn/common/batch.md +++ /dev/null @@ -1,16 +0,0 @@ -# batch - -> Execute commands at a later time when the system load levels permit. -> Service atd (or atrun) should be running for the actual executions. - -- Execute a command from standard input: - -`echo "{{./make_db_backup.sh}}" | batch` - -- Execute commands from a given file: - -`batch -f {{path/to/file}}` - -- Execute commands from standard input (press `Ctrl + D` when finished): - -`batch` diff --git a/pages.cn/common/bc.md b/pages.cn/common/bc.md deleted file mode 100644 index 96758a0ba..000000000 --- a/pages.cn/common/bc.md +++ /dev/null @@ -1,19 +0,0 @@ -# bc - -> Calculator. - -- Run calculator in interactive mode using the standard math library: - -`bc -l` - -- Calculate the result of an expression: - -`bc <<< "(1 + 2) * 2 ^ 2"` - -- Calculate expression and force number of decimal places to 10: - -`bc <<< "scale=10; 5 / 3"` - -- Calculate expression with sine and cosine using mathlib: - -`bc -l <<< "s(1) + c(1)"` diff --git a/pages.cn/common/beanstalkd.md b/pages.cn/common/beanstalkd.md deleted file mode 100644 index 1768b8e45..000000000 --- a/pages.cn/common/beanstalkd.md +++ /dev/null @@ -1,19 +0,0 @@ -# beanstalkd - -> A simple and generic work-queue server. - -- Start beanstalkd, listening on port 11300: - -`beanstalkd` - -- Start beanstalkd listening on a custom port and address: - -`beanstalkd -l {{ip_address}} -p {{port_number}}` - -- Persist work queues by saving them to disk: - -`beanstalkd -b {{path/to/persistence_directory}}` - -- Sync to the persistence directory every 500 milliseconds: - -`beanstalkd -b {{path/to/persistence_directory}} -f {{500}}` diff --git a/pages.cn/common/bedtools.md b/pages.cn/common/bedtools.md deleted file mode 100644 index 659ec45e6..000000000 --- a/pages.cn/common/bedtools.md +++ /dev/null @@ -1,28 +0,0 @@ -# bedtools - -> A swiss-army knife of tools for genomic-analysis tasks. -> Used to intersect, group, convert and count data in BAM, BED, GFF/GTF, VCF format. - -- Intersect two files with respect to the sequences' strand and save the result to {{path/to/output_file}}: - -`bedtools intersect -a {{path/to/file_1}} -b {{path/to/file_2}} -s > {{path/to/output_file}}` - -- Intersect two files with a left outer join, i.e. report each feature from {{file_1}} and NULL if no overlap with {{file_2}}: - -`bedtools intersect -a {{path/to/file_1}} -b {{path/to/file_2}} -lof > {{path/to/output_file}}` - -- Using more efficient algorithm to intersect two pre-sorted files: - -`bedtools intersect -a {{path/to/file_1}} -b {{path/to/file_2}} -sorted > {{path/to/output_file}}` - -- Group file {{path/to/file}} based on the first three and the fifth column and summarize the sixth column by summing it up: - -`bedtools groupby -i {{path/to/file}} -c 1-3,5 -g 6 -o sum` - -- Convert bam-formated file to a bed-formated one: - -`bedtools bamtobed -i {{path/to/file}}.bam > {{path/to/file}}.bed` - -- Find for all features in {{file_1}}.bed the closest one in {{file_2}}.bed and write their distance in an extra column (input files must be sorted): - -`bedtools closest -a {{path/to/file_1}}.bed -b {{path/to/file_2}}.bed -d` diff --git a/pages.cn/common/berks.md b/pages.cn/common/berks.md deleted file mode 100644 index ba9510b28..000000000 --- a/pages.cn/common/berks.md +++ /dev/null @@ -1,19 +0,0 @@ -# berks - -> Chef cookbook dependency manager. - -- Install cookbook dependencies into a local repo: - -`berks install` - -- Update a specific cookbook and its dependencies: - -`berks update {{cookbook}}` - -- Upload a cookbook to the Chef server: - -`berks upload {{cookbook}}` - -- View the dependencies of a cookbook: - -`berks contingent {{cookbook}}` diff --git a/pages.cn/common/bg.md b/pages.cn/common/bg.md deleted file mode 100644 index 6b7313397..000000000 --- a/pages.cn/common/bg.md +++ /dev/null @@ -1,11 +0,0 @@ -# bg - -> Resumes jobs that have been suspended (e.g. using `Ctrl + Z`), and keeps them running in the background. - -- Resume most recently suspended job and run it in the background: - -`bg` - -- Resume a specific job (use `jobs -l` to get its ID) and run it in the background: - -`bg {{job_id}}` diff --git a/pages.cn/common/blender.md b/pages.cn/common/blender.md deleted file mode 100644 index 19d3c25a4..000000000 --- a/pages.cn/common/blender.md +++ /dev/null @@ -1,32 +0,0 @@ -# blender - -> Command-line interface to the Blender 3D computer graphics application. -> Arguments are executed in the order they are given. - -- Render all frames of an animation in the background, without loading the UI (output is saved to `/tmp`): - -`blender -b {{filename}}.blend -a` - -- Render an animation using a specific image naming pattern, in a path relative (`//`) to the .blend file: - -`blender -b {{filename}}.blend -o //{{render/frame_###.png}} -a` - -- Render the 10th frame of an animation as a single image, saved to an existing folder (absolute path): - -`blender -b {{filename}}.blend -o {{/path/to/output_folder}} -f {{10}}` - -- Render the second last frame in an animation as a JPEG image, saved to an existing folder (relative path): - -`blender -b {{filename}}.blend -o //{{output_folder}} -F {{JPEG}} -f {{-2}}` - -- Render the animation of a specific scene, starting at frame 10 and ending at frame 500: - -`blender -b {{filename}}.blend -S {{scene_name}} -s {{10}} -e {{500}} -a` - -- Render an animation at a specific resolution, by passing a Python expression: - -`blender -b {{filename}}.blend --python-expr '{{import bpy; bpy.data.scenes[0].render.resolution_percentage = 25}}' -a` - -- Start an interactive Blender session in the terminal with a python console (do `import bpy` after starting): - -`blender -b --python-console` diff --git a/pages.cn/common/bmaptool.md b/pages.cn/common/bmaptool.md deleted file mode 100644 index e92595d69..000000000 --- a/pages.cn/common/bmaptool.md +++ /dev/null @@ -1,19 +0,0 @@ -# bmaptool - -> Create or Copy blockmaps intelligently (and therefore faster than `cp` or `dd`). - -- Create a blockmap from image file: - -`bmaptool create -o {{blockmap.bmap}} {{source.img}}` - -- Copy an image file into sdb: - -`bmaptool copy --bmap {{blockmap.bmap}} {{source.img}} {{/dev/sdb}}` - -- Copy a compressed image file into sdb: - -`bmaptool copy --bmap {{blockmap.bmap}} {{source.img.gz}} {{/dev/sdb}}` - -- Copy an image file into sdb without using a blockmap: - -`bmaptool copy --nobmap {{source.img}} {{/dev/sdb}}` diff --git a/pages.cn/common/boot.md b/pages.cn/common/boot.md deleted file mode 100644 index a1cf1e53a..000000000 --- a/pages.cn/common/boot.md +++ /dev/null @@ -1,27 +0,0 @@ -# boot - -> Build tooling for the Clojure programming language. - -- Start a REPL session either with the project or standalone: - -`boot repl` - -- Build a single "uberjar": - -`boot jar` - -- Learn about a command: - -`boot cljs --help` - -- Generate scaffolding for a new project based on a template: - -`boot --dependencies boot/new new --template {{template_name}} --name {{project_name}}` - -- Build for development (if using the boot/new template): - -`boot dev` - -- Build for production (if using the boot/new template): - -`boot prod` diff --git a/pages.cn/common/borg.md b/pages.cn/common/borg.md deleted file mode 100644 index 9f777c23a..000000000 --- a/pages.cn/common/borg.md +++ /dev/null @@ -1,32 +0,0 @@ -# borg - -> Deduplicating backup tool. -> Creates local or remote backups that are mountable as filesystems. - -- Initialise a (local) repository: - -`borg init {{/path/to/repo_folder}}` - -- Backup a folder into the repository, creating an archive called "Monday": - -`borg create --progress {{/path/to/repo_folder}}::{{Monday}} {{/path/to/source_folder}}` - -- List all archives in a repository: - -`borg list {{/path/to/repo_folder}}` - -- Extract a specific folder from the "Monday" archive in a remote repository, excluding all *.ext files: - -`borg extract {{user}}@{{host}}:{{/path/to/repo_folder}}::{{Monday}} {{path/to/target_folder}} --exclude '{{*.ext}}'` - -- Prune a repository by deleting all archives older than 7 days, listing changes: - -`borg prune --keep-within {{7d}} --list {{/path/to/repo_folder}}` - -- Mount a repository as a FUSE filesystem: - -`borg mount {{/path/to/repo_folder}}::{{Monday}} {{/path/to/mountpoint}}` - -- Display help on creating archives: - -`borg create --help` diff --git a/pages.cn/common/bosh.md b/pages.cn/common/bosh.md deleted file mode 100644 index 07b0c9c0e..000000000 --- a/pages.cn/common/bosh.md +++ /dev/null @@ -1,35 +0,0 @@ -# bosh - -> Command line tool to deploy and manage the bosh director. - -- Create local alias for director: - -`bosh alias-env {{environment_name}} -e {{ip_address|url}} --ca-cert {{ca_certificate}}` - -- List environments: - -`bosh environments` - -- Login to the director: - -`bosh login -e {{environment}} ` - -- List deployments: - -`bosh -e {{environment}} deployments` - -- List environment virtual machines: - -`bosh -e {{environment}} vms -d {{deployment}}` - -- Ssh into virtual machine: - -`bosh -e {{environment}} ssh {{virtual_machine}} -d {{deployment}}` - -- Upload stemcell: - -`bosh -e {{environment}} upload-stemcell {{stemcell_file|url}}` - -- Show current cloud config: - -`bosh -e {{environment}} cloud-config` diff --git a/pages.cn/common/bower.md b/pages.cn/common/bower.md deleted file mode 100644 index 7387d4f01..000000000 --- a/pages.cn/common/bower.md +++ /dev/null @@ -1,32 +0,0 @@ -# bower - -> A package manager optimized for front-end web development. -> A package can be a GitHub user/repo shorthand, a Git endpoint, a URL or a registered package. - -- Install a project's dependencies, listed in its bower.json: - -`bower install` - -- Install one or more packages to the bower_components directory: - -`bower install {{package}} {{package}}` - -- Uninstall packages locally from the bower_components directory: - -`bower uninstall {{package}} {{package}}` - -- List local packages and possible updates: - -`bower list` - -- Display help information about a bower command: - -`bower help {{command}}` - -- Create a bower.json file for your package: - -`bower init` - -- Install a specific dependency version, and add it to bower.json: - -`bower install {{local_name}}={{package}}#{{version}} --save` diff --git a/pages.cn/common/box.md b/pages.cn/common/box.md deleted file mode 100644 index d7d63fef1..000000000 --- a/pages.cn/common/box.md +++ /dev/null @@ -1,31 +0,0 @@ -# box - -> A PHP application for building and managing Phars. - -- Build a new Phar file: - -`box build` - -- Build a new Phar file using a specific config file: - -`box build -c {{path/to/config}}` - -- Display information about the PHAR PHP extension: - -`box info` - -- Display information about a specific Phar file: - -`box info {{path/to/phar_file}}` - -- Validate the first found config file in the working directory: - -`box validate` - -- Verify the signature of a specific Phar file: - -`box verify {{path/to/phar_file}}` - -- Display all available commands and options: - -`box help` diff --git a/pages.cn/common/browser-sync.md b/pages.cn/common/browser-sync.md deleted file mode 100644 index a50fce785..000000000 --- a/pages.cn/common/browser-sync.md +++ /dev/null @@ -1,19 +0,0 @@ -# browser-sync - -> Starts local web server that updates browser on file changes. - -- Start a server from a specific directory: - -`browser-sync start --server {{path/to/directory}} --files {{path/to/directory}}` - -- Start a server from local directory, watching all css files in some directory: - -`browser-sync start --server --files '{{path/to/directory/*.css}}'` - -- Create configuration file: - -`browser-sync init` - -- Start browser-sync from config file: - -`browser-sync start --config {{config_file}}` diff --git a/pages.cn/common/bundle.md b/pages.cn/common/bundle.md deleted file mode 100644 index 3b63b5549..000000000 --- a/pages.cn/common/bundle.md +++ /dev/null @@ -1,19 +0,0 @@ -# bundle - -> Dependency manager for the Ruby programming language. - -- Install all gems defined in the gemfile expected in the working directory: - -`bundle install` - -- Update all gems by the rules defined in the gemfile and regenerate gemfile.lock: - -`bundle update` - -- Update one specific gem defined in the gemfile: - -`bundle update --source {{gemname}}` - -- Create a new gem skeleton: - -`bundle gem {{gemname}}` diff --git a/pages.cn/common/bup.md b/pages.cn/common/bup.md deleted file mode 100644 index bd5e112fe..000000000 --- a/pages.cn/common/bup.md +++ /dev/null @@ -1,23 +0,0 @@ -# bup - -> Backup system based on the git packfile format, providing fast incremental saves and global deduplication. - -- Initialize a backup repository in the specified local directory: - -`bup -d {{path/to/repository}} init` - -- Prepare a given folder before taking a backup: - -`bup -d {{path/to/repository}} index {{path/to/folder}}` - -- Backup a folder to the repository: - -`bup -d {{path/to/repository}} save -n {{backup_name}} {{path/to/folder}}` - -- Show the backup snapshots currently stored in the repository: - -`bup -d {{path/to/repository}} ls` - -- Restore a specific backup snapshot to a target directory: - -`bup -d {{path/to/repository}} restore -C {{path/to/target_directory}} {{backup_name}}` diff --git a/pages.cn/common/bw.md b/pages.cn/common/bw.md deleted file mode 100644 index 7fbd6bd1d..000000000 --- a/pages.cn/common/bw.md +++ /dev/null @@ -1,23 +0,0 @@ -# bw - -> A CLI to access and manage a Bitwarden vault. - -- Log in to a Bitwarden user account: - -`bw login` - -- Log out of a Bitwarden user account: - -`bw logout` - -- Search and display items from Bitwarden vault: - -`bw list items --search {{github}}` - -- Display a particular item from Bitwarden vault: - -`bw get item {{github}}` - -- Create a folder in Bitwarden vault: - -`{{echo -n '{"name":"My Folder1"}' | base64}} | bw create folder` diff --git a/pages.cn/common/c99.md b/pages.cn/common/c99.md deleted file mode 100644 index 8108939ad..000000000 --- a/pages.cn/common/c99.md +++ /dev/null @@ -1,19 +0,0 @@ -# c99 - -> Compiles C programs according to the ISO C standard. - -- Compile source file(s) and create an executable: - -`c99 {{file.c}}` - -- Compile source file(s) and create an executable with a custom name: - -`c99 -o {{executable_name}} {{file.c}}` - -- Compile source file(s) and create object file(s): - -`c99 -c {{file.c}}` - -- Compile source file(s), link with object file(s), and create an executable: - -`c99 {{file.c}} {{file.o}}` diff --git a/pages.cn/common/cabal.md b/pages.cn/common/cabal.md deleted file mode 100644 index f87aa6b86..000000000 --- a/pages.cn/common/cabal.md +++ /dev/null @@ -1,28 +0,0 @@ -# cabal - -> Command line interface to the Haskell package infrastructure (Cabal). -> Manage Haskell projects and Cabal packages from the Hackage package repository. - -- Search and list packages from Hackage: - -`cabal list {{search_string}}` - -- Show information about a package: - -`cabal info {{package_name}}` - -- Download and install a package: - -`cabal install {{package_name}}` - -- Create a new Haskell project in the current directory: - -`cabal init` - -- Build the project in the current directory: - -`cabal build` - -- Run tests of the project in the current directory: - -`cabal test` diff --git a/pages.cn/common/calibre-server.md b/pages.cn/common/calibre-server.md deleted file mode 100644 index f84eac442..000000000 --- a/pages.cn/common/calibre-server.md +++ /dev/null @@ -1,17 +0,0 @@ -# calibre-server - -> A server application that can be used to distribute ebooks over a network. -> Ebooks must be imported into the library using the GUI or calibredb before. -> Part of the Calibre ebook library. - -- Start a server to distribute ebooks. Access at http://localhost:8080: - -`calibre-server` - -- Start server on different port. Access at http://localhost:port: - -`calibre-server --port {{port}}` - -- Password protect the server: - -`calibre-server --username {{username}} --password {{password}}` diff --git a/pages.cn/common/calibredb.md b/pages.cn/common/calibredb.md deleted file mode 100644 index 8d12b9ae6..000000000 --- a/pages.cn/common/calibredb.md +++ /dev/null @@ -1,24 +0,0 @@ -# calibredb - -> Tool to manipulate the your ebook database. -> Part of the Calibre ebook library. - -- List ebooks in the library with additional information: - -`calibredb list` - -- Search for ebooks displaying additional information: - -`calibredb list --search {{search_term}}` - -- Search for just ids of ebooks: - -`calibredb search {{search_term}}` - -- Add one or more ebooks to the library: - -`calibredb add {{file1 file2 …}}` - -- Remove one or more ebooks from the library. You need ebook-ids (see above): - -`calibredb remove {{id1 id2 …}}` diff --git a/pages.cn/common/cargo.md b/pages.cn/common/cargo.md deleted file mode 100644 index dbc5755ee..000000000 --- a/pages.cn/common/cargo.md +++ /dev/null @@ -1,32 +0,0 @@ -# cargo - -> Rust package manager. -> Manage Rust projects and their module dependencies (crates). - -- Search for crates: - -`cargo search {{search_string}}` - -- Install a crate: - -`cargo install {{crate_name}}` - -- List installed crates: - -`cargo install --list` - -- Create a new binary Rust project in the current directory: - -`cargo init --bin` - -- Create a new library Rust project in the current directory: - -`cargo init` - -- Build the Rust project in the current directory: - -`cargo build` - -- Build with multiple parallel jobs: - -`cargo build -j {{jobs}}` diff --git a/pages.cn/common/case.md b/pages.cn/common/case.md deleted file mode 100644 index 994975858..000000000 --- a/pages.cn/common/case.md +++ /dev/null @@ -1,11 +0,0 @@ -# case - -> Branch based on the value of an expression. - -- Match a variable against string literals to decide which command to run: - -`case {{$tocount}} in {{words}}) {{wc -w README}}; ;; {{lines}}) {{wc -l README}}; ;; esac` - -- Combine patterns with |, use * as a fallback pattern: - -`case {{$tocount}} in {{[wW]|words}}) {{wc -w README}}; ;; {{[lL]|lines}}) {{wc -l README}}; ;; *) {{echo "what?"}}; ;; esac` diff --git a/pages.cn/common/cat.md b/pages.cn/common/cat.md deleted file mode 100644 index 15332bcef..000000000 --- a/pages.cn/common/cat.md +++ /dev/null @@ -1,19 +0,0 @@ -# cat - -> Print and concatenate files. - -- Print the contents of a file to the standard output: - -`cat {{file}}` - -- Concatenate several files into the target file: - -`cat {{file1}} {{file2}} > {{target_file}}` - -- Append several files into the target file: - -`cat {{file1}} {{file2}} >> {{target_file}}` - -- Number all output lines: - -`cat -n {{file}}` diff --git a/pages.cn/common/cd.md b/pages.cn/common/cd.md deleted file mode 100644 index d8f37e28e..000000000 --- a/pages.cn/common/cd.md +++ /dev/null @@ -1,19 +0,0 @@ -# cd - -> Change the current working directory. - -- Go to the given directory: - -`cd {{path/to/directory}}` - -- Go to home directory of current user: - -`cd` - -- Go up to the parent of the current directory: - -`cd ..` - -- Go to the previously chosen directory: - -`cd -` diff --git a/pages.cn/common/chgrp.md b/pages.cn/common/chgrp.md deleted file mode 100644 index 519fd2806..000000000 --- a/pages.cn/common/chgrp.md +++ /dev/null @@ -1,19 +0,0 @@ -# chgrp - -> Change group ownership of files and folders. - -- Change the owner of a file/folder: - -`chgrp {{group}} {{path/to/file}}` - -- Recursively change the owner of a folder and its contents: - -`chgrp -R {{group}} {{path/to/folder}}` - -- Change the owner of a symbolic link: - -`chgrp -h {{user}} {{path/to/symlink}}` - -- Change the owner of a file/folder to match a reference file: - -`chgrp --reference={{path/to/reference_file}} {{path/to/file}}` diff --git a/pages.cn/common/chmod.md b/pages.cn/common/chmod.md deleted file mode 100644 index 61a5011e7..000000000 --- a/pages.cn/common/chmod.md +++ /dev/null @@ -1,27 +0,0 @@ -# chmod - -> Change the access permissions of a file or directory. - -- Give the [u]ser who owns a file the right to e[x]ecute it: - -`chmod u+x {{file}}` - -- Give the user rights to [r]ead and [w]rite to a file/directory: - -`chmod u+rw {{file}}` - -- Remove executable rights from the [g]roup: - -`chmod g-x {{file}}` - -- Give [a]ll users rights to read and execute: - -`chmod a+rx {{file}}` - -- Give [o]thers (not in the file owner's group) the same rights as the group: - -`chmod o=g {{file}}` - -- Change permissions recursively giving [g]roup and [o]thers the abililty to [w]rite: - -`chmod -R g+w,o+w {{directory}}` diff --git a/pages.cn/common/chown.md b/pages.cn/common/chown.md deleted file mode 100644 index c62d6e177..000000000 --- a/pages.cn/common/chown.md +++ /dev/null @@ -1,23 +0,0 @@ -# chown - -> Change user and group ownership of files and folders. - -- Change the owner user of a file/folder: - -`chown {{user}} {{path/to/file}}` - -- Change the owner user and group of a file/folder: - -`chown {{user}}:{{group}} {{path/to/file}}` - -- Recursively change the owner of a folder and its contents: - -`chown -R {{user}} {{path/to/folder}}` - -- Change the owner of a symbolic link: - -`chown -h {{user}} {{path/to/symlink}}` - -- Change the owner of a file/folder to match a reference file: - -`chown --reference={{path/to/reference_file}} {{path/to/file}}` diff --git a/pages.cn/common/chromium.md b/pages.cn/common/chromium.md deleted file mode 100644 index fce4e8017..000000000 --- a/pages.cn/common/chromium.md +++ /dev/null @@ -1,27 +0,0 @@ -# chromium - -> Open-source web browser from Google. - -- Open a file: - -`chromium {{path/to/file.html}}` - -- Open an URL: - -`chromium {{example.com}}` - -- Open in incognito mode: - -`chromium --incognito {{example.com}}` - -- Open in a new window: - -`chromium --new-window {{example.com}}` - -- Open in app mode (without toolbars, URL bar, buttons, etc.): - -`chromium --app='{{https://example.com}}'` - -- Use a proxy server: - -`chromium --proxy-server="{{socks5://hostname:66}}" {{example.com}}` diff --git a/pages.cn/common/chroot.md b/pages.cn/common/chroot.md deleted file mode 100644 index e01eb5feb..000000000 --- a/pages.cn/common/chroot.md +++ /dev/null @@ -1,11 +0,0 @@ -# chroot - -> Run command or interactive shell with special root directory. - -- Run command as new root directory: - -`chroot {{/path/to/new/root}} {{command}}` - -- Specify user and group (ID or name) to use: - -`chroot --userspec={{user:group}}` diff --git a/pages.cn/common/chsh.md b/pages.cn/common/chsh.md deleted file mode 100644 index 6627cfb8c..000000000 --- a/pages.cn/common/chsh.md +++ /dev/null @@ -1,7 +0,0 @@ -# chsh - -> Change user's login shell. - -- Change shell: - -`chsh -s {{path/to/shell_binary}} {{username}}` diff --git a/pages.cn/common/cksum.md b/pages.cn/common/cksum.md deleted file mode 100644 index d8a3d1600..000000000 --- a/pages.cn/common/cksum.md +++ /dev/null @@ -1,8 +0,0 @@ -# cksum - -> Calculates CRC checksums and byte counts of a file. -> Note, on old UNIX systems the CRC implementation may differ. - -- Display a 32 bit checksum, size in bytes and filename: - -`cksum {{filename}}` diff --git a/pages.cn/common/clang.md b/pages.cn/common/clang.md deleted file mode 100644 index f2bf73f00..000000000 --- a/pages.cn/common/clang.md +++ /dev/null @@ -1,19 +0,0 @@ -# clang - -> Compiler for C, C++, and Objective-C source files. Can be used as a drop-in replacement for GCC. - -- Compile a source code file into an executable binary: - -`clang {{input_source.c}} -o {{output_executable}}` - -- Activate output of all errors and warnings: - -`clang {{input_source.c}} -Wall -o {{output_executable}}` - -- Include libraries located at a different path than the source file: - -`clang {{input_source.c}} -o {{output_executable}} -I{{header_path}} -L{{library_path}} -l{{library_name}}` - -- Compile source code into LLVM Intermediate Representation (IR): - -`clang -S -emit-llvm {{file.c}} -o {{file.ll}}` diff --git a/pages.cn/common/clear.md b/pages.cn/common/clear.md deleted file mode 100644 index aa133e6a9..000000000 --- a/pages.cn/common/clear.md +++ /dev/null @@ -1,7 +0,0 @@ -# clear - -> Clears the screen of the terminal. - -- Clear the screen (equivalent to typing Control-L when using the bash shell): - -`clear` diff --git a/pages.cn/common/cloc.md b/pages.cn/common/cloc.md deleted file mode 100644 index 5a9283bcd..000000000 --- a/pages.cn/common/cloc.md +++ /dev/null @@ -1,15 +0,0 @@ -# cloc - -> Count, and compute differences of, lines of source code and comments. - -- Count all the lines of code in a directory: - -`cloc {{/path/to/directory}}` - -- Count all the lines of code in a directory, displaying a progress bar during the counting process: - -`cloc --progress=1 {{/path/to/directory}}` - -- Compare 2 directory structures and count the differences between them: - -`cloc --diff {{/directory/one}} {{/directory/two}}` diff --git a/pages.cn/common/cmake.md b/pages.cn/common/cmake.md deleted file mode 100644 index 98e885918..000000000 --- a/pages.cn/common/cmake.md +++ /dev/null @@ -1,16 +0,0 @@ -# cmake - -> Cross-platform build system generator. -> It generates Makefiles, Visual Studio projects or others, depending on the target system. - -- Generate a Makefile and use it to compile a project in the same folder as the source: - -`cmake && make` - -- Generate a Makefile and use it to compile a project in a separate "build" folder (out-of-source build): - -`cmake -H. -B{{build}} && make -C {{build}}` - -- Run cmake in interactive mode (it will ask for each variable, instead of using defaults): - -`cmake -i` diff --git a/pages.cn/common/cmark.md b/pages.cn/common/cmark.md deleted file mode 100644 index 96d51122c..000000000 --- a/pages.cn/common/cmark.md +++ /dev/null @@ -1,19 +0,0 @@ -# cmark - -> Converts CommonMark Markdown formatted text to other formats. - -- Render a Commonmark Markdown file to HTML: - -`cmark --to html {{filename.md}}` - -- Convert data from standard input to latex: - -`cmark --to latex` - -- Convert straight quotes to smart quotes: - -`cmark --smart --to html {{filename.md}}` - -- Validate utf8 characters: - -`cmark --validate-utf8 {{filename.md}}` diff --git a/pages.cn/common/cmp.md b/pages.cn/common/cmp.md deleted file mode 100644 index 9f392cb94..000000000 --- a/pages.cn/common/cmp.md +++ /dev/null @@ -1,11 +0,0 @@ -# cmp - -> Compare two files. - -- Find the byte number and line number of the first difference between the files: - -`cmp {{file1}} {{file2}}` - -- Find the byte number and differing bytes of every difference: - -`cmp -l {{file1}} {{file2}}` diff --git a/pages.cn/common/code.md b/pages.cn/common/code.md deleted file mode 100644 index f94c3ff44..000000000 --- a/pages.cn/common/code.md +++ /dev/null @@ -1,23 +0,0 @@ -# code - -> Visual Studio Code. - -- Open VS Code: - -`code` - -- Open the current directory in VS Code: - -`code .` - -- Open a file or directory in VS Code: - -`code {{path/to/file_or_folder}}` - -- Open a file or directory in the currently open VS Code window: - -`code --reuse-window {{path/to/file_or_folder}}` - -- Compare two files in VS Code: - -`code -d {{file1}} {{file2}}` diff --git a/pages.cn/common/coffee.md b/pages.cn/common/coffee.md deleted file mode 100644 index 08d51e02e..000000000 --- a/pages.cn/common/coffee.md +++ /dev/null @@ -1,23 +0,0 @@ -# coffee - -> Executes CoffeeScript scripts or compiles them into JavaScript. - -- Run a script: - -`coffee {{path/to/file.coffee}}` - -- Compile to JavaScript and save to a file with the same name: - -`coffee --compile {{path/to/file.coffee}}` - -- Compile to JavaScript and save to a given output file: - -`coffee --compile {{path/to/file.coffee}} --output {{path/to/file.js}}` - -- Run interactive REPL: - -`coffee --interactive` - -- Watch script for changes and re-run script: - -`coffee --watch {{path/to/file.coffee}}` diff --git a/pages.cn/common/column.md b/pages.cn/common/column.md deleted file mode 100644 index 55c4c80e9..000000000 --- a/pages.cn/common/column.md +++ /dev/null @@ -1,20 +0,0 @@ -# column - -> Format standard input or file into multiple columns. -> Rows are filled before columns; default separator is whitespace. - -- Format output for a 30 characters wide display: - -`printf "header1 header2\nbar foo\n" | column -c {{30}}` - -- Specify column delimiter character for the -t option (i.e. "," for csv); default is whitespace: - -`printf "header1,header2\nbar,foo\n" | column -s{{,}}` - -- Split columns automatically and auto-align in a tabular format: - -`printf "header1 header2\nbar foo\n" | column -t` - -- Fill columns before filling rows: - -`printf "header1\nbar\nfoobar\n" | column -c {{30}} -x` diff --git a/pages.cn/common/comm.md b/pages.cn/common/comm.md deleted file mode 100644 index e1c031d77..000000000 --- a/pages.cn/common/comm.md +++ /dev/null @@ -1,23 +0,0 @@ -# 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, reading one file from stdin: - -`cat {{file1}} | comm -12 - {{file2}}` - -- Get lines only found in first file, saving the result to a third file: - -`comm -23 {{file1}} {{file2}} > {{file1_only}}` - -- Print lines only found in second file, when the files aren't sorted: - -`comm -13 <(sort {{file1}}) <(sort {{file2}})` diff --git a/pages.cn/common/complete.md b/pages.cn/common/complete.md deleted file mode 100644 index 2dce89ed3..000000000 --- a/pages.cn/common/complete.md +++ /dev/null @@ -1,15 +0,0 @@ -# complete - -> Provides argument autocompletion to shell commands. - -- Apply a function that performs autocompletion to a command: - -`complete -F {{function}} {{command}}` - -- Apply a command that performs autocompletion to another command: - -`complete -C {{autocomplete_command}} {{command}}` - -- Apply autocompletion without appending a space to the completed word: - -`complete -o nospace -F {{function}} {{command}}` diff --git a/pages.cn/common/composer.md b/pages.cn/common/composer.md deleted file mode 100644 index 9edf9a87d..000000000 --- a/pages.cn/common/composer.md +++ /dev/null @@ -1,23 +0,0 @@ -# composer - -> A package-based dependency manager for PHP projects. - -- Add a package as a dependency for this project, adding it to `composer.json`: - -`composer require {{user/package_name}}` - -- Install all the dependencies in this project's `composer.json`: - -`composer install` - -- Uninstall a package from this project, removing it as a dependency from `composer.json`: - -`composer remove {{user/package_name}}` - -- Update all the dependencies in this project's `composer.json`: - -`composer update` - -- Update composer to the latest version: - -`composer self-update` diff --git a/pages.cn/common/conda.md b/pages.cn/common/conda.md deleted file mode 100644 index 3d3b760da..000000000 --- a/pages.cn/common/conda.md +++ /dev/null @@ -1,35 +0,0 @@ -# conda - -> Package, dependency and environment management for any programming language. - -- Create a new environment, installing named packages into it: - -`conda create --name {{environment_name}} {{python=2.7 matplotlib}}` - -- List all environments: - -`conda info --envs` - -- Load or unload an environment: - -`source {{activate|deactivate}} {{environment_name}}` - -- Delete an environment (remove all packages): - -`conda remove --name {{environment_name}} --all` - -- Search conda channels for a package by name: - -`conda search {{package_name}}` - -- Install packages into the current environment: - -`conda install {{python=3.4 numpy}}` - -- List currently installed packages in current environment: - -`conda list` - -- Delete unused packages and caches: - -`conda clean --all` diff --git a/pages.cn/common/consul-kv.md b/pages.cn/common/consul-kv.md deleted file mode 100644 index dc1b2a48a..000000000 --- a/pages.cn/common/consul-kv.md +++ /dev/null @@ -1,15 +0,0 @@ -# consul-kv - -> Distributed key-value store with health checking and service discovery. - -- Read a value from the key-value store: - -`consul kv get {{key}}` - -- Store a new key-value pair: - -`consul kv put {{key}} {{value}}` - -- Delete a key-value pair: - -`consul kv delete {{key}}` diff --git a/pages.cn/common/consul.md b/pages.cn/common/consul.md deleted file mode 100644 index a0231d788..000000000 --- a/pages.cn/common/consul.md +++ /dev/null @@ -1,15 +0,0 @@ -# consul - -> Distributed key-value store with health checking and service discovery. - -- Check the Consul version: - -`consul --version` - -- Show general help: - -`consul --help` - -- Show help for a sub-command: - -`consul {{sub-command}} --help` diff --git a/pages.cn/common/convert.md b/pages.cn/common/convert.md deleted file mode 100644 index 95748cfdf..000000000 --- a/pages.cn/common/convert.md +++ /dev/null @@ -1,23 +0,0 @@ -# convert - -> Imagemagick image conversion tool. - -- Convert an image from JPG to PNG: - -`convert {{image.jpg}} {{image.png}}` - -- Scale an image 50% its original size: - -`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}}` - -- Create a gif from a series of images with 100ms delay between them: - -`convert {{image1.png}} {{image2.png}} {{image3.png}} -delay {{100}} {{animation.gif}}` diff --git a/pages.cn/common/convmv.md b/pages.cn/common/convmv.md deleted file mode 100644 index 0f1597b2d..000000000 --- a/pages.cn/common/convmv.md +++ /dev/null @@ -1,11 +0,0 @@ -# convmv - -> Convert filenames (NOT file content) from one encoding to another. - -- Test filename encoding conversion (don't actually change the filename): - -`convmv -f {{from_encoding}} -t {{to_encoding}} {{input_file}}` - -- Convert filename encoding and rename the file to the new encoding: - -`convmv -f {{from_encoding}} -t {{to_encoding}} --notest {{input_file}}` diff --git a/pages.cn/common/cordova.md b/pages.cn/common/cordova.md deleted file mode 100644 index eee38d258..000000000 --- a/pages.cn/common/cordova.md +++ /dev/null @@ -1,27 +0,0 @@ -# cordova - -> Mobile apps with HTML, CSS & JS. - -- Create a cordova project: - -`cordova create {{path}} {{package_name}} {{project_name}}` - -- Display the current workspace status: - -`cordova info` - -- Add a cordova platform: - -`cordova platform add {{platform}}` - -- Remove a cordova platform: - -`cordova platform remove {{platform}}` - -- Add a cordova plugin: - -`cordova plugin add {{pluginid}}` - -- Remove a cordova plugin: - -`cordova plugin remove {{pluginid}}` diff --git a/pages.cn/common/couchdb.md b/pages.cn/common/couchdb.md deleted file mode 100644 index d61bc3c1d..000000000 --- a/pages.cn/common/couchdb.md +++ /dev/null @@ -1,23 +0,0 @@ -# couchdb - -> Command line interface for Apache CouchDB database server. - -- Start couchdb: - -`couchdb` - -- Start couchdb interactive shell: - -`couchdb -i` - -- Start couchdb as a background process: - -`couchdb -b` - -- Kill the background process (Note: It will respawn if needed): - -`couchdb -k` - -- Shutdown the background process: - -`couchdb -d` diff --git a/pages.cn/common/cowsay.md b/pages.cn/common/cowsay.md deleted file mode 100644 index f74bd2330..000000000 --- a/pages.cn/common/cowsay.md +++ /dev/null @@ -1,19 +0,0 @@ -# cowsay - -> Generate an ASCII character (by default a cow) saying or thinking something. - -- Print an ASCII cow saying "Hello world!": - -`cowsay "Hello world!"` - -- List all available characters: - -`cowsay -l` - -- 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 ..."` diff --git a/pages.cn/common/cp.md b/pages.cn/common/cp.md deleted file mode 100644 index 049555736..000000000 --- a/pages.cn/common/cp.md +++ /dev/null @@ -1,27 +0,0 @@ -# cp - -> Copy files and folders. - -- Copy a file to another location: - -`cp {{path/to/file.ext}} {{path/to/copy.ext}}` - -- Copy a file into another folder, keeping the filename: - -`cp {{path/to/file.ext}} {{path/to/target_parent_folder}}` - -- Copy a folder recursively to another location: - -`cp -r {{path/to/folder}} {{path/to/copy}}` - -- Copy a folder recursively, in verbose mode (shows files as they are copied): - -`cp -vr {{path/to/folder}} {{path/to/copy}}` - -- Copy the contents of a folder into another folder: - -`cp -r {{path/to/source_folder/*}} {{path/to/target_folder}}` - -- Copy text files to another location, in interactive mode (prompts user before overwriting): - -`cp -i {{*.txt}} {{path/to/target_folder}}` diff --git a/pages.cn/common/cpio.md b/pages.cn/common/cpio.md deleted file mode 100644 index adbcf4056..000000000 --- a/pages.cn/common/cpio.md +++ /dev/null @@ -1,16 +0,0 @@ -# cpio - -> Copies files in and out of archives. -> Supports the following archive formats: cpio's custom binary, old ASCII, new ASCII, crc, HPUX binary, HPUX old ASCII, old tar, and POSIX.1 tar. - -- Take a list of file names from standard input and add them [o]nto an archive in cpio's binary format: - -`echo "{{file1}} {{file2}} {{file3}}" | cpio -o > {{archive.cpio}}` - -- Copy all files and folders in a directory and add them [o]nto an archive, in [v]erbose mode: - -`find {{path/to/directory}} | cpio -ov > {{archive.cpio}}` - -- P[i]ck all files from an archive, generating [d]irectories where needed, in [v]erbose mode: - -`cpio -idv < {{archive.cpio}}` diff --git a/pages.cn/common/cppcheck.md b/pages.cn/common/cppcheck.md deleted file mode 100644 index b3f66e905..000000000 --- a/pages.cn/common/cppcheck.md +++ /dev/null @@ -1,32 +0,0 @@ -# cppcheck - -> A static analysis tool for C/C++ code. -> Instead of syntax errors, it focuses on the types of bugs that compilers normally do not detect. - -- Recursively check the current folder, showing progress on the screen and logging error messages to a file: - -`cppcheck . 2> cppcheck.log` - -- Recursively check a given folder, and don't print progress messages: - -`cppcheck --quiet {{path/to/folder}}` - -- Check a given file, specifying which tests to perform (by default only errors are shown): - -`cppcheck --enable={{error|warning|style|performance|portability|information|all}} {{path/to/file.cpp}}` - -- List available tests, filtered by a given search pattern: - -`cppcheck --errorlist | grep "{{search_pattern}}"` - -- Check a given file, ignoring specific tests: - -`cppcheck --suppress={{test_id1}} --suppress={{test_id2}} {{path/to/file.cpp}}` - -- Check the current folder, providing paths for include files located outside it (e.g. external libraries): - -`cppcheck -I {{include/folder_1}} -I {{include/folder_2}} .` - -- Check a Microsoft Visual Studio project (`*.vcxproj`) or solution (`*.sln`): - -`cppcheck --project={{path/to/project.sln}}` diff --git a/pages.cn/common/cppclean.md b/pages.cn/common/cppclean.md deleted file mode 100644 index 3e240a73b..000000000 --- a/pages.cn/common/cppclean.md +++ /dev/null @@ -1,19 +0,0 @@ -# cppclean - -> Find unused code in C++ projects. - -- Run in a project's folder: - -`cppclean {{path/to/project}}` - -- Run on a project where the headers are in the "inc1/" and "inc2/" folders: - -`cppclean {{path/to/project}} --include-path={{inc1}} --include-path={{inc2}}` - -- Run on a specific file "main.cpp": - -`cppclean {{main.cpp}}` - -- Run on the current directory, excluding the "build" directory: - -`cppclean {{.}} --exclude={{build}}` diff --git a/pages.cn/common/cradle-deploy.md b/pages.cn/common/cradle-deploy.md deleted file mode 100644 index 05b9d40d2..000000000 --- a/pages.cn/common/cradle-deploy.md +++ /dev/null @@ -1,19 +0,0 @@ -# cradle deploy - -> Manage Cradle deployments. - -- Deploy Cradle to a server: - -`cradle deploy production` - -- Deploy static assets to Amazon S3: - -`cradle deploy s3` - -- Deploy static assets including the Yarn "components" directory: - -`cradle deploy s3 --include-yarn` - -- Deploy static assets including the "upload" directory: - -`cradle deploy s3 --include-upload` diff --git a/pages.cn/common/cradle-elastic.md b/pages.cn/common/cradle-elastic.md deleted file mode 100644 index 57336a15f..000000000 --- a/pages.cn/common/cradle-elastic.md +++ /dev/null @@ -1,27 +0,0 @@ -# cradle elastic - -> Manage the ElasticSearch instances for a Cradle instance. - -- Truncate the ElasticSearch index: - -`cradle elastic flush` - -- Truncate the ElasticSearch index for a specific package: - -`cradle elastic flush {{package_name}}` - -- Submit the ElasticSearch schema: - -`cradle elastic map` - -- Submit the ElasticSearch schema for a specific package: - -`cradle elastic map {{package_name}}` - -- Populate the ElasticSearch indices for all packages: - -`cradle elastic populate` - -- Populate the ElasticSearch indices for a specific package: - -`cradle elastic populate {{package_name}}` diff --git a/pages.cn/common/cradle-install.md b/pages.cn/common/cradle-install.md deleted file mode 100644 index b19753875..000000000 --- a/pages.cn/common/cradle-install.md +++ /dev/null @@ -1,23 +0,0 @@ -# cradle install - -> Installs the Cradle PHP framework components. - -- Install Cradle's components (User will be prompted for further details): - -`cradle install` - -- Forcefully overwrite files: - -`cradle install --force` - -- Skip running SQL migrations: - -`cradle install --skip-sql` - -- Skip running package updates: - -`cradle install --skip-versioning` - -- Use specific database details: - -`cradle install -h {{hostname}} -u {{username}} -p {{password}}` diff --git a/pages.cn/common/cradle-package.md b/pages.cn/common/cradle-package.md deleted file mode 100644 index b1d18fd78..000000000 --- a/pages.cn/common/cradle-package.md +++ /dev/null @@ -1,31 +0,0 @@ -# cradle package - -> Manage packages for a Cradle instance. - -- Display a list of available packages: - -`cradle package list` - -- Search for a package: - -`cradle package search {{package}}` - -- Install a package from Packagist: - -`cradle package install {{package}}` - -- Install a specific version of a package: - -`cradle package install {{package}} {{version}}` - -- Update a package: - -`cradle package update {{package}}` - -- Update a package to a specific version: - -`cradle package update {{package}} {{version}}` - -- Remove a specific package: - -`cradle package remove {{package}}` diff --git a/pages.cn/common/cradle-sql.md b/pages.cn/common/cradle-sql.md deleted file mode 100644 index 87b8804d9..000000000 --- a/pages.cn/common/cradle-sql.md +++ /dev/null @@ -1,27 +0,0 @@ -# cradle sql - -> Manage Cradle SQL databases. - -- Rebuild the database schema: - -`cradle sql build` - -- Rebuild the database schema for a specific package: - -`cradle sql build {{package_name}}` - -- Empty the entire database: - -`cradle sql flush` - -- Empty the database tables for a specific package: - -`cradle sql flush {{package_name}}` - -- Populate the tables for all packages: - -`cradle sql populate` - -- Populate the tables for a specific package: - -`cradle sql populate {{package_name}}` diff --git a/pages.cn/common/cradle.md b/pages.cn/common/cradle.md deleted file mode 100644 index 691a49d65..000000000 --- a/pages.cn/common/cradle.md +++ /dev/null @@ -1,20 +0,0 @@ -# cradle - -> The Cradle PHP framework. -> See `cradle-install`, `cradle-deploy` and other pages for additional information. - -- Connect to a server: - -`cradle connect {{server_name}}` - -- Display general help: - -`cradle help` - -- Display help for a specific command: - -`cradle {{command}} help` - -- Execute a Cradle command: - -`cradle {{command}}` diff --git a/pages.cn/common/crontab.md b/pages.cn/common/crontab.md deleted file mode 100644 index d907bd4ba..000000000 --- a/pages.cn/common/crontab.md +++ /dev/null @@ -1,28 +0,0 @@ -# crontab - -> Schedule cron jobs to run on a time interval for the current user. -> Job definition format: "(min) (hour) (day_of_month) (month) (day_of_week) command_to_execute". - -- Edit the crontab file for the current user: - -`crontab -e` - -- View a list of existing cron jobs for current user: - -`crontab -l` - -- Remove all cron jobs for the current user: - -`crontab -r` - -- Sample job which runs at 10:00 every day. * means any value: - -`0 10 * * * {{path/to/script.sh}}` - -- Sample job which runs every minute on the 3rd of April: - -`* * 3 Apr * {{path/to/script.sh}}` - -- Sample job which runs at 02:30 every Friday: - -`30 2 * * Fri {{path/to/script.sh}}` diff --git a/pages.cn/common/crystal.md b/pages.cn/common/crystal.md deleted file mode 100644 index e9ea96400..000000000 --- a/pages.cn/common/crystal.md +++ /dev/null @@ -1,23 +0,0 @@ -# crystal - -> Tool for managing crystal source code. - -- Run a crystal file: - -`crystal {{path/to/file.cr}}` - -- Compile a file and all dependencies to a single executable: - -`crystal build {{path/to/file.cr}}` - -- Start a local interactive server for testing the language: - -`crystal play` - -- Create a project directory for a crystal application: - -`crystal init app {{application_name}}` - -- Display all help options: - -`crystal help` diff --git a/pages.cn/common/csc.md b/pages.cn/common/csc.md deleted file mode 100644 index f6ce5cdaa..000000000 --- a/pages.cn/common/csc.md +++ /dev/null @@ -1,35 +0,0 @@ -# csc - -> The Microsoft C# Compiler. - -- Compile one or more C# files to a CIL executable: - -`csc {{path/to/input_file_a.cs}} {{path/to/input_file_b.cs}}` - -- Specify the output filename: - -`csc /out:{{path/to/filename}} {{path/to/input_file.cs}}` - -- Compile into a '.dll' library instead of an executable: - -`csc /target:library {{path/to/input_file.cs}}` - -- Reference another assembly: - -`csc /reference:{{path/to/library.dll}} {{path/to/input_file.cs}}` - -- Embed a resource: - -`csc /resource:{{path/to/target_file.cs}},{{namespace.string.name}} {{path/to/input_file.cs}}` - -- Automatically generate XML documentation: - -`csc /doc:{{path/to/output.xml}} {{path/to/input_file.cs}}` - -- Specify an icon: - -`csc /win32icon:{{path/to/icon.ico}} {{path/to/input_file.cs}}` - -- Strongly-name the resulting assembly with a keyfile: - -`csc /keyfile:{{path/to/keyfile}} {{path/to/input_file.cs}}` diff --git a/pages.cn/common/csslint.md b/pages.cn/common/csslint.md deleted file mode 100644 index 574052608..000000000 --- a/pages.cn/common/csslint.md +++ /dev/null @@ -1,27 +0,0 @@ -# csslint - -> A linter for CSS code. - -- Lint a single CSS file: - -`csslint {{file.css}}` - -- Lint multiple CSS files: - -`csslint {{file1.css}} {{file2.css}} {{file3.css}}` - -- List all possible style rules: - -`csslint --list-rules` - -- Specify certain rules as errors (which result in a non-zero exit code): - -`csslint --errors={{errors,universal-selector,imports}} {{file.css}}` - -- Specify certain rules as warnings: - -`csslint --warnings={{box-sizing,selector-max,floats}} {{file.css}}` - -- Specify certain rules to completely ignore: - -`csslint --ignore={{ids,rules-count,shorthand}} {{file.css}}` diff --git a/pages.cn/common/csvclean.md b/pages.cn/common/csvclean.md deleted file mode 100644 index 612748e3b..000000000 --- a/pages.cn/common/csvclean.md +++ /dev/null @@ -1,12 +0,0 @@ -# csvclean - -> Finds and cleans common syntax errors in CSV files. -> Included in csvkit. - -- Clean a CSV file: - -`csvclean {{bad.csv}}` - -- List locations of syntax errors in a CSV file: - -`csvclean -n {{bad.csv}}` diff --git a/pages.cn/common/csvcut.md b/pages.cn/common/csvcut.md deleted file mode 100644 index 03ad76f09..000000000 --- a/pages.cn/common/csvcut.md +++ /dev/null @@ -1,20 +0,0 @@ -# csvcut - -> Filter and truncate CSV files. Like Unix's `cut` command, but for tabular data. -> Included in csvkit. - -- Print indices and names of all columns: - -`csvcut -n {{data.csv}}` - -- Extract the first and third columns: - -`csvcut -c {{1,3}} {{data.csv}}` - -- Extract all columns **except** the fourth one: - -`csvcut -C {{4}} {{data.csv}}` - -- Extract the columns named "id" and "first name" (in that order): - -`csvcut -c {{id,"first name"}} {{data.csv}}` diff --git a/pages.cn/common/csvformat.md b/pages.cn/common/csvformat.md deleted file mode 100644 index 16276fbb1..000000000 --- a/pages.cn/common/csvformat.md +++ /dev/null @@ -1,24 +0,0 @@ -# csvformat - -> Convert a CSV file to a custom output format. -> Included in csvkit. - -- Convert to a tab-delimited file (TSV): - -`csvformat -T {{data.csv}}` - -- Convert delimiters to a custom character: - -`csvformat -D "{{custom_character}}" {{data.csv}}` - -- Convert line endings to carriage return (^M) + line feed: - -`csvformat -M "{{\r\n}}" {{data.csv}}` - -- Minimize use of quote characters: - -`csvformat -U 0 {{data.csv}}` - -- Maximize use of quote characters: - -`csvformat -U 1 {{data.csv}}` diff --git a/pages.cn/common/csvgrep.md b/pages.cn/common/csvgrep.md deleted file mode 100644 index bc7458ebc..000000000 --- a/pages.cn/common/csvgrep.md +++ /dev/null @@ -1,16 +0,0 @@ -# csvgrep - -> Filter CSV rows with string and pattern matching. -> Included in csvkit. - -- Find rows that have a certain string in column 1: - -`csvgrep -c {{1}} -m {{string_to_match}} {{data.csv}}` - -- Find rows in which columns 3 or 4 match a certain regex pattern: - -`csvgrep -c {{3,4}} -r {{regex_pattern}} {{data.csv}}` - -- Find rows in which the "name" column does NOT include the string "John Doe": - -`csvgrep -i -c {{name}} -m {{"John Doe"}} {{data.csv}}` diff --git a/pages.cn/common/csvlook.md b/pages.cn/common/csvlook.md deleted file mode 100644 index 3abdb0e23..000000000 --- a/pages.cn/common/csvlook.md +++ /dev/null @@ -1,8 +0,0 @@ -# csvlook - -> Render a CSV file in the console as a fixed-width table. -> Included in csvkit. - -- View a CSV file: - -`csvlook {{data.csv}}` diff --git a/pages.cn/common/csvpy.md b/pages.cn/common/csvpy.md deleted file mode 100644 index c49bd1536..000000000 --- a/pages.cn/common/csvpy.md +++ /dev/null @@ -1,12 +0,0 @@ -# csvpy - -> Loads a CSV file into a Python shell. -> Included in csvkit. - -- Load a CSV file into a `CSVKitReader` object: - -`csvpy {{data.csv}}` - -- Load a CSV file into a `CSVKitDictReader` object: - -`csvpy --dict {{data.csv}}` diff --git a/pages.cn/common/csvsort.md b/pages.cn/common/csvsort.md deleted file mode 100644 index c4150ddce..000000000 --- a/pages.cn/common/csvsort.md +++ /dev/null @@ -1,20 +0,0 @@ -# csvsort - -> Sorts CSV files. -> Included in csvkit. - -- Sort a CSV file by column 9: - -`csvsort -c {{9}} {{data.csv}}` - -- Sort a CSV file by the "name" column in descending order: - -`csvsort -r -c {{name}} {{data.csv}}` - -- Sort a CSV file by column 2, then by column 4: - -`csvsort -c {{2,4}} {{data.csv}}` - -- Sort a CSV file without inferring data types: - -`csvsort --no-inference -c {{columns}} {{data.csv}}` diff --git a/pages.cn/common/csvstat.md b/pages.cn/common/csvstat.md deleted file mode 100644 index 36fcbb62c..000000000 --- a/pages.cn/common/csvstat.md +++ /dev/null @@ -1,24 +0,0 @@ -# csvstat - -> Print descriptive statistics for all columns in a CSV file. -> Included in csvkit. - -- Show all stats for all columns: - -`csvstat {{data.csv}}` - -- Show all stats for columns 2 and 4: - -`csvstat -c {{2,4}} {{data.csv}}` - -- Show sums for all columns: - -`csvstat --sum {{data.csv}}` - -- Show the max value length for column 3: - -`csvstat -c {{3}} --len {{data.csv}}` - -- Show the number of unique values in the "name" column: - -`csvstat -c {{name}} --unique {{data.csv}}` diff --git a/pages.cn/common/ctest.md b/pages.cn/common/ctest.md deleted file mode 100644 index ba426bfaf..000000000 --- a/pages.cn/common/ctest.md +++ /dev/null @@ -1,15 +0,0 @@ -# ctest - -> CMake test driver program. - -- Run all tests defined in the CMake project, executing 4 jobs at a time in parallel: - -`ctest -j{{4}} --output-on-failure` - -- Show a list of available tests: - -`ctest -N` - -- Run a single test based on its name, or filter on a regular expression: - -`ctest --output-on-failure -R '^{{test_name}}$'` diff --git a/pages.cn/common/curl.md b/pages.cn/common/curl.md deleted file mode 100644 index 59bd60b2c..000000000 --- a/pages.cn/common/curl.md +++ /dev/null @@ -1,36 +0,0 @@ -# curl - -> Transfers data from or to a server. -> Supports most protocols, including HTTP, FTP, and POP3. - -- Download the contents of an URL to a file: - -`curl {{http://example.com}} -o {{filename}}` - -- Download a file, saving the output under the filename indicated by the URL: - -`curl -O {{http://example.com/filename}}` - -- Download a file, following [L]ocation redirects, and automatically [C]ontinuing (resuming) a previous file transfer: - -`curl -O -L -C - {{http://example.com/filename}}` - -- Send form-encoded data (POST request of type `application/x-www-form-urlencoded`): - -`curl -d {{'name=bob'}} {{http://example.com/form}}` - -- Send a request with an extra header, using a custom HTTP method: - -`curl -H {{'X-My-Header: 123'}} -X {{PUT}} {{http://example.com}}` - -- Send data in JSON format, specifying the appropriate content-type header: - -`curl -d {{'{"name":"bob"}'}} -H {{'Content-Type: application/json'}} {{http://example.com/users/1234}}` - -- Pass a user name and password for server authentication: - -`curl -u myusername:mypassword {{http://example.com}}` - -- Pass client certificate and key for a resource, skipping certificate validation: - -`curl --cert {{client.pem}} --key {{key.pem}} --insecure {{https://example.com}}` diff --git a/pages.cn/common/cut.md b/pages.cn/common/cut.md deleted file mode 100644 index a2605507a..000000000 --- a/pages.cn/common/cut.md +++ /dev/null @@ -1,27 +0,0 @@ -# cut - -> Cut out fields from STDIN or files. - -- Cut out the first sixteen characters of each line of STDIN: - -`cut -c {{1-16}}` - -- Cut out the first sixteen characters of each line of the given files: - -`cut -c {{1-16}} {{file}}` - -- Cut out everything from the 3rd character to the end of each line: - -`cut -c {{3-}}` - -- Cut out the fifth field of each line, using a colon as a field delimiter (default delimiter is tab): - -`cut -d'{{:}}' -f{{5}}` - -- Cut out the 2nd and 10th fields of each line, using a semicolon as a delimiter: - -`cut -d'{{;}}' -f{{2,10}}` - -- Cut out the fields 3 through to the end of each line, using a space as a delimiter: - -`cut -d'{{ }}' -f{{3-}}` diff --git a/pages.cn/common/darkhttpd.md b/pages.cn/common/darkhttpd.md deleted file mode 100644 index 38121e4b5..000000000 --- a/pages.cn/common/darkhttpd.md +++ /dev/null @@ -1,15 +0,0 @@ -# darkhttpd - -> Darkhttpd web server. - -- Start server serving the specified document root: - -`darkhttpd {{path/to/docroot}}` - -- Start server on specified port (port 8080 by default if running as non-root user): - -`darkhttpd {{path/to/docroot}} --port {{port}}` - -- Listen only on specified IP address (by default, the server listens on all interfaces): - -`darkhttpd {{path/to/docroot}} --addr {{ip_address}}` diff --git a/pages.cn/common/date.md b/pages.cn/common/date.md deleted file mode 100644 index 577450fc2..000000000 --- a/pages.cn/common/date.md +++ /dev/null @@ -1,19 +0,0 @@ -# date - -> Set or display the system date. - -- Display the current date using the default locale's format: - -`date +"%c"` - -- Display the current date in UTC and ISO 8601 format: - -`date -u +"%Y-%m-%dT%H:%M:%SZ"` - -- Display the current date as a Unix timestamp (seconds since the Unix epoch): - -`date +%s` - -- Display a specific date (represented as a Unix timestamp) using the default format: - -`date -d @1473305798` diff --git a/pages.cn/common/dc.md b/pages.cn/common/dc.md deleted file mode 100644 index b54fc14da..000000000 --- a/pages.cn/common/dc.md +++ /dev/null @@ -1,23 +0,0 @@ -# dc - -> An arbitrary precision calculator. Uses reverse polish notation (RPN). - -- Run calculator in interactive mode: - -`dc` - -- Execute dc script in file: - -`dc -f {{file}}` - -- Calculate 4 times 5 [4 5 *], subtract 17 [17 -], and [p]rint the output (using echo): - -`echo "4 5 * 17 - p"| dc` - -- Set number of decimal places to 7 [7 k], calculate 5 divided by -3 [5 _3 /] and [p]rint (using dc -e): - -`dc -e "7 k 5 _3 / p"` - -- Calculate the golden ratio, phi: Set number of decimal places to 100 [100 k], square root of 5 [5 v] plus 1 [1 +], divided by 2 [2 /], and [p]rint result: - -`dc -e "100 k 5 v 1 + 2 / p"` diff --git a/pages.cn/common/dd.md b/pages.cn/common/dd.md deleted file mode 100644 index 6ac1cd826..000000000 --- a/pages.cn/common/dd.md +++ /dev/null @@ -1,23 +0,0 @@ -# dd - -> Convert and copy a file. - -- Make a bootable usb drive from an isohybrid file (such like archlinux-xxx.iso) and show the progress: - -`dd if={{file.iso}} of=/dev/{{usb_drive}} status=progress` - -- Clone a drive to another drive with 4MB block, ignore error and show progress: - -`dd if=/dev/{{source_drive}} of=/dev/{{dest_drive}} bs=4M conv=noerror status=progress` - -- Generate 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` - -- Check progress of an ongoing dd operation (Run this command from another shell): - -`kill -USR1 $(pgrep ^dd)` diff --git a/pages.cn/common/decaffeinate.md b/pages.cn/common/decaffeinate.md deleted file mode 100644 index bab77eff0..000000000 --- a/pages.cn/common/decaffeinate.md +++ /dev/null @@ -1,19 +0,0 @@ -# decaffeinate - -> Move your CoffeeScript source to modern JavaScript. - -- Convert a CoffeeScript file to JavaScript: - -`decaffeinate {{path/to/file.coffee}}` - -- Convert a CoffeeScript v2 file to JavaScript: - -`decaffeinate --use-cs2 {{path/to/file.coffee}}` - -- Convert require and module.exports to import and export: - -`decaffeinate --use-js-modules {{path/to/file.coffee}}` - -- Convert a CoffeeScript, allowing named exports: - -`decaffeinate --loose-js-modules {{path/to/file.coffee}}` diff --git a/pages.cn/common/deluser.md b/pages.cn/common/deluser.md deleted file mode 100644 index c9d67235f..000000000 --- a/pages.cn/common/deluser.md +++ /dev/null @@ -1,15 +0,0 @@ -# deluser - -> Remove a user account or remove a user from a group. - -- Remove a user: - -`deluser {{name}}` - -- Remove a user along with their home directory and mail spool: - -`deluser -r {{name}}` - -- Remove a user from a group: - -`deluser {{name}} {{group}}` diff --git a/pages.cn/common/dep.md b/pages.cn/common/dep.md deleted file mode 100644 index c49560cc7..000000000 --- a/pages.cn/common/dep.md +++ /dev/null @@ -1,23 +0,0 @@ -# dep - -> Tool for dependency management in Go projects. - -- Initialize the current directory as the root of a Go project: - -`dep init` - -- Install any missing dependencies (Scans Gopkg.toml and your .go files): - -`dep ensure` - -- Report the status of the project's dependencies: - -`dep status` - -- Add a dependency to the project: - -`dep ensure -add {{package_url}}` - -- Update the locked versions of all dependencies: - -`dep ensure -update` diff --git a/pages.cn/common/detox.md b/pages.cn/common/detox.md deleted file mode 100644 index 320051d6e..000000000 --- a/pages.cn/common/detox.md +++ /dev/null @@ -1,16 +0,0 @@ -# detox - -> Renames files to make them easier to work with. -> It removes spaces and other such annoyances like duplicate underline characters. - -- Remove spaces and other undesirable characters from a file's name: - -`detox {{file}}` - -- Show how detox would rename all of the files in a directory tree: - -`detox --dry-run -r {{directory}}` - -- Remove spaces and other undesirable characters from all files in a directory tree: - -`detox -r {{directory}}` diff --git a/pages.cn/common/df.md b/pages.cn/common/df.md deleted file mode 100644 index 6d585b28e..000000000 --- a/pages.cn/common/df.md +++ /dev/null @@ -1,15 +0,0 @@ -# df - -> Gives an overview of the file system disk space usage. - -- Display all file systems and their disk usage: - -`df` - -- Display all file systems and their disk usage in human readable form: - -`df -h` - -- Display the file system and its disk usage containing the given file or folder: - -`df {{path/to/file_or_folder}}` diff --git a/pages.cn/common/dhcpwn.md b/pages.cn/common/dhcpwn.md deleted file mode 100644 index 378a006bd..000000000 --- a/pages.cn/common/dhcpwn.md +++ /dev/null @@ -1,11 +0,0 @@ -# dhcpwn - -> Test DHCP IP exhaustion attacks and sniff local DHCP traffic. - -- Flood the network with IP requests: - -`dhcpwn --interface {{network_interface}} flood --count {{number_of_requests}}` - -- Sniff local DHCP traffic: - -`dhcpwn --interface {{network_interface}} sniff` diff --git a/pages.cn/common/diff.md b/pages.cn/common/diff.md deleted file mode 100644 index 12f7d9ac6..000000000 --- a/pages.cn/common/diff.md +++ /dev/null @@ -1,27 +0,0 @@ -# diff - -> Compare files and directories. - -- Compare files: - -`diff {{file1}} {{file2}}` - -- Compare files, ignoring white spaces: - -`diff -w {{file1}} {{file2}}` - -- Compare files, showing the differences side by side: - -`diff -y {{file1}} {{file2}}` - -- Compare files, showing the differences in unified format (as used by `git diff`): - -`diff -u {{file1}} {{file2}}` - -- Compare directories recursively: - -`diff -r {{directory1}} {{directory2}}` - -- Compare directories, only showing the names of files that differ: - -`diff -rq {{directory1}} {{directory2}}` diff --git a/pages.cn/common/diffstat.md b/pages.cn/common/diffstat.md deleted file mode 100644 index 65ee4db4b..000000000 --- a/pages.cn/common/diffstat.md +++ /dev/null @@ -1,11 +0,0 @@ -# diffstat - -> Create a histogram from the output of the `diff` command. - -- Display changes in a histogram: - -`diff {{file1}} {{file2}} | diffstat` - -- Display inserted, deleted and modified changes as a table: - -`diff {{file1}} {{file2}} | diffstat -t` diff --git a/pages.cn/common/dig.md b/pages.cn/common/dig.md deleted file mode 100644 index ce29aef26..000000000 --- a/pages.cn/common/dig.md +++ /dev/null @@ -1,31 +0,0 @@ -# dig - -> DNS Lookup utility. - -- Lookup the IP(s) associated with a hostname (A records): - -`dig +short {{hostname.com}}` - -- Lookup the mail server(s) associated with a given domain name (MX record): - -`dig +short {{hostname.com}} MX` - -- Get all types of records for a given domain name: - -`dig {{hostname.com}} ANY` - -- Specify an alternate DNS server to query: - -`dig @{{8.8.8.8}} {{hostname.com}}` - -- Perform a reverse DNS lookup on an IP address (PTR record): - -`dig -x {{8.8.8.8}}` - -- Find authoritative name servers for the zone and display SOA records: - -`dig +nssearch {{hostname.com}}` - -- Perform iterative queries and display the entire trace path to resolve a domain name: - -`dig +trace {{hostname.com}}` diff --git a/pages.cn/common/dircolors.md b/pages.cn/common/dircolors.md deleted file mode 100644 index 2f48d073c..000000000 --- a/pages.cn/common/dircolors.md +++ /dev/null @@ -1,23 +0,0 @@ -# dircolors - -> Output commands to set the LS_COLOR environment variable and style `ls`, `dir`, etc. - -- Output commands to set LS_COLOR using default colors: - -`dircolors` - -- Output commands to set LS_COLOR using colors from a file: - -`dircolors {{file}}` - -- Output commands for Bourne shell: - -`dircolors --bourne-shell` - -- Output commands for C shell: - -`dircolors --c-shell` - -- View the default colors for file types and extensions: - -`dircolors --print-data` diff --git a/pages.cn/common/dirname.md b/pages.cn/common/dirname.md deleted file mode 100644 index 7aaa75fd6..000000000 --- a/pages.cn/common/dirname.md +++ /dev/null @@ -1,15 +0,0 @@ -# dirname - -> Calculates the parent directory of a given file or directory path. - -- Calculate the parent directory of a given path: - -`dirname {{path/to/file_or_directory}}` - -- Calculate the parent directory of multiple paths: - -`dirname {{path/to/file_a}} {{path/to/directory_b}}` - -- Delimit output with a NUL character instead of a newline (useful when combining with `xargs`): - -`dirname --zero {{path/to/directory_a}} {{path/to/file_b}}` diff --git a/pages.cn/common/dirs.md b/pages.cn/common/dirs.md deleted file mode 100644 index b2ca5a52b..000000000 --- a/pages.cn/common/dirs.md +++ /dev/null @@ -1,20 +0,0 @@ -# dirs - -> Displays or manipulates the directory stack. -> The directory stack is a list of recently visited directories that can be manipulated with the `pushd` and `popd` commands. - -- Display the directory stack with a space between each entry: - -`dirs` - -- Display the directory stack with one entry per line: - -`dirs -p` - -- Display only the nth entry in the directory stack, starting at 0: - -`dirs +{{N}}` - -- Clear the directory stack: - -`dirs -c` diff --git a/pages.cn/common/dive.md b/pages.cn/common/dive.md deleted file mode 100644 index 73ac73b2b..000000000 --- a/pages.cn/common/dive.md +++ /dev/null @@ -1,11 +0,0 @@ -# dive - -> A tool for exploring a Docker image, layer contents, and discovering ways to shrink it. - -- Analyze a Docker image: - -`dive {{your_image_tag}}` - -- Build an image and start analyzing it: - -`dive build -t {{some_tag}}` diff --git a/pages.cn/common/docker-compose.md b/pages.cn/common/docker-compose.md deleted file mode 100644 index b3635bbc7..000000000 --- a/pages.cn/common/docker-compose.md +++ /dev/null @@ -1,27 +0,0 @@ -# docker-compose - -> Run and manage multi container docker applications. - -- Create and start all containers in the background using a `docker-compose.yml` file from the current directory: - -`docker-compose up -d` - -- Start all containers, rebuild if necessary: - -`docker-compose up --build` - -- Start all containers using an alternate compose file: - -`docker-compose --file {{path/to/file}} up` - -- Stop all running containers: - -`docker-compose stop` - -- Stop and remove all containers, networks, images, and volumes: - -`docker-compose down` - -- Follow logs for all containers: - -`docker-compose logs --follow` diff --git a/pages.cn/common/docker-machine.md b/pages.cn/common/docker-machine.md deleted file mode 100644 index 1caf9d961..000000000 --- a/pages.cn/common/docker-machine.md +++ /dev/null @@ -1,27 +0,0 @@ -# docker-machine - -> Create and manage machines running Docker. - -- List currently running docker machines: - -`docker-machine ls` - -- Create a new docker machine with specific name: - -`docker-machine create {{name}}` - -- Get the status of a machine: - -`docker-machine status {{name}}` - -- Start a machine: - -`docker-machine start {{name}}` - -- Stop a machine: - -`docker-machine stop {{name}}` - -- Inspect information about a machine: - -`docker-machine inspect {{name}}` diff --git a/pages.cn/common/docker.md b/pages.cn/common/docker.md deleted file mode 100644 index 902576ae5..000000000 --- a/pages.cn/common/docker.md +++ /dev/null @@ -1,35 +0,0 @@ -# docker - -> Manage Docker containers and images. - -- List currently running docker containers: - -`docker ps` - -- List all docker containers (running and stopped): - -`docker ps -a` - -- Start a container from an image, with a custom name: - -`docker run --name {{container_name}} {{image}}` - -- Start or stop an existing container: - -`docker {{start|stop}} {{container_name}}` - -- Pull an image from a docker registry: - -`docker pull {{image}}` - -- Open a shell inside of an already running container: - -`docker exec -it {{container_name}} {{sh}}` - -- Remove a stopped container: - -`docker rm {{container_name}}` - -- Fetch and follow the logs of a container: - -`docker logs -f {{container_name}}` diff --git a/pages.cn/common/dokku.md b/pages.cn/common/dokku.md deleted file mode 100644 index fec46e75f..000000000 --- a/pages.cn/common/dokku.md +++ /dev/null @@ -1,24 +0,0 @@ -# dokku - -> Docker powered mini-Heroku (PaaS). -> Easily deploy multiple apps to your server in different languages using a single `git-push` command. - -- List runinng apps: - -`dokku apps` - -- Create an app: - -`dokku apps:create {{app_name}}` - -- Remove an app: - -`dokku apps:destroy {{app_name}}` - -- Install plugin: - -`dokku plugin:install {{full_repo_url}}` - -- Link database to an app: - -`dokku {{db}}:link {{db_name}} {{app_name}}` diff --git a/pages.cn/common/dot.md b/pages.cn/common/dot.md deleted file mode 100644 index 89329588d..000000000 --- a/pages.cn/common/dot.md +++ /dev/null @@ -1,11 +0,0 @@ -# dot - -> A command-line tool to produce layered drawings of directed graphs. - -- Render an image file and determine output filename based on input filename and selected format: - -`dot -Tpng -O {{path/to/file.dot}}` - -- Create an SVG from DOT file: - -`dot -Tsvg -o {{path/to/out_file.svg}} {{path/to/file.dot}}` diff --git a/pages.cn/common/dotnet.md b/pages.cn/common/dotnet.md deleted file mode 100644 index d2a8a3cbd..000000000 --- a/pages.cn/common/dotnet.md +++ /dev/null @@ -1,19 +0,0 @@ -# dotnet - -> Cross platform .NET command line tools for .NET Core. - -- Initialize a new .NET project: - -`dotnet new {{template_short_name}}` - -- Restore nuget packages: - -`dotnet restore` - -- Build and execute the .NET project in the current directory: - -`dotnet run` - -- Run a packaged dotnet application (only needs the runtime, the rest of the commands require the .NET Core SDK installed): - -`dotnet {{path/to/application.dll}}` diff --git a/pages.cn/common/doxygen.md b/pages.cn/common/doxygen.md deleted file mode 100644 index e5b75ac57..000000000 --- a/pages.cn/common/doxygen.md +++ /dev/null @@ -1,15 +0,0 @@ -# doxygen - -> A documentation system for various programming languages. - -- Generate a default template configuration file "Doxyfile": - -`doxygen -g` - -- Generate a template configuration file: - -`doxygen -g {{path/to/config_file}}` - -- Generate documentation using an existing configuration file: - -`doxygen {{path/to/config_file}}` diff --git a/pages.cn/common/drill.md b/pages.cn/common/drill.md deleted file mode 100644 index e84b06324..000000000 --- a/pages.cn/common/drill.md +++ /dev/null @@ -1,31 +0,0 @@ -# drill - -> Perform various DNS queries. - -- Lookup the IP(s) associated with a hostname (A records): - -`drill {{hostname.com}}` - -- Lookup the mail server(s) associated with a given domain name (MX record): - -`drill mx {{hostname.com}}` - -- Get all types of records for a given domain name: - -`drill any {{hostname.com}}` - -- Specify an alternate DNS server to query: - -`drill {{hostname.com}} @{{8.8.8.8}}` - -- Perform a reverse DNS lookup on an IP address (PTR record): - -`drill -x {{8.8.8.8}}` - -- Perform DNSSEC trace from root servers down to a domain name: - -`drill -TD {{hostname.com}}` - -- Show DNSKEY record(s) for a domain name: - -`drill -s dnskey {{hostname.com}}` diff --git a/pages.cn/common/drush.md b/pages.cn/common/drush.md deleted file mode 100644 index 047b470b6..000000000 --- a/pages.cn/common/drush.md +++ /dev/null @@ -1,27 +0,0 @@ -# drush - -> A command-line shell and scripting interface for Drupal. - -- Download module "foo": - -`drush dl {{foo}}` - -- Download version 7.x-2.1-beta1 of module "foo": - -`drush dl {{foo}}-7.x-2.1-beta1` - -- Enable module "foo": - -`drush en {{foo}}` - -- Disable module "foo": - -`drush dis {{foo}}` - -- Clear all caches: - -`drush cc all` - -- Clear CSS and JavaScript caches: - -`drush cc css-js` diff --git a/pages.cn/common/du.md b/pages.cn/common/du.md deleted file mode 100644 index 55474e327..000000000 --- a/pages.cn/common/du.md +++ /dev/null @@ -1,27 +0,0 @@ -# du - -> Disk usage: estimate and summarize file and folder space usage. - -- List the sizes of a folder and any subfolders, in the given unit (B/KB/MB): - -`du -{{b|k|m}} {{path/to/folder}}` - -- List the sizes of a folder and any subfolders, in human-readable form (i.e. auto-selecting the appropriate unit for each size): - -`du -h {{path/to/folder}}` - -- Show the size of a single folder, in human readable units: - -`du -sh {{path/to/folder}}` - -- List the human-readable sizes of a folder and of all the files and folders within it: - -`du -ah {{path/to/folder}}` - -- List the human-readable sizes of a folder and any subfolders, up to N levels deep: - -`du -h --max-depth=N {{path/to/folder}}` - -- List the human-readable size of all .jpg files in subfolders of the current folder, and show a cumulative total at the end: - -`du -ch */*.jpg` diff --git a/pages.cn/common/duplicity.md b/pages.cn/common/duplicity.md deleted file mode 100644 index 74cbb52ae..000000000 --- a/pages.cn/common/duplicity.md +++ /dev/null @@ -1,28 +0,0 @@ -# duplicity - -> Creates incremental, compressed, encrypted and versioned backups. -> Can also upload the backups to a variety of backend services. - -- Backup a folder via FTPS to a remote machine, encrypting it with a password: - -`FTP_PASSWORD={{ftp_login_password}} PASSPHRASE={{encryption_password}} duplicity {{path/to/source/directory}} {{ftps://user@hostname/target/directory/path/}}` - -- Backup a folder to Amazon S3, doing a full backup every month: - -`duplicity --full-if-older-than {{1M}} --use-new-style s3://{{bucket_name[/prefix]}}` - -- Delete versions older than 1 year from a backup stored on a WebDAV share: - -`FTP_PASSWORD={{webdav_login_password}} duplicity remove-older-than {{1Y}} --force {{webdav[s]://user@hostname[:port]/some_dir}}` - -- List the available backups: - -`duplicity collection-status "file://{{absolute/path/to/backup/folder}}"` - -- List the files in a backup stored on a remote machine, via ssh: - -`duplicity list-current-files --time {{YYYY-MM-DD}} scp://{{user@hostname}}/path/to/backup/dir` - -- Restore a subdirectory from a GnuPG-encrypted local backup to a given location: - -`PASSPHRASE={{gpg_key_password}} duplicity restore --encrypt-key {{gpg_key_id}} --file-to-restore {{relative/path/restorefolder}} file://{{absolute/path/to/backup/folder}} {{path/to/directory/to/restore/to}}` diff --git a/pages.cn/common/ebook-convert.md b/pages.cn/common/ebook-convert.md deleted file mode 100644 index 932471801..000000000 --- a/pages.cn/common/ebook-convert.md +++ /dev/null @@ -1,8 +0,0 @@ -# ebook-convert - -> Can be used to convert ebooks between common formats, e.g., pdf, epub and mobi. -> Part of the Calibre ebook library tool. - -- Convert an ebook into another format: - -`ebook-convert {{source}} {{destination}}` diff --git a/pages.cn/common/echo.md b/pages.cn/common/echo.md deleted file mode 100644 index dfce20af3..000000000 --- a/pages.cn/common/echo.md +++ /dev/null @@ -1,19 +0,0 @@ -# echo - -> Print given arguments. - -- Print a text message. Note: quotes are optional: - -`echo {{"Hello World"}}` - -- Print a message with environment variables: - -`echo {{"My path is $PATH"}}` - -- Print a message without the trailing newline: - -`echo -n {{"Hello World"}}` - -- Enable interpretation of backslash escapes (special characters): - -`echo -e {{"Column 1\tColumn 2"}}` diff --git a/pages.cn/common/ed.md b/pages.cn/common/ed.md deleted file mode 100644 index f5c14ac9b..000000000 --- a/pages.cn/common/ed.md +++ /dev/null @@ -1,35 +0,0 @@ -# ed - -> The original Unix text editor. - -- Start ed, editing an empty document (which can be saved as a new file in the current directory): - -`ed` - -- Start ed, editing an empty document, with `:` as a command prompt indicator: - -`ed -p :` - -- Start ed editing an existing file (this shows the byte count of the loaded file): - -`ed -p : {{path/to/file}}` - -- Toggle the printing of error explanations. (By default, explanations are not printed and only a `?` appears): - -`H` - -- Add text to the current document. Mark completion by entering a period by itself in a new line: - -`a{{text_to_insert}}.` - -- Print the entire document (`,` is a shortcut to the range `1,$` which covers the start to the end of the document): - -`,p` - -- Write the current document to a new file (the filename can be omitted if `ed` was called with an existing file): - -`w {{filename}}` - -- Quit ed: - -`q` diff --git a/pages.cn/common/electrum.md b/pages.cn/common/electrum.md deleted file mode 100644 index 19003fdac..000000000 --- a/pages.cn/common/electrum.md +++ /dev/null @@ -1,31 +0,0 @@ -# electrum - -> Ergonomic Bitcoin wallet and private key management. - -- Create a new wallet: - -`electrum -w {{new_wallet.dat}} create` - -- Restore an existing wallet from seed offline: - -`electrum -w {{recovery_wallet.dat}} restore -o` - -- Create a signed transaction offline: - -`electrum mktx {{recipient}} {{amount}} -f 0.0000001 -F {{from}} -o` - -- Display all wallet receiving addresses: - -`electrum listaddresses -a` - -- Sign a message: - -`electrum signmessage {{address}} {{message}}` - -- Verify a message: - -`electrum verifymessage {{address}} {{signature}} {{message}}` - -- Connect only to a specific electrum-server instance: - -`electrum -p socks5:{{127.0.0.1}}:9050 -s {{56ckl5obj37gypcu.onion}}:50001:t -1` diff --git a/pages.cn/common/elinks.md b/pages.cn/common/elinks.md deleted file mode 100644 index 62b45a515..000000000 --- a/pages.cn/common/elinks.md +++ /dev/null @@ -1,15 +0,0 @@ -# elinks - -> A text based browser similar to lynx. - -- Start elinks: - -`elinks` - -- Quit elinks: - -`Ctrl + C` - -- Dump output of webpage to console, colorizing the text with ANSI control codes: - -`elinks -dump -dump-color-mode {{1}} {{url}}` diff --git a/pages.cn/common/elm.md b/pages.cn/common/elm.md deleted file mode 100644 index 417f3d530..000000000 --- a/pages.cn/common/elm.md +++ /dev/null @@ -1,15 +0,0 @@ -# elm - -> Run and manage programs in Elm programming language. - -- Start an interactive Elm shell (REPL): - -`elm --repl` - -- Initialize an empty Elm project: - -`elm --init` - -- Compile the current project and serve it via the local web server: - -`elm --reactor` diff --git a/pages.cn/common/emacs.md b/pages.cn/common/emacs.md deleted file mode 100644 index 30a3415f1..000000000 --- a/pages.cn/common/emacs.md +++ /dev/null @@ -1,15 +0,0 @@ -# emacs - -> The extensible, customizable, self-documenting, real-time display editor. - -- Open emacs in console mode (without X window): - -`emacs -nw` - -- Open a file in emacs: - -`emacs {{filename}}` - -- Exit emacs: - -`C-x C-c` diff --git a/pages.cn/common/emacsclient.md b/pages.cn/common/emacsclient.md deleted file mode 100644 index 9f3e2ddc8..000000000 --- a/pages.cn/common/emacsclient.md +++ /dev/null @@ -1,15 +0,0 @@ -# emacsclient - -> Open files in an existing emacs server. - -- Open files in an existing Emacs server (using GUI if available): - -`emacsclient {{filename}}` - -- Open file in console mode (without X window): - -`emacsclient -nw {{filename}}` - -- Open a file in an existing emacs frame and return immediately: - -`emacsclient -n {{filename}}` diff --git a/pages.cn/common/ember.md b/pages.cn/common/ember.md deleted file mode 100644 index 4e08f47ee..000000000 --- a/pages.cn/common/ember.md +++ /dev/null @@ -1,36 +0,0 @@ -# ember - -> The Ember.js command line utility. -> Used for creating and maintaining Ember.js applications. - -- Create a new Ember application: - -`ember new {{my_new_app}}` - -- Create a new Ember addon: - -`ember addon {{my_new_addon}}` - -- Build the project: - -`ember build` - -- Build the project in production mode: - -`ember build -prod` - -- Run the development server: - -`ember serve` - -- Run the test suite: - -`ember test` - -- Run a blueprint to generate something like a route or component: - -`ember generate {{type}} {{name}}` - -- Install an ember-cli addon: - -`ember install {{name_of_addon}}` diff --git a/pages.cn/common/enca.md b/pages.cn/common/enca.md deleted file mode 100644 index eb63b7ab9..000000000 --- a/pages.cn/common/enca.md +++ /dev/null @@ -1,19 +0,0 @@ -# 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}}` diff --git a/pages.cn/common/enscript.md b/pages.cn/common/enscript.md deleted file mode 100644 index 4a7b1f0a0..000000000 --- a/pages.cn/common/enscript.md +++ /dev/null @@ -1,23 +0,0 @@ -# enscript - -> A tool to convert text files to PostScript, HTML, RTF, ANSI, and overstrikes. - -- Generate PostScript from a file and output to another: - -`enscript {{path/to/input_file}} --output={{path/to/output_file}}` - -- Generate a certain output language (eg. "html") from a file and output to another: - -`enscript {{path/to/input_file}} --language={{language}} --output={{path/to/output_file}}` - -- Generate PostScript from a file and output to another with 1 to 9 column per page in landscape: - -`enscript {{path/to/input_file}} --columns={{num}} --landscape --output={{path/to/output_file}}` - -- Display available syntax highlighting: - -`enscript --help-highlight` - -- Generate PostScript from a file and output to another with syntax highlighting and color for a specified language: - -`enscript {{path/to/input_file}} --color=1 --highlight={{language}} --output={{path/to/output_file}}` diff --git a/pages.cn/common/env.md b/pages.cn/common/env.md deleted file mode 100644 index a6a8c66b5..000000000 --- a/pages.cn/common/env.md +++ /dev/null @@ -1,23 +0,0 @@ -# env - -> Show the environment or run a program in a modified environment. - -- Show the environment: - -`env` - -- Run a program. Often used in scripts after the shebang (#!) for looking up the path to the program: - -`env {{program}}` - -- Clear the environment and run a program: - -`env -i {{program}}` - -- Remove variable from the environment and run a program: - -`env -u {{variable}} {{program}}` - -- Set a variable and run a program: - -`env {{variable}}={{value}} {{program}}` diff --git a/pages.cn/common/erl.md b/pages.cn/common/erl.md deleted file mode 100644 index db629759b..000000000 --- a/pages.cn/common/erl.md +++ /dev/null @@ -1,15 +0,0 @@ -# erl - -> Run and manage programs in the Erlang programming language. - -- Compile and run sequential Erlang program as a common script and then exit: - -`erlc {{files}} && erl -noshell '{{mymodule:myfunction(arguments)}}, init:stop().'` - -- Connect to a running Erlang node: - -`erl -remsh {{nodename}}@{{hostname}} -sname {{custom_shortname}} -hidden -setcookie {{cookie_of_remote_node}}` - -- Tell the Erlang shell to load modules from a directory: - -`erl -pa {{directory_with_beam_files}}` diff --git a/pages.cn/common/eslint.md b/pages.cn/common/eslint.md deleted file mode 100644 index b0bbe5a18..000000000 --- a/pages.cn/common/eslint.md +++ /dev/null @@ -1,19 +0,0 @@ -# eslint - -> A pluggable linting utility for JavaScript and JSX. - -- Create eslint config: - -`eslint --init` - -- Lint on a given set of files: - -`eslint {{filename}}.js {{filename1}}.js` - -- Fix lint issues: - -`eslint --fix` - -- Lint with config: - -`eslint -c {{path/to/config_file}} {{app/src}}` diff --git a/pages.cn/common/espeak.md b/pages.cn/common/espeak.md deleted file mode 100644 index b803f0481..000000000 --- a/pages.cn/common/espeak.md +++ /dev/null @@ -1,19 +0,0 @@ -# espeak - -> Uses text-to-speech to speak through the default sound device. - -- Speak a phrase aloud: - -`espeak "I like to ride my bike."` - -- Speak a file aloud: - -`espeak -f {{filename}}` - -- Save output to a WAV audio file, rather than speaking it directly: - -`espeak -w {{filename.wav}} "It's GNU plus Linux"` - -- Use a different voice: - -`espeak -v {{voice}}` diff --git a/pages.cn/common/exa.md b/pages.cn/common/exa.md deleted file mode 100644 index 721d41c5f..000000000 --- a/pages.cn/common/exa.md +++ /dev/null @@ -1,27 +0,0 @@ -# exa - -> A modern replacement for `ls` (List directory contents). - -- List files one per line: - -`exa --oneline` - -- List all files, including hidden files: - -`exa --all` - -- Long format list (permissions, ownership, size and modification date) of all files: - -`exa --long --all` - -- List files with the largest at the top: - -`exa --reverse --sort={{size}}` - -- Display a tree of files, three levels deep: - -`exa --long --tree --level={{3}}` - -- List files sorted by modification date (oldest first): - -`exa --long --sort={{modified}}` diff --git a/pages.cn/common/exiftool.md b/pages.cn/common/exiftool.md deleted file mode 100644 index d3ea22509..000000000 --- a/pages.cn/common/exiftool.md +++ /dev/null @@ -1,23 +0,0 @@ -# exiftool - -> Read and write meta information in files. - -- Remove all EXIF metadata from the given files: - -`exiftool -All= {{file}}` - -- Increase time photo taken by 1 hour in directory: - -`exiftool "-AllDates+=0:0:0 1:0:0" {{directory}}` - -- Decrease time photo taken by 1 day and 2 hours on JPEGs only: - -`exiftool "-AllDates-=0:0:1 2:0:0" -ext jpg` - -- Change only DateTimeOriginal by -1.5 hours & do not keep backups: - -`exiftool -DateTimeOriginal-=1.5 -overwrite_original` - -- Rename all JPEGs according to a DateTimeOriginal recursively: - -`exiftool '-filename Convert tabs to spaces. - -- Convert tabs in each file to spaces, writing to standard output: - -`expand {{file}}` - -- Convert tabs to spaces, reading from standard input: - -`expand` - -- Do not convert tabs after non blanks: - -`expand -i {{file}}` - -- Have tabs a certain number of characters apart, not 8: - -`expand -t={{number}} {{file}}` - -- Use comma separated list of explicit tab positions: - -`expand -t={{list}}` diff --git a/pages.cn/common/expr.md b/pages.cn/common/expr.md deleted file mode 100644 index 14912e9ee..000000000 --- a/pages.cn/common/expr.md +++ /dev/null @@ -1,23 +0,0 @@ -# expr - -> Evaluate expressions and manipulate strings. - -- Get string length: - -`expr length {{string}}` - -- Evaluate logical or math expression with an operator ('+', '-', '*', '&', '|', etc.). Special symbols should be escaped: - -`expr {{first_argument}} {{operator}} {{second_argument}}` - -- Get position of the first character in 'string' that matches 'substring': - -`echo $(expr index {{string}} {{substring}})` - -- Extract part of the string: - -`echo $(expr substr {{string}} {{position_to_start}} {{number_of_characters}}` - -- Extract part of the string which matches a regular expression: - -`echo $(expr {{string}} : '\({{regular_expression}}\)')` diff --git a/pages.cn/common/factor.md b/pages.cn/common/factor.md deleted file mode 100644 index 80e04fdeb..000000000 --- a/pages.cn/common/factor.md +++ /dev/null @@ -1,11 +0,0 @@ -# factor - -> Prints the prime factorization of a number. - -- Display the prime-factorization of a number: - -`factor {{number}}` - -- Take the input from stdin if no argument is specified: - -`echo {{number}} | factor` diff --git a/pages.cn/common/false.md b/pages.cn/common/false.md deleted file mode 100644 index 8ec51fd83..000000000 --- a/pages.cn/common/false.md +++ /dev/null @@ -1,7 +0,0 @@ -# false - -> Returns an exit code of 1. - -- Return an exit code of 1: - -`false` diff --git a/pages.cn/common/fastboot.md b/pages.cn/common/fastboot.md deleted file mode 100644 index 800476bb7..000000000 --- a/pages.cn/common/fastboot.md +++ /dev/null @@ -1,27 +0,0 @@ -# fastboot - -> Communicate with connected Android devices when in bootloader mode (the one place `adb` doesn't work). - -- Unlock the bootloader: - -`fastboot oem unlock` - -- Relock the bootloader: - -`fastboot oem lock` - -- Reboot the device from fastboot mode into fastboot mode again: - -`fastboot reboot bootloader` - -- Flash a given image: - -`fastboot flash {{file.zip}}` - -- Flash a custom recovery image: - -`fastboot flash recovery {{file.img}}` - -- Display connected devices: - -`fastboot devices` diff --git a/pages.cn/common/fd.md b/pages.cn/common/fd.md deleted file mode 100644 index a0eede896..000000000 --- a/pages.cn/common/fd.md +++ /dev/null @@ -1,23 +0,0 @@ -# fd - -> A simple, fast and user-friendly alternative to find. - -- Find files under current directory that match a pattern: - -`fd {{pattern}}` - -- Find files that begin with foo: - -`fd {{'^foo'}}` - -- Find files with a specific extension: - -`fd --extension {{.ext}} {{pattern}}` - -- Find files under a specific directory: - -`fd {{pattern}} {{path/to/dir}}` - -- Include ignored and hidden files in search: - -`fd --hidden --no-ignore {{pattern}}` diff --git a/pages.cn/common/fdupes.md b/pages.cn/common/fdupes.md deleted file mode 100644 index f36c03319..000000000 --- a/pages.cn/common/fdupes.md +++ /dev/null @@ -1,19 +0,0 @@ -# fdupes - -> Finds duplicate files in a given set of directories. - -- Search a single directory: - -`fdupes {{directory}}` - -- Search multiple directories: - -`fdupes {{directory1}} {{directory2}}` - -- Search all directories recursively: - -`fdupes -r {{directory}}` - -- Search multiple directories, one recursively: - -`fdupes {{directory1}} -R {{directory2}}` diff --git a/pages.cn/common/ffmpeg.md b/pages.cn/common/ffmpeg.md deleted file mode 100644 index 24f98560c..000000000 --- a/pages.cn/common/ffmpeg.md +++ /dev/null @@ -1,35 +0,0 @@ -# ffmpeg - -> Video conversion tool. - -- Extract the sound from a video and save it as MP3: - -`ffmpeg -i {{video.mp4}} -vn {{sound}}.mp3` - -- Convert frames from a video or GIF into individual numbered images: - -`ffmpeg -i {{video.mpg|video.gif}} {{frame_%d.png}}` - -- Combine numbered images (frame_1.jpg, frame_2.jpg, etc) into a video or GIF: - -`ffmpeg -i {{frame_%d.jpg}} -f image2 {{video.mpg|video.gif}}` - -- Quickly extract a single frame from a video at time mm:ss and save it as a 128x128 resolution image: - -`ffmpeg -ss {{mm:ss}} -i {{video.mp4}} -frames 1 -s {{128x128}} -f image2 {{image.png}}` - -- Trim a video from a given start time mm:ss to an end time mm2:ss2 (omit the -to flag to trim till the end): - -`ffmpeg -ss {{mm:ss}} -to {{mm2:ss2}} -i {{video.mp4}} -codec copy {{output.mp4}}` - -- Convert AVI video to MP4. AAC Audio @ 128kbit, h264 Video @ CRF 23: - -`ffmpeg -i {{input_video}}.avi -codec:audio aac -b:audio 128k -codec:video libx264 -crf 23 {{output_video}}.mp4` - -- Remux MKV video to MP4 without re-encoding audio or video streams: - -`ffmpeg -i {{input_video}}.mkv -codec copy {{output_video}}.mp4` - -- Convert MP4 video to VP9 codec. For the best quality, use a CRF value (recommended range 15-35) and -b:video MUST be 0: - -`ffmpeg -i {{input_video}}.mp4 -codec:video libvpx-vp9 -crf {{30}} -b:video 0 -codec:audio libopus -vbr on -threads {{number_of_threads}} {{output_video}}.webm` diff --git a/pages.cn/common/ffprobe.md b/pages.cn/common/ffprobe.md deleted file mode 100644 index dbc71bc98..000000000 --- a/pages.cn/common/ffprobe.md +++ /dev/null @@ -1,23 +0,0 @@ -# ffprobe - -> Multimedia stream analyzer. - -- Display all available stream info for a media file: - -`ffprobe -v error -show_entries {{input.mp4}}` - -- Display media duration: - -`ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 {{input.mp4}}` - -- Display the frame rate of a video: - -`ffprobe -v error -select_streams v:0 -show_entries stream=avg_frame_rate -of default=noprint_wrappers=1:nokey=1 {{input.mp4}}` - -- Display the width or height of a video: - -`ffprobe -v error -select_streams v:0 -show_entries stream={{width|height}} -of default=noprint_wrappers=1:nokey=1 {{input.mp4}}` - -- Display the average bit rate of a video: - -`ffprobe -v error -select_streams v:0 -show_entries stream=bit_rate -of default=noprint_wrappers=1:nokey=1 {{input.mp4}}` diff --git a/pages.cn/common/fg.md b/pages.cn/common/fg.md deleted file mode 100644 index f4fbe6c4d..000000000 --- a/pages.cn/common/fg.md +++ /dev/null @@ -1,11 +0,0 @@ -# fg - -> Run jobs in foreground. - -- Bring most recently suspended background job to foreground: - -`fg` - -- Bring a specific job to foreground: - -`fg {{job_id}}` diff --git a/pages.cn/common/find.md b/pages.cn/common/find.md deleted file mode 100644 index 25aa5b454..000000000 --- a/pages.cn/common/find.md +++ /dev/null @@ -1,39 +0,0 @@ -# find - -> Find files or directories under the given directory tree, recursively. - -- Find files by extension: - -`find {{root_path}} -name '{{*.ext}}'` - -- Find files by matching multiple patterns: - -`find {{root_path}} -name '{{*pattern_1*}}' -or -name '{{*pattern_2*}}'` - -- Find directories matching a given name: - -`find {{root_path}} -type d -name {{*lib*}}` - -- Find files matching path pattern: - -`find {{root_path}} -path '{{**/lib/**/*.ext}}'` - -- Run a command for each file, use {} within the command to access the filename: - -`find {{root_path}} -name '{{*.ext}}' -exec {{wc -l {} }}\;` - -- Find files modified in the last 24-hour period: - -`find {{root_path}} -mtime {{-1}}` - -- Find files using case insensitive name matching, of a certain size: - -`find {{root_path}} -size {{+500k}} -size {{-10M}} -iname '{{*.TaR.gZ}}'` - -- Delete files by name, older than 180 days: - -`find {{root_path}} -name '{{*.ext}}' -mtime {{+180}} -delete` - -- Find files matching a given pattern, while excluding specific paths: - -`find {{root_path}} -name '{{*.py}}' -not -path '{{*/site-packages/*}}'` diff --git a/pages.cn/common/finger.md b/pages.cn/common/finger.md deleted file mode 100644 index 18eb7d00e..000000000 --- a/pages.cn/common/finger.md +++ /dev/null @@ -1,23 +0,0 @@ -# finger - -> User information lookup program. - -- Display information about currently logged in users: - -`finger` - -- Display information about a specific user: - -`finger {{username}}` - -- Display the user's login name, real name, terminal name, and other information: - -`finger -s` - -- Produce multi-line output format displaying same information as `-s` as well as user's home directory, home phone number, login shell, mail status, etc.: - -`finger -l` - -- Prevent matching against user's names and only use login names: - -`finger -m` diff --git a/pages.cn/common/fish.md b/pages.cn/common/fish.md deleted file mode 100644 index bd2a053c5..000000000 --- a/pages.cn/common/fish.md +++ /dev/null @@ -1,24 +0,0 @@ -# fish - -> The Friendly Interactive SHell. -> A command-line interpreter designed to be user friendly. - -- Start interactive shell: - -`fish` - -- Execute a command: - -`fish -c "{{command}}"` - -- Run commands from a file: - -`fish {{file.fish}}` - -- Check a file for syntax errors: - -`fish --no-execute {{file.fish}}` - -- Display version information and exit: - -`fish --version` diff --git a/pages.cn/common/fisher.md b/pages.cn/common/fisher.md deleted file mode 100644 index 2d97e0c6c..000000000 --- a/pages.cn/common/fisher.md +++ /dev/null @@ -1,32 +0,0 @@ -# fisher - -> Fisher, a fish-shell plugin manager. -> Install plugins by name or from a managed 'fishfile' for bundled installs. - -- Install one or more plugins: - -`fisher {{plugin1}} {{plugin2}}` - -- Install a plugin from a GitHub gist: - -`fisher {{gist_url}}` - -- Edit 'fishfile' by hand with your favorite editor and install multiple plugins: - -`{{editor}} ~/.config/fish/fishfile; fisher` - -- List installed plugins: - -`fisher ls` - -- Show available plugins: - -`fisher ls-remote` - -- Update plugins: - -`fisher up` - -- Remove one or more plugins: - -`fisher rm {{plugin1}} {{plugin2}}` diff --git a/pages.cn/common/fkill.md b/pages.cn/common/fkill.md deleted file mode 100644 index 5089b6008..000000000 --- a/pages.cn/common/fkill.md +++ /dev/null @@ -1,11 +0,0 @@ -# fkill - -> Fabulously kill processes. Cross-platform. - -- Run without arguments to use the interactive interface: - -`fkill` - -- Kill the process by pid, name or port: - -`fkill {{pid|name|:port}}` diff --git a/pages.cn/common/flac.md b/pages.cn/common/flac.md deleted file mode 100644 index 9c6c99e75..000000000 --- a/pages.cn/common/flac.md +++ /dev/null @@ -1,19 +0,0 @@ -# flac - -> Encodes, decodes and tests flac files. - -- Encode a wav file to flac (this will create a flac file in the same location as the wav file): - -`flac {{path/to/file.wav}}` - -- Encode a wav file to flac, specifying the output file: - -`flac -o {{path/to/output.flac}} {{path/to/file.wav}}` - -- Decode a flac file to wav, specifying the output file: - -`flac -d -o {{path/to/output.wav}} {{path/to/file.flac}}` - -- Test a flac file for the correct encoding: - -`flac -t {{path/to/file.flac}}` diff --git a/pages.cn/common/flex.md b/pages.cn/common/flex.md deleted file mode 100644 index 8c67c07c0..000000000 --- a/pages.cn/common/flex.md +++ /dev/null @@ -1,16 +0,0 @@ -# flex - -> Lexical analyser generator. Based on `lex`. -> Given the specification for a lexical analyser, generates C code implementing it. - -- Generate an analyser from a flex file: - -`flex {{analyser.l}}` - -- Specify the output file: - -`flex {{analyser.l}} --outfile {{analyser.c}}` - -- Compile a C file generated by flex: - -`cc {{path/to/lex.yy.c}} --output {{executable}}` diff --git a/pages.cn/common/flutter.md b/pages.cn/common/flutter.md deleted file mode 100644 index aba8126ea..000000000 --- a/pages.cn/common/flutter.md +++ /dev/null @@ -1,23 +0,0 @@ -# flutter - -> Google’s free, open source, and cross-platform mobile app SDK. - -- Check the Flutter version: - -`flutter --version` - -- Display general help: - -`flutter help` - -- Display help about a specific command: - -`flutter help {{command}}` - -- Execute a Flutter command: - -`flutter {{command}}` - -- Show information about the installed tooling: - -`flutter doctor` diff --git a/pages.cn/common/fly.md b/pages.cn/common/fly.md deleted file mode 100644 index 9f4324742..000000000 --- a/pages.cn/common/fly.md +++ /dev/null @@ -1,35 +0,0 @@ -# fly - -> Command line tool for concourse-ci. - -- Authenticate with and save concourse target: - -`fly --target {{target_name}} login --team-name {{team_name}} -c {{https://ci.example.com}}` - -- List targets: - -`fly targets` - -- List pipelines: - -`fly -t {{target_name}} pipelines` - -- Upload or update a pipeline: - -`fly -t {{target_name}} set-pipeline --config {{pipeline.yml}} --pipeline {{pipeline_name}}` - -- Unpause pipeline: - -`fly -t {{target_name}} unpause-pipeline --pipeline {{pipeline_name}}` - -- Show pipeline configuration: - -`fly -t {{target_name}} get-pipeline --pipeline {{pipeline_name}}` - -- Update local copy of fly: - -`fly -t {{target_name}} sync` - -- Destroy pipeline: - -`fly -t {{target_name}} destroy-pipeline --pipeline {{pipeline_name}}` diff --git a/pages.cn/common/fold.md b/pages.cn/common/fold.md deleted file mode 100644 index 74af0493e..000000000 --- a/pages.cn/common/fold.md +++ /dev/null @@ -1,15 +0,0 @@ -# fold - -> Wraps each line in an input file to fit a specified width and prints it to the standard output. - -- Wrap each line to default width (80 characters): - -`fold {{file}}` - -- Wrap each line to width "30": - -`fold -w30 {{file}}` - -- Wrap each line to width "5" and break the line at spaces (puts each space separated word in a new line, words with length > 5 are wrapped): - -`fold -w5 -s {{file}}` diff --git a/pages.cn/common/for.md b/pages.cn/common/for.md deleted file mode 100644 index 81523ec48..000000000 --- a/pages.cn/common/for.md +++ /dev/null @@ -1,11 +0,0 @@ -# for - -> Shell loop over parameters. - -- Perform a command with different arguments: - -`for argument in 1 2 3; do {{command $argument}}; done` - -- Perform a command in every directory: - -`for d in *; do (cd $d; {{command}}); done` diff --git a/pages.cn/common/forever.md b/pages.cn/common/forever.md deleted file mode 100644 index b220b3674..000000000 --- a/pages.cn/common/forever.md +++ /dev/null @@ -1,15 +0,0 @@ -# forever - -> Server-side JavaScript application that makes sure Node.js applications run indefinitely (restarts after exit). - -- Start running a file forever (as a daemon): - -`forever {{script}}` - -- List running "forever" processes (along with IDs and other details of "forever" processes): - -`forever list` - -- Stop a running "forever" process: - -`forever stop {{ID|pid|script}}` diff --git a/pages.cn/common/fortune.md b/pages.cn/common/fortune.md deleted file mode 100644 index 5ede85fa7..000000000 --- a/pages.cn/common/fortune.md +++ /dev/null @@ -1,27 +0,0 @@ -# fortune - -> Print a random quotation (fortune-cookie style). - -- Print a quotation: - -`fortune` - -- Print an offensive quotation: - -`fortune -o` - -- Print a long quotation: - -`fortune -l` - -- Print a short quotation: - -`fortune -s` - -- List the available quotation database files: - -`fortune -f` - -- Print a quotation from one of the database files listed by `fortune -f`: - -`fortune {{filename}}` diff --git a/pages.cn/common/fping.md b/pages.cn/common/fping.md deleted file mode 100644 index 74549135c..000000000 --- a/pages.cn/common/fping.md +++ /dev/null @@ -1,15 +0,0 @@ -# fping - -> A more powerful ping which can ping multiple hosts. - -- List alive hosts within a subnet generated from a netmask: - -`fping -a -g 192.168.1.0/24` - -- List alive hosts within a subnet generated from an IP range: - -`fping -a -g 192.168.1.1 192.168.1.254` - -- List unreachable hosts within a subnet generated from a netmask: - -`fping -u -g 192.168.1.0/24` diff --git a/pages.cn/common/fswatch.md b/pages.cn/common/fswatch.md deleted file mode 100644 index 49140353e..000000000 --- a/pages.cn/common/fswatch.md +++ /dev/null @@ -1,19 +0,0 @@ -# fswatch - -> A cross-platform file change monitor. - -- Run a bash command on file creation, update or deletion: - -`fswatch {{path/to/file}} | xargs -n 1 {{bash_command}}` - -- Watch one or more files and/or directories: - -`fswatch {{path/to/file}} {{path/to/directory}} {{path/to/another_directory/**/*.js}} | xargs -n 1 {{bash_command}}` - -- Print the absolute paths of the changed files: - -`fswatch {{path/to/directory}} | xargs -n 1 -I {} echo {}` - -- Filter by event type, eg. Updated, Deleted or Created: - -`fswatch --event {{Updated}} {{path/to/directory}} | xargs -n 1 {{bash_command}}` diff --git a/pages.cn/common/fswebcam.md b/pages.cn/common/fswebcam.md deleted file mode 100644 index c2884e49e..000000000 --- a/pages.cn/common/fswebcam.md +++ /dev/null @@ -1,19 +0,0 @@ -# fswebcam - -> Small and simple webcam for *nix. - -- Take a picture: - -`fswebcam {{filename}}` - -- Take a picture with custom resolution: - -`fswebcam -r {{width}}x{{height}} {{filename}}` - -- Take a picture from selected device(Default is /dev/video0): - -`fswebcam -d {{device}} {{filename}}` - -- Take a picture with timestamp(timestamp string is formatted by strftime): - -`fswebcam --timestamp {{timestamp}} {{filename}}` diff --git a/pages.cn/common/ftp.md b/pages.cn/common/ftp.md deleted file mode 100644 index b15940009..000000000 --- a/pages.cn/common/ftp.md +++ /dev/null @@ -1,31 +0,0 @@ -# ftp - -> Tools to interact with a server via File Transfer Protocol. - -- Connect to an FTP server: - -`ftp {{ftp.example.com}}` - -- Switch to binary transfer mode (graphics, compressed files, etc): - -`binary` - -- Transfer multiple files without prompting for confirmation on every file: - -`prompt off` - -- Download multiple files (glob expression): - -`mget {{*.png}}` - -- Upload multiple files (glob expression): - -`mput {{*.zip}}` - -- Delete multiple files on the remote server: - -`mdelete {{*.txt}}` - -- Rename a file on the remote server: - -`rename {{original_filename}} {{new_filename}}` diff --git a/pages.cn/common/fuck.md b/pages.cn/common/fuck.md deleted file mode 100644 index 76e7e5f1d..000000000 --- a/pages.cn/common/fuck.md +++ /dev/null @@ -1,11 +0,0 @@ -# fuck - -> Corrects your previous console command. - -- Set the `fuck` alias to `thefuck` tool: - -`eval "$(thefuck --alias)"` - -- Try to match a rule for the previous command: - -`fuck` diff --git a/pages.cn/common/fzf.md b/pages.cn/common/fzf.md deleted file mode 100644 index 2b7541435..000000000 --- a/pages.cn/common/fzf.md +++ /dev/null @@ -1,27 +0,0 @@ -# fzf - -> Command line fuzzy finder. - -- Start finder on all files from arbitrary locations: - -`find {{path/to/search}} -type f | fzf` - -- Start finder on running processes: - -`ps aux | fzf` - -- Select multiple files with `Shift + Tab` and write to a file: - -`find {{path/to/search_files}} -type f | fzf -m > {{filename}}` - -- Start finder with a given query: - -`fzf -q "{{query}}"` - -- Start finder on entries that start with core and end with either go, rb, or py: - -`fzf -q "^core go$ | rb$ | py$"` - -- Start finder on entries that not match pyc and match exactly travis: - -`fzf -q "!pyc 'travis"` diff --git a/pages.cn/common/g++.md b/pages.cn/common/g++.md deleted file mode 100644 index ff840e278..000000000 --- a/pages.cn/common/g++.md +++ /dev/null @@ -1,20 +0,0 @@ -# gplusplus - -> Compiles C++ source files. -> Part of GCC (GNU Compiler Collection). - -- Compile a source code file into an executable binary: - -`g++ {{source.cpp}} -o {{output_executable}}` - -- Display (almost) all errors and warnings: - -`g++ {{source.cpp}} -Wall -o {{output_executable}}` - -- Choose a language standard to compile for(C++98/C++11/C++14/C++17): - -`g++ {{source.cpp}} -std={{language_standard}} -o {{output_executable}}` - -- Include libraries located at a different path than the source file: - -`g++ {{source.cpp}} -o {{output_executable}} -I{{header_path}} -L{{library_path}} -l{{library_name}}` diff --git a/pages.cn/common/gatsby.md b/pages.cn/common/gatsby.md deleted file mode 100644 index d450eb49b..000000000 --- a/pages.cn/common/gatsby.md +++ /dev/null @@ -1,23 +0,0 @@ -# gatsby - -> Static site generator for React. - -- Create a new site: - -`gatsby new {{site_name}}` - -- Create a new site with a Gatsby 'starter': - -`gatsby new {{site_name}} {{url_of_starter_github_repo}}` - -- Start a live-reloading local development server: - -`gatsby develop` - -- Perform a production build and generate static HTML: - -`gatsby build` - -- Start a local server which serves the production build: - -`gatsby serve` diff --git a/pages.cn/common/gcal.md b/pages.cn/common/gcal.md deleted file mode 100644 index e0a39e89b..000000000 --- a/pages.cn/common/gcal.md +++ /dev/null @@ -1,23 +0,0 @@ -# gcal - -> Displays calendar. - -- Display calendar for the current month: - -`gcal` - -- Display calendar for the month of February of the year 2010: - -`gcal {{2}} {{2010}}` - -- Provide calendar sheet with week numbers: - -`gcal --with-week-number` - -- Change starting day of week to 1st day of the week (Monday): - -`gcal --starting-day={{1}}` - -- Display the previous, current and next month surrounding today: - -`gcal .` diff --git a/pages.cn/common/gcc.md b/pages.cn/common/gcc.md deleted file mode 100644 index e9e56c472..000000000 --- a/pages.cn/common/gcc.md +++ /dev/null @@ -1,23 +0,0 @@ -# gcc - -> Preprocesses and compiles C and C++ source files, then assembles and links them together. - -- Compile multiple source files into executable: - -`gcc {{source1.c}} {{source2.c}} -o {{executable}}` - -- Allow warnings, debug symbols in output: - -`gcc {{source.c}} -Wall -Og -o {{executable}}` - -- Include libraries from a different path: - -`gcc {{source.c}} -o {{executable}} -I{{header_path}} -L{{library_path}} -l{{library_name}}` - -- Compile source code into Assembler instructions: - -`gcc -S {{source.c}}` - -- Compile source code without linking: - -`gcc -c {{source.c}}` diff --git a/pages.cn/common/gcloud.md b/pages.cn/common/gcloud.md deleted file mode 100644 index 1b29ab191..000000000 --- a/pages.cn/common/gcloud.md +++ /dev/null @@ -1,31 +0,0 @@ -# gcloud - -> The official CLI tool for Google Cloud Platform. - -- List all properties in one's active configuration: - -`gcloud config list` - -- Set the active project: - -`gcloud config set project {{project_name}}` - -- SSH into a virtual machine instance: - -`gcloud compute ssh {{user}}@{{instance}} ` - -- Display all Google Compute Engine instances in a project. Instances from all zones are listed by default: - -`gcloud compute instances list` - -- Update a kubeconfig file with the appropriate credentials to point kubectl to a specific cluster in Google Kubernetes Engine: - -`gcloud container clusters get-credentials {{cluster_name}}` - -- Update all gcloud CLI components: - -`gcloud components update` - -- Show help for a given command: - -`gcloud help {{command}}` diff --git a/pages.cn/common/gdb.md b/pages.cn/common/gdb.md deleted file mode 100644 index 37e869622..000000000 --- a/pages.cn/common/gdb.md +++ /dev/null @@ -1,19 +0,0 @@ -# gdb - -> The GNU Debugger. - -- Debug an executable: - -`gdb {{executable}}` - -- Attach a process to gdb: - -`gdb -p {{procID}}` - -- Execute given GDB commands upon start: - -`gdb -ex "{{commands}}" {{executable}}` - -- Start gdb and pass arguments: - -`gdb --args {{executable}} {{argument1}} {{argument2}}` diff --git a/pages.cn/common/gdrive.md b/pages.cn/common/gdrive.md deleted file mode 100644 index 3c433b448..000000000 --- a/pages.cn/common/gdrive.md +++ /dev/null @@ -1,20 +0,0 @@ -# gdrive - -> Command line tool to interact with Google Drive. -> Folder/file id can be obtained from the Google Drive folder or id url. - -- Upload a local path to the parent folder with the specified id: - -`gdrive upload -p {{id}} {{path/to/file_or_folder}}` - -- Download file or directory by id to current directory: - -`gdrive download {{id}}` - -- Download to a given local path by its id: - -`gdrive download --path {{path/to/folder}} {{id}}` - -- Create a new revision of an id using a given file or folder: - -`gdrive update {{id}} {{path/to/file_or_folder}}` diff --git a/pages.cn/common/gem.md b/pages.cn/common/gem.md deleted file mode 100644 index ddf829b4f..000000000 --- a/pages.cn/common/gem.md +++ /dev/null @@ -1,23 +0,0 @@ -# gem - -> Interact with the package manager for the Ruby programming language. - -- Install latest version of a gem: - -`gem install {{gemname}}` - -- Install specific version of a gem: - -`gem install {{gemname}} -v {{1.0.0}}` - -- Update a gem: - -`gem update {{gemname}}` - -- List all gems: - -`gem list` - -- Uninstall a gem: - -`gem uninstall {{gemname}}` diff --git a/pages.cn/common/geth.md b/pages.cn/common/geth.md deleted file mode 100644 index a653ee665..000000000 --- a/pages.cn/common/geth.md +++ /dev/null @@ -1,19 +0,0 @@ -# geth - -> The go-ethereum command line interface. - -- Connect to the main Ethereum network and automatically download the full node: - -`geth` - -- Connect to the Ropsten test network: - -`geth --testnet` - -- Create a new account: - -`geth account new` - -- Enable mining: - -`geth --mine` diff --git a/pages.cn/common/ghc.md b/pages.cn/common/ghc.md deleted file mode 100644 index 0b6a40f94..000000000 --- a/pages.cn/common/ghc.md +++ /dev/null @@ -1,28 +0,0 @@ -# ghc - -> The Glasgow Haskell Compiler. -> Compiles and links Haskell source files. - -- Find and compile all modules in the current directory: - -`ghc Main` - -- Compile a single file: - -`ghc {{file.hs}}` - -- Compile using extra optimization: - -`ghc -O {{file.hs}}` - -- Stop compilation after generating object files (.o): - -`ghc -c {{file.hs}}` - -- Run Haskell interactive interpreter (REPL): - -`ghci` - -- Evaluate a single expression: - -`ghc -e {{expression}}` diff --git a/pages.cn/common/gibo.md b/pages.cn/common/gibo.md deleted file mode 100644 index fc56518fb..000000000 --- a/pages.cn/common/gibo.md +++ /dev/null @@ -1,23 +0,0 @@ -# gibo - -> Fetch gitignore boilerplates. - -- List available boilerplates: - -`gibo list` - -- Write a boilerplate to stdout: - -`gibo dump {{boilerplate}}` - -- Write a boilerplate to .gitignore: - -`gibo dump {{boilerplate}} >>{{.gitignore}}` - -- Search for boilerplates containing a given string: - -`gibo search {{string}}` - -- Update available local boilerplates: - -`gibo update` diff --git a/pages.cn/common/gifsicle.md b/pages.cn/common/gifsicle.md deleted file mode 100644 index 83e011cb8..000000000 --- a/pages.cn/common/gifsicle.md +++ /dev/null @@ -1,19 +0,0 @@ -# gifsicle - -> Create GIFs. - -- Optimise a GIF: - -`gifsicle --batch --optimize=3 {{amin.gif}}` - -- Make a GIF animation with gifsicle: - -`gifsicle --delay={{10}} --loop *.gif > {{anim.gif}}` - -- Extract frames from an animation: - -`gifsicle {{anim.gif}} '#0' > {{firstframe.gif}}` - -- You can also edit animations by replacing, deleting, or inserting frames: - -`gifsicle -b {{anim.gif}} --replace '#0' {{new.gif}}` diff --git a/pages.cn/common/gist.md b/pages.cn/common/gist.md deleted file mode 100644 index b812c1bd3..000000000 --- a/pages.cn/common/gist.md +++ /dev/null @@ -1,31 +0,0 @@ -# gist - -> Upload code to https://gist.github.com. - -- Login in gist on this computer: - -`gist --login` - -- Create a gist from any number of text files: - -`gist {{file.txt}} {{file2.txt}}` - -- Create a private gist with a description: - -`gist -p -d {{"A meaningful description"}} {{file.txt}} ` - -- Read contents from STDIN and create a gist from it: - -`{{echo "hello world"}} | gist` - -- List your public and private gists: - -`gist -l` - -- List all gists for the currently logged in user: - -`gist -l {{user_name}}` - -- Use the id from the gist URL to modify or include a file: - -`gist -u {{GIST_ID}} {{file.txt}}` diff --git a/pages.cn/common/git-add.md b/pages.cn/common/git-add.md deleted file mode 100644 index 031c2fce4..000000000 --- a/pages.cn/common/git-add.md +++ /dev/null @@ -1,23 +0,0 @@ -# git add - -> Adds changed files to the index. - -- Add a file to the index: - -`git add {{path/to/file}}` - -- Add all files (tracked and untracked): - -`git add -A` - -- Only add already tracked files: - -`git add -u` - -- Also add ignored files: - -`git add -f` - -- Add parts of a file interactively: - -`git add -p {{path/to/file}}` diff --git a/pages.cn/common/git-am.md b/pages.cn/common/git-am.md deleted file mode 100644 index db7eb2a41..000000000 --- a/pages.cn/common/git-am.md +++ /dev/null @@ -1,16 +0,0 @@ -# git am - -> Apply patch files. Useful when receiving commits via email. -> See also `git format-patch`, which can generate patch files. - -- Apply a patch file: - -`git am {{path/to/file.patch}}` - -- Abort the process of applying a patch file: - -`git am --abort` - -- Apply as much of a patch file as possible, saving failed hunks to reject files: - -`git am --reject {{path/to/file.patch}}` diff --git a/pages.cn/common/git-bisect.md b/pages.cn/common/git-bisect.md deleted file mode 100644 index 4f22514b3..000000000 --- a/pages.cn/common/git-bisect.md +++ /dev/null @@ -1,20 +0,0 @@ -# git bisect - -> Use binary search to find the commit that introduced a bug. -> Git automatically jumps back and forth in the commit graph to progressively narrow down the faulty commit. - -- Start a bisect session on a commit range bounded by a known buggy commit, and a known clean (typically older) one: - -`git bisect start {{bad_commit}} {{good_commit}}` - -- For each commit that `git bisect` selects, mark it as "bad" or "good" after testing it for the issue: - -`git bisect {{good|bad}}` - -- After `git bisect` pinpoints the faulty commit, end the bisect session and return to the previous branch: - -`git bisect reset` - -- Skip a commit during a bisect (e.g. one that fails the tests due to a different issue): - -`git bisect skip` diff --git a/pages.cn/common/git-blame.md b/pages.cn/common/git-blame.md deleted file mode 100644 index 9b28abf60..000000000 --- a/pages.cn/common/git-blame.md +++ /dev/null @@ -1,11 +0,0 @@ -# git blame - -> Show commit hash and last author on each line of a file. - -- Print file with author name and commit hash on each line: - -`git blame {{file}}` - -- Print file with author email and commit hash on each line: - -`git blame -e {{file}}` diff --git a/pages.cn/common/git-branch.md b/pages.cn/common/git-branch.md deleted file mode 100644 index b4afa23d5..000000000 --- a/pages.cn/common/git-branch.md +++ /dev/null @@ -1,27 +0,0 @@ -# git branch - -> Main git command for working with branches. - -- List local branches. The current branch is highlighted by `*`: - -`git branch` - -- List all branches (local and remote): - -`git branch -a` - -- Create new branch based on the current commit: - -`git branch {{branch_name}}` - -- Create new branch based on a specific commit: - -`git branch {{branch_name}} {{commit_hash}}` - -- Rename a branch (must not have it checked out to do this): - -`git branch -m {{old_branch_name}} {{new_branch_name}}` - -- Delete a local branch (must not have it checked out to do this): - -`git branch -d {{branch_name}}` diff --git a/pages.cn/common/git-checkout.md b/pages.cn/common/git-checkout.md deleted file mode 100644 index d546e746e..000000000 --- a/pages.cn/common/git-checkout.md +++ /dev/null @@ -1,31 +0,0 @@ -# git checkout - -> Checkout a branch or paths to the working tree. - -- Create and switch to a new branch: - -`git checkout -b {{branch_name}}` - -- Create and switch to a new branch based on a specific reference (branch, remote/branch, tag are examples of valid references): - -`git checkout -b {{branch_name}} {{reference}}` - -- Switch to an existing local branch: - -`git checkout {{branch_name}}` - -- Switch to an existing remote branch: - -`git checkout --track {{remote_name}}/{{branch_name}}` - -- Discard all unstaged changes in the current folder (see `git reset` for more undo-like commands): - -`git checkout .` - -- Discard unstaged changes to a given file: - -`git checkout {{file_name}}` - -- Replace a file in the current folder with the version of it committed in a given branch: - -`git checkout {{branch_name}} -- {{file_name}}` diff --git a/pages.cn/common/git-cherry-pick.md b/pages.cn/common/git-cherry-pick.md deleted file mode 100644 index 298be57c6..000000000 --- a/pages.cn/common/git-cherry-pick.md +++ /dev/null @@ -1,16 +0,0 @@ -# git cherry-pick - -> Apply the changes introduced by existing commits to the current branch. -> To apply changes to another branch, first use git-checkout to switch to the desired branch. - -- Apply a commit to the current branch: - -`git cherry-pick {{commit}}` - -- Apply a range of commits to the current branch (see also `git rebase --onto`): - -`git cherry-pick {{start_commit}}~..{{end_commit}}` - -- Apply multiple (non-sequential) commits to the current branch: - -`git cherry-pick {{commit_1}} {{commit_2}}` diff --git a/pages.cn/common/git-clean.md b/pages.cn/common/git-clean.md deleted file mode 100644 index 6a8d2ccd8..000000000 --- a/pages.cn/common/git-clean.md +++ /dev/null @@ -1,27 +0,0 @@ -# git clean - -> Remove untracked files from the working tree. - -- Delete files that are not tracked by git: - -`git clean` - -- Interactively delete files that are not tracked by git: - -`git clean -i` - -- Show what files would be deleted without actually deleting them: - -`git clean --dry-run` - -- Forcefully delete files that are not tracked by git: - -`git clean -f` - -- Forcefully delete directories that are not tracked by git: - -`git clean -fd` - -- Delete untracked files, including ignored files in `.gitignore` and `.git/info/exclude`: - -`git clean -x` diff --git a/pages.cn/common/git-clone.md b/pages.cn/common/git-clone.md deleted file mode 100644 index 2d1f9e3d9..000000000 --- a/pages.cn/common/git-clone.md +++ /dev/null @@ -1,23 +0,0 @@ -# git clone - -> Clone an existing repository. - -- Clone an existing repository: - -`git clone {{remote_repository_location}}` - -- Clone an existing repository and its submodules: - -`git clone --recursive {{remote_repository_location}}` - -- For cloning from the local machine: - -`git clone -l` - -- Do it quietly: - -`git clone -q` - -- Clone an existing repository, and truncate to the specified number of revisions, save your time mostly: - -`git clone --depth {{10}} {{remote_repository_location}}` diff --git a/pages.cn/common/git-commit.md b/pages.cn/common/git-commit.md deleted file mode 100644 index 4bf129dd8..000000000 --- a/pages.cn/common/git-commit.md +++ /dev/null @@ -1,15 +0,0 @@ -# git commit - -> Commit files to the repository. - -- Commit staged files to the repository with a message: - -`git commit -m {{message}}` - -- Auto stage all modified files and commit with a message: - -`git commit -a -m {{message}}` - -- Replace the last commit with currently staged changes: - -`git commit --amend` diff --git a/pages.cn/common/git-config.md b/pages.cn/common/git-config.md deleted file mode 100644 index 0a6f2eb06..000000000 --- a/pages.cn/common/git-config.md +++ /dev/null @@ -1,28 +0,0 @@ -# git config - -> Manage custom configuration options for git repositories. -> These configurations can be local (for the current repository) or global (for the current user). - -- List only local configuration entries (stored in `.git/config` in the current repository): - -`git config --list --local` - -- List only global configuration entries (stored in `~/.gitconfig`): - -`git config --list --global` - -- List all configuration entries that have been defined either locally or globally: - -`git config --list` - -- Get the value of a given configuration entry: - -`git config alias.unstage` - -- Set the global value of a given configuration entry: - -`git config --global alias.unstage "reset HEAD --"` - -- Revert a global configuration entry to its default value: - -`git config --global --unset alias.unstage` diff --git a/pages.cn/common/git-diff.md b/pages.cn/common/git-diff.md deleted file mode 100644 index e9f69d78f..000000000 --- a/pages.cn/common/git-diff.md +++ /dev/null @@ -1,39 +0,0 @@ -# git diff - -> Show changes to tracked files. - -- Show unstaged, uncommitted changes: - -`git diff` - -- Show all uncommitted changes (including staged ones): - -`git diff HEAD` - -- Show only staged (added, but not yet committed) changes: - -`git diff --staged` - -- Show changes from all commits since a given date/time (a date expression, e.g. "1 week 2 days" or an ISO date): - -`git diff 'HEAD@{3 months|weeks|days|hours|seconds ago}'` - -- Show only names of changed files since a given commit: - -`git diff --name-only {{commit}}` - -- Output a summary of file creations, renames and mode changes since a given commit: - -`git diff --summary {{commit}}` - -- Create a patch file: - -`git diff > {{target_file}}.patch` - -- Compare a single file between two branches or commits: - -`git diff {{branch_1}}..{{branch_2}} [--] {{path/to/file}}` - -- Compare different files from the current branch to other branch: - -`git diff {{branch}}:{{path/to/file2}} {{path/to/file}}` diff --git a/pages.cn/common/git-fetch.md b/pages.cn/common/git-fetch.md deleted file mode 100644 index a4d33ba84..000000000 --- a/pages.cn/common/git-fetch.md +++ /dev/null @@ -1,23 +0,0 @@ -# git fetch - -> Download objects and refs from a remote repository. - -- Fetch the latest changes from the default remote upstream repository (if set): - -`git fetch` - -- Fetch new branches from a specific remote upstream repository: - -`git fetch {{remote_name}}` - -- Fetch the latest changes from all remote upstream repositories: - -`git fetch --all` - -- Also fetch tags from the remote upstream repository: - -`git fetch --tags` - -- Delete local references to remote branches that have been deleted upstream: - -`git fetch --prune` diff --git a/pages.cn/common/git-format-patch.md b/pages.cn/common/git-format-patch.md deleted file mode 100644 index 8cba68c3a..000000000 --- a/pages.cn/common/git-format-patch.md +++ /dev/null @@ -1,16 +0,0 @@ -# git format-patch - -> Prepare .patch files. Useful when emailing commits elsewhere. -> See also `git am`, which can apply generated .patch files. - -- Create an auto-named .patch file for all the unpushed commits: - -`git format-patch {{origin}}` - -- Write a .patch file for all the commits between 2 revisions to stdout: - -`git format-patch {{revision_1}}..{{revision_2}}` - -- Write a .patch file for the 3 latest commits: - -`git format-patch -{{3}}` diff --git a/pages.cn/common/git-gc.md b/pages.cn/common/git-gc.md deleted file mode 100644 index 470675cbf..000000000 --- a/pages.cn/common/git-gc.md +++ /dev/null @@ -1,23 +0,0 @@ -# git gc - -> Optimise the local repository by cleaning unnecessary files. - -- Optimise the repository: - -`git gc` - -- Aggressively optimise, takes more time: - -`git gc --aggressive` - -- Do not prune loose objects (prunes by default): - -`git gc --no-prune` - -- Suppress all output: - -`git gc --quiet` - -- View full usage: - -`git gc --help` diff --git a/pages.cn/common/git-imerge.md b/pages.cn/common/git-imerge.md deleted file mode 100644 index 4e50d900a..000000000 --- a/pages.cn/common/git-imerge.md +++ /dev/null @@ -1,28 +0,0 @@ -# git-imerge - -> Perform a merge or rebase between two git branches incrementally. -> Conflicts between branches are tracked down to pairs of individual commits, to simplify conflict resolution. - -- Start imerge-based rebase (checkout the branch to be rebased, first): - -`git imerge rebase {{branch_to_rebase_onto}}` - -- Start imerge-based merge (checkout the branch to merge into, first): - -`git imerge merge {{branch_to_be_merged}}` - -- Show ASCII diagram of in-progress merge or rebase: - -`git imerge diagram` - -- Continue imerge operation after resolving conflicts (`git add` the conflicted files, first): - -`git imerge continue --no-edit` - -- Wrap up imerge operation, after all conflicts are resolved: - -`git imerge finish` - -- Abort imerge operation, and return to the previous branch: - -`git-imerge remove && git checkout {{previous_branch}}` diff --git a/pages.cn/common/git-init.md b/pages.cn/common/git-init.md deleted file mode 100644 index 374debae0..000000000 --- a/pages.cn/common/git-init.md +++ /dev/null @@ -1,11 +0,0 @@ -# git init - -> Initializes a new local Git repository. - -- Initialize a new local repository: - -`git init` - -- Initialize a barebones repository, suitable for use as a remote over ssh: - -`git init --bare` diff --git a/pages.cn/common/git-log.md b/pages.cn/common/git-log.md deleted file mode 100644 index 19c5c3d3b..000000000 --- a/pages.cn/common/git-log.md +++ /dev/null @@ -1,31 +0,0 @@ -# git log - -> Show a history of commits. - -- Show the sequence of commits starting from the current one, in reverse chronological order: - -`git log` - -- Show the history of a particular file or directory, including differences: - -`git log -p {{path}}` - -- Show only the first line of each commit message: - -`git log --oneline` - -- Show an overview of which file(s) changed in each commit: - -`git log --stat` - -- Show a graph of commits in the current branch: - -`git log --graph` - -- Show a graph of all commits, tags and branches in the entire repo: - -`git log --oneline --decorate --all --graph` - -- Show only commits whose messages include a given string (case-insensitively): - -`git log -i --grep {{search_string}}` diff --git a/pages.cn/common/git-merge.md b/pages.cn/common/git-merge.md deleted file mode 100644 index ad1f212f4..000000000 --- a/pages.cn/common/git-merge.md +++ /dev/null @@ -1,19 +0,0 @@ -# git merge - -> Merge branches. - -- Merge a branch with your current branch: - -`git merge {{branch_name}}` - -- Edit the merge message: - -`git merge -e {{branch_name}}` - -- Merge a branch and create a merge commit: - -`git merge --no-ff {{branch_name}}` - -- Abort a merge in case of conflicts: - -`git merge --abort` diff --git a/pages.cn/common/git-mv.md b/pages.cn/common/git-mv.md deleted file mode 100644 index 12e724358..000000000 --- a/pages.cn/common/git-mv.md +++ /dev/null @@ -1,15 +0,0 @@ -# git mv - -> Move or rename files and update the git index. - -- Move file inside the repo and add the movement to the next commit: - -`git mv {{path/to/file}} {{new/path/to/file}}` - -- Rename file and add renaming to the next commit: - -`git mv {{filename}} {{new_filename}}` - -- Overwrite the file in the target path if it exists: - -`git mv --force {{file}} {{target}}` diff --git a/pages.cn/common/git-pull.md b/pages.cn/common/git-pull.md deleted file mode 100644 index 27e4dd111..000000000 --- a/pages.cn/common/git-pull.md +++ /dev/null @@ -1,15 +0,0 @@ -# git pull - -> Fetch branch from a remote repository and merge it to local repository. - -- Download changes from default remote repository and merge it: - -`git pull` - -- Download changes from default remote repository and use fast forward: - -`git pull --rebase` - -- Download changes from given remote repository and branch, then merge them into HEAD: - -`git pull {{remote_name}} {{branch}}` diff --git a/pages.cn/common/git-push.md b/pages.cn/common/git-push.md deleted file mode 100644 index 350f67b60..000000000 --- a/pages.cn/common/git-push.md +++ /dev/null @@ -1,31 +0,0 @@ -# git push - -> Push commits to a remote repository. - -- Send local changes in the current branch to its remote counterpart: - -`git push` - -- Send local changes in a given branch to its remote counterpart: - -`git push {{remote_name}} {{local_branch}}` - -- Publish the current branch to a remote repository, setting the remote branch name: - -`git push {{remote_name}} -u {{remote_branch}}` - -- Send changes on all local branches to their counterparts in a given remote repository: - -`git push --all {{remote_name}}` - -- Delete a branch in a remote repository: - -`git push {{remote_name}} --delete {{remote_branch}}` - -- Remove remote branches that don't have a local counterpart: - -`git push --prune {{remote_name}}` - -- Publish tags that aren't yet in the remote repository: - -`git push --tags` diff --git a/pages.cn/common/git-rebase.md b/pages.cn/common/git-rebase.md deleted file mode 100644 index 8bc408629..000000000 --- a/pages.cn/common/git-rebase.md +++ /dev/null @@ -1,28 +0,0 @@ -# git rebase - -> Reapply commits from one branch on top of another branch. -> Commonly used to "move" an entire branch to another base, creating copies of the commits in the new location. - -- Rebase the current branch on top of the master branch: - -`git rebase {{master}}` - -- Start an interactive rebase, which allows the commits to be reordered, omitted, combined or modified: - -`git rebase -i {{target_base_branch_or_commit_hash}}` - -- Continue a rebase that was interrupted by a merge failure, after editing conflicting files: - -`git rebase --continue` - -- Abort a rebase in progress (e.g. if it is interrupted by a merge conflict): - -`git rebase --abort` - -- Move part of the current branch onto a new base, providing the old base to start from: - -`git rebase --onto {{new_base}} {{old_base}}` - -- Reapply the last 5 commits in-place, stopping to allow them to be reordered, omitted, combined or modified: - -`git rebase -i {{HEAD~5}}` diff --git a/pages.cn/common/git-reflog.md b/pages.cn/common/git-reflog.md deleted file mode 100644 index ece246637..000000000 --- a/pages.cn/common/git-reflog.md +++ /dev/null @@ -1,11 +0,0 @@ -# git reflog - -> Show when the reference logs were updated in local repository. - -- View reflog: - -`git reflog` - -- View 5 latest entries in reflog: - -`git reflog -n {{5}}` diff --git a/pages.cn/common/git-remote.md b/pages.cn/common/git-remote.md deleted file mode 100644 index 850d4be66..000000000 --- a/pages.cn/common/git-remote.md +++ /dev/null @@ -1,23 +0,0 @@ -# git remote - -> Manage set of tracked repositories ("remotes"). - -- Show a list of existing remotes, their names and URL: - -`git remote -v` - -- Add a remote: - -`git remote add {{remote_name}} {{remote_url}}` - -- Change the URL of a remote: - -`git remote set-url {{remote_name}} {{new_url}}` - -- Remove a remote: - -`git remote remove {{remote_name}}` - -- Rename a remote: - -`git remote rename {{old_name}} {{new_name}}` diff --git a/pages.cn/common/git-reset.md b/pages.cn/common/git-reset.md deleted file mode 100644 index 84d760ec3..000000000 --- a/pages.cn/common/git-reset.md +++ /dev/null @@ -1,32 +0,0 @@ -# git reset - -> Undo commits or unstage changes, by resetting the current git HEAD to the specified state. -> If a path is passed, it works as "unstage"; if a commit hash or branch is passed, it works as "uncommit". - -- Unstage everything: - -`git reset` - -- Unstage specific file(s): - -`git reset {{path/to/file(s)}}` - -- Unstage portions of a file: - -`git reset -p {{path/to/file}}` - -- Undo the last commit, keeping its changes (and any further uncommitted changes) in the filesystem: - -`git reset HEAD~` - -- Undo the last two commits, adding their changes to the index, i.e. staged for commit: - -`git reset --soft HEAD~2` - -- Discard any uncommitted changes, staged or not (for only unstaged changes, use `git checkout`): - -`git reset --hard` - -- Reset the repository to a given commit, discarding committed, staged and uncommitted changes since then: - -`git reset --hard {{commit}}` diff --git a/pages.cn/common/git-rm.md b/pages.cn/common/git-rm.md deleted file mode 100644 index 8ea20f88c..000000000 --- a/pages.cn/common/git-rm.md +++ /dev/null @@ -1,15 +0,0 @@ -# git rm - -> Remove files from repository index and local filesystem. - -- Remove file from repository index and filesystem: - -`git rm {{file}}` - -- Remove directory: - -`git rm -r {{directory}}` - -- Remove file from repository index but keep it untouched locally: - -`git rm --cached {{file}}` diff --git a/pages.cn/common/git-shortlog.md b/pages.cn/common/git-shortlog.md deleted file mode 100644 index 3c074b77f..000000000 --- a/pages.cn/common/git-shortlog.md +++ /dev/null @@ -1,19 +0,0 @@ -# git shortlog - -> Summarizes the `git log` output. - -- View a summary of all the commits made, grouped alphabetically by author name: - -`git shortlog` - -- View a summary of all the commits made, sorted by the number of commits made: - -`git shortlog -n` - -- View a summary of all the commits made, grouped by the commiter identities (name and email): - -`git shortlog -c` - -- View a summary of the last 5 commits (i.e. specify a revision range): - -`git shortlog HEAD~{{5}}..HEAD` diff --git a/pages.cn/common/git-show.md b/pages.cn/common/git-show.md deleted file mode 100644 index 8e402a8ff..000000000 --- a/pages.cn/common/git-show.md +++ /dev/null @@ -1,23 +0,0 @@ -# git show - -> Show various types of git objects (commits, tags, etc.). - -- Show information about the latest commit (message, changes, and other metadata): - -`git show` - -- Show information about a given commit: - -`git show {{commit}}` - -- Show information about the commit associated with a given tag: - -`git show {{tag}}` - -- Show information about the 3rd commit from the tip of a branch: - -`git show {{branch}}~{{3}}` - -- Show a commit's hash and message in a single line, suppressing the diff output: - -`git show --oneline -s {{commit}}` diff --git a/pages.cn/common/git-sizer.md b/pages.cn/common/git-sizer.md deleted file mode 100644 index e9774529c..000000000 --- a/pages.cn/common/git-sizer.md +++ /dev/null @@ -1,15 +0,0 @@ -# git sizer - -> Computes various Git repository size metrics and alerts you to any that might cause problems or inconvenience. - -- Report only statistics that have a level of concern greater than 0: - -`git sizer` - -- Report all statistics: - -`git sizer -v` - -- See additional options: - -`git sizer -h` diff --git a/pages.cn/common/git-stash.md b/pages.cn/common/git-stash.md deleted file mode 100644 index 194c78a98..000000000 --- a/pages.cn/common/git-stash.md +++ /dev/null @@ -1,35 +0,0 @@ -# git stash - -> Stash local Git changes in a temporary area. - -- Stash current changes, except new (untracked) files: - -`git stash [save {{optional_stash_message}}]` - -- Stash current changes, including new (untracked) files: - -`git stash -u` - -- Interactively select parts of changed files for stashing: - -`git stash -p` - -- List all stashes (shows stash name, related branch and message): - -`git stash list` - -- Apply a stash (default is the latest, named stash@{0}): - -`git stash apply {{optional_stash_name_or_commit}}` - -- Apply a stash (default is stash@{0}), and remove it from the stash list if applying doesn't cause conflicts: - -`git stash pop {{optional_stash_name}}` - -- Drop a stash (default is stash@{0}): - -`git stash drop {{optional_stash_name}}` - -- Drop all stashes: - -`git stash clear` diff --git a/pages.cn/common/git-status.md b/pages.cn/common/git-status.md deleted file mode 100644 index c91750a97..000000000 --- a/pages.cn/common/git-status.md +++ /dev/null @@ -1,11 +0,0 @@ -# git status - -> Show the index (changed files). - -- Show changed files which are not yet added for commit: - -`git status` - -- Give output in short format: - -`git status -s` diff --git a/pages.cn/common/git-submodule.md b/pages.cn/common/git-submodule.md deleted file mode 100644 index 181feaf74..000000000 --- a/pages.cn/common/git-submodule.md +++ /dev/null @@ -1,19 +0,0 @@ -# git submodule - -> Inspects, updates and manages submodules. - -- Install a repository's specified submodules: - -`git submodule update --init --recursive` - -- Add a git repository as a submodule: - -`git submodule add {{repository_url}}` - -- Add a git repository as a submodule at the specified directory: - -`git submodule add {{repository_url}} {{path/to/directory}}` - -- Update every submodule to its latest commit: - -`git submodule foreach git pull` diff --git a/pages.cn/common/git-svn.md b/pages.cn/common/git-svn.md deleted file mode 100644 index 8104af9b0..000000000 --- a/pages.cn/common/git-svn.md +++ /dev/null @@ -1,23 +0,0 @@ -# git svn - -> Bidirectional operation between a Subversion repository and Git. - -- Clone an SVN repository: - -`git svn clone {{https://example.com/subversion_repo}} {{local_dir}}` - -- Clone a SVN repository starting at a given revision number: - -`git svn clone -r{{1234}}:HEAD {{https://svn.example.net/subversion/repo}} {{local_dir}}` - -- Update local clone from the remote SVN repository: - -`git svn rebase` - -- Fetch updates from the remote SVN repository without changing the git HEAD: - -`git svn fetch` - -- Commit back to the SVN repository: - -`git svn dcommit` diff --git a/pages.cn/common/git-tag.md b/pages.cn/common/git-tag.md deleted file mode 100644 index 73e0984eb..000000000 --- a/pages.cn/common/git-tag.md +++ /dev/null @@ -1,32 +0,0 @@ -# git tag - -> Create, list, delete or verify tags. -> A tag is a static reference to a specific commit. - -- List all tags: - -`git tag` - -- Create a tag with the given name pointing to the current commit: - -`git tag {{tag_name}}` - -- Create a tag with the given name pointing to a given commit: - -`git tag {{tag_name}} {{commit}}` - -- Create an annotated tag with the given message: - -`git tag {{tag_name}} -m {{tag_message}}` - -- Delete the tag with the given name: - -`git tag -d {{tag_name}}` - -- Get updated tags from upstream: - -`git fetch --tags` - -- List all tags whose ancestors include a given commit: - -`git tag --contains {{commit}}` diff --git a/pages.cn/common/git-worktree.md b/pages.cn/common/git-worktree.md deleted file mode 100644 index 016eed97c..000000000 --- a/pages.cn/common/git-worktree.md +++ /dev/null @@ -1,19 +0,0 @@ -# git worktree - -> Manage multiple working trees attached to the same repository. - -- Create a new folder with the specified branch checked out into it: - -`git worktree add {{path/to/folder}} {{branch}}` - -- Create a new folder with a new branch checked out into it: - -`git worktree add {{path/to/folder}} -b {{new_branch}}` - -- List all the working directories attached to this repository: - -`git worktree list` - -- Remove a worktree (after deleting worktree folder): - -`git worktree prune` diff --git a/pages.cn/common/git.md b/pages.cn/common/git.md deleted file mode 100644 index 67ac1fb63..000000000 --- a/pages.cn/common/git.md +++ /dev/null @@ -1,19 +0,0 @@ -# git - -> Distributed version control system. - -- Check the Git version: - -`git --version` - -- Call general help: - -`git --help` - -- Call help on a command: - -`git help {{command}}` - -- Execute Git command: - -`git {{command}}` diff --git a/pages.cn/common/gitk.md b/pages.cn/common/gitk.md deleted file mode 100644 index ddcd2b6e9..000000000 --- a/pages.cn/common/gitk.md +++ /dev/null @@ -1,23 +0,0 @@ -# gitk - -> A graphical git repository browser. - -- Show the repository browser for the current git repository: - -`gitk` - -- Show repository browser for a specific file or folder: - -`gitk {{path/to/file_or_folder}}` - -- Show commits made since 1 week ago: - -`gitk --since={{"1 week ago"}}` - -- Show commits older than 1/1/2016: - -`gitk --until={{"1/1/2015"}}` - -- Show at most 100 changes in all branches: - -` gitk --max-count={{100}} --all` diff --git a/pages.cn/common/gitsome.md b/pages.cn/common/gitsome.md deleted file mode 100644 index cb9508893..000000000 --- a/pages.cn/common/gitsome.md +++ /dev/null @@ -1,28 +0,0 @@ -# gitsome - -> A terminal-based interface for GitHub, accessed via the `gh` command. -> It also provides menu-style autocomplete suggestions for `git` commands. - -- Enter the gitsome shell (optional), to enable autocompletion and interactive help for git (and gh) commands: - -`gitsome` - -- Setup GitHub integration with the current account: - -`gh configure` - -- List notifications for the current account (as would be seen in https://github.com/notifications): - -`gh notifications` - -- List the current account's starred repos, filtered by a given search string: - -`gh starred "{{python 3}}"` - -- View the recent activity feed of a given GitHub repository: - -`gh feed {{tldr-pages/tldr}}` - -- View the recent activity feed for a given GitHub user, using the default pager (e.g. `less`): - -`gh feed {{torvalds}} -p` diff --git a/pages.cn/common/glances.md b/pages.cn/common/glances.md deleted file mode 100644 index e4c2bab4a..000000000 --- a/pages.cn/common/glances.md +++ /dev/null @@ -1,23 +0,0 @@ -# glances - -> A cross-platform system monitoring tool. - -- Run in terminal: - -`glances` - -- Run in web server mode to show results in browser: - -`glances -w` - -- Run in server mode to allow connections from other Glances clients: - -`glances -s` - -- Connect to a Glances server: - -`glances -c {{hostname}}` - -- Require a password in (web) server mode: - -`glances -s --password` diff --git a/pages.cn/common/gnomon.md b/pages.cn/common/gnomon.md deleted file mode 100644 index d3d54136d..000000000 --- a/pages.cn/common/gnomon.md +++ /dev/null @@ -1,23 +0,0 @@ -# gnomon - -> Utility to annotate console logging statements with timestamps and find slow processes. - -- Use UNIX (or DOS) pipes to pipe the stdout of any command through gnomon: - -`{{npm test}} | gnomon` - -- Show number of seconds since the start of the process: - -`{{npm test}} | gnomon --type=elapsed-total` - -- Show an absolute timestamp in UTC: - -`{{npm test}} | gnomon --type=absolute` - -- Set a high threshold of 0.5 seconds for the elapsed time; exceeding which the timestamp will be colored bright red: - -`{{npm test}} | gnomon --high {{0.5}}` - -- Set a medium threshold of 0.2 seconds (Timestamp will be colored bright yellow): - -`{{npm test}} | gnomon --medium {{0.2}}` diff --git a/pages.cn/common/gnuplot.md b/pages.cn/common/gnuplot.md deleted file mode 100644 index 8dad15642..000000000 --- a/pages.cn/common/gnuplot.md +++ /dev/null @@ -1,19 +0,0 @@ -# gnuplot - -> A graph plotter that outputs in several formats. - -- Start the interactive graph plotting shell: - -`gnuplot` - -- Plot the graph for the specified graph definition file: - -`gnuplot {{path/to/definition.plt}}` - -- Set the output format by executing a command before loading the definition file: - -`gnuplot -e "{{set output "path/to/filename.png" size 1024,768}}" {{path/to/definition.plt}}` - -- Persist the graph plot preview window after gnuplot exits: - -`gnuplot --persist {{path/to/definition.plt}}` diff --git a/pages.cn/common/go.md b/pages.cn/common/go.md deleted file mode 100644 index ed2260814..000000000 --- a/pages.cn/common/go.md +++ /dev/null @@ -1,27 +0,0 @@ -# go - -> Tool for managing go source code. - -- Download and install a package, specified by its import path: - -`go get {{package_path}}` - -- Compile and run a source file (it has to contain a `main` package): - -`go run {{file}}.go` - -- Compile a source file into a named executable: - -`go build -o {{executable}} {{file}}.go` - -- Compile the package present in the current directory: - -`go build` - -- Execute all test cases of the current package (files have to end with `_test.go`): - -`go test` - -- Compile and install the current package: - -`go install` diff --git a/pages.cn/common/gocryptfs.md b/pages.cn/common/gocryptfs.md deleted file mode 100644 index dd638fd29..000000000 --- a/pages.cn/common/gocryptfs.md +++ /dev/null @@ -1,23 +0,0 @@ -# gocryptfs - -> Encrypted overlay filesystem written in Go. - -- Initialize an encrypted filesystem: - -`gocryptfs -init {{path/to/cipher_dir}}` - -- Mount an encrypted filesystem: - -`gocryptfs {{path/to/cipher_dir}} {{path/to/mount_point}}` - -- Mount with the explicit master key instead of password: - -`gocryptfs --masterkey {{path/to/cipher_dir}} {{path/to/mount_point}}` - -- Change the password: - -`gocryptfs --passwd {{path/to/cipher_dir}}` - -- Make an encrypted snapshot of a plain directory: - -`gocryptfs --reverse {{path/to/plain_dir}} {{path/to/cipher_dir}}` diff --git a/pages.cn/common/godoc.md b/pages.cn/common/godoc.md deleted file mode 100644 index f51b69156..000000000 --- a/pages.cn/common/godoc.md +++ /dev/null @@ -1,23 +0,0 @@ -# godoc - -> Show documentation for go packages. - -- Display help for package "fmt": - -`godoc {{fmt}}` - -- Display help for the function "Printf" of "fmt" package: - -`godoc {{fmt}} {{Printf}}` - -- Serve documentation as a web server on port "6060": - -`godoc -http=:{{6060}}` - -- Create an index file: - -`godoc -write_index -index_files={{path/to/file}}` - -- Use the given index file to search the docs: - -`godoc -http=:{{6060}} -index -index_files={{path/to/file}}` diff --git a/pages.cn/common/godot.md b/pages.cn/common/godot.md deleted file mode 100644 index 852ac2ab3..000000000 --- a/pages.cn/common/godot.md +++ /dev/null @@ -1,23 +0,0 @@ -# godot - -> An open source 2D and 3D game engine. - -- Run a project if the current directory contains a `project.godot` file, otherwise open the project manager: - -`godot` - -- Edit a project (the current directory must contain a `project.godot` file): - -`godot -e` - -- Open the project manager even if the current directory contains a `project.godot` file: - -`godot -p` - -- Export a project for a given target (the target must be defined in the project): - -`godot --export {{target}}` - -- Execute a standalone GDScript file: - -`godot -s {{script.gd}}` diff --git a/pages.cn/common/gofmt.md b/pages.cn/common/gofmt.md deleted file mode 100644 index 7c7dadafc..000000000 --- a/pages.cn/common/gofmt.md +++ /dev/null @@ -1,19 +0,0 @@ -# gofmt - -> Tool for formatting Go source code. - -- Format a file and display the result to the console: - -`gofmt {{source.go}}` - -- Format a file, overwriting the original file in-place: - -`gofmt -w {{source.go}}` - -- Format a file, and then simplify the code, overwriting the original file: - -`gofmt -s -w {{source.go}}` - -- Print all (including spurious) errors: - -`gofmt -e {{source.go}}` diff --git a/pages.cn/common/gource.md b/pages.cn/common/gource.md deleted file mode 100644 index 8304fcc16..000000000 --- a/pages.cn/common/gource.md +++ /dev/null @@ -1,28 +0,0 @@ -# gource - -> Renders an animated tree diagram of Git, SVN, Mercurial and Bazaar repositories. -> It shows files and folders being created, modified or removed over time. - -- Run gource in a directory (if it isn't the repository's root directory, the root is seeked up from there): - -`gource {{path/to/repository}}` - -- Run gource in the current directory, with a custom output resolution: - -`gource -{{width}}x{{height}}` - -- Set a custom time scale for the animation: - -`gource -c {{time_scale_multiplier}}` - -- Set how long each day should be in the animation (this combines with -c, if provided): - -`gource -s {{seconds}}` - -- Set fullscreen mode and a custom background color: - -`gource -f -b {{hex_color_code}}` - -- Set a title for the animation: - -`gource --title {{title}}` diff --git a/pages.cn/common/gpg-zip.md b/pages.cn/common/gpg-zip.md deleted file mode 100644 index 4a024bc02..000000000 --- a/pages.cn/common/gpg-zip.md +++ /dev/null @@ -1,15 +0,0 @@ -# gpg-zip - -> Encrypt files and directories in an archive using GPG. - -- Encrypt a directory into archive.gpg using a passphrase: - -`gpg-zip --symmetric --output {{archive.gpg}} {{path/to/directory}}` - -- Decrypt archive.gpg into a directory of the same name: - -`gpg-zip --decrypt {{path/to/archive.gpg}}` - -- List the contents of the encrypted archive.gpg: - -`gpg-zip --list-archive {{path/to/archive.gpg}}` diff --git a/pages.cn/common/gpg.md b/pages.cn/common/gpg.md deleted file mode 100644 index 99ede5898..000000000 --- a/pages.cn/common/gpg.md +++ /dev/null @@ -1,31 +0,0 @@ -# gpg - -> GNU Privacy Guard. - -- Sign doc.txt without encryption (writes output to doc.txt.asc): - -`gpg --clearsign {{doc.txt}}` - -- Encrypt doc.txt for alice@example.com (output to doc.txt.gpg): - -`gpg --encrypt --recipient {{alice@example.com}} {{doc.txt}}` - -- Encrypt doc.txt with only a passphrase (output to doc.txt.gpg): - -`gpg --symmetric {{doc.txt}}` - -- Decrypt doc.txt.gpg (output to STDOUT): - -`gpg --decrypt {{doc.txt.gpg}}` - -- Import a public key: - -`gpg --import {{public.gpg}}` - -- Export public key for alice@example.com (output to STDOUT): - -`gpg --export --armor {{alice@example.com}}` - -- Export private key for alice@example.com (output to STDOUT): - -`gpg --export-secret-keys --armor {{alice@example.com}}` diff --git a/pages.cn/common/gradle.md b/pages.cn/common/gradle.md deleted file mode 100644 index 9dc466d47..000000000 --- a/pages.cn/common/gradle.md +++ /dev/null @@ -1,23 +0,0 @@ -# gradle - -> Gradle is an advanced open source build automation system. - -- Compile a package: - -`gradle build` - -- Exclude test task: - -`gradle build -x {{test}}` - -- Run in offline mode to prevent gradle from accessing the network during builds: - -`gradle build --offline` - -- Clear the build folder: - -`gradle clean` - -- Compile and Release package: - -`gradle assembleRelease` diff --git a/pages.cn/common/grep.md b/pages.cn/common/grep.md deleted file mode 100644 index 4a67fcb5c..000000000 --- a/pages.cn/common/grep.md +++ /dev/null @@ -1,36 +0,0 @@ -# grep - -> Matches patterns in input text. -> Supports simple patterns and regular expressions. - -- Search for an exact string: - -`grep {{search_string}} {{path/to/file}}` - -- Search in case-insensitive mode: - -`grep -i {{search_string}} {{path/to/file}}` - -- Search recursively (ignoring non-text files) in current directory for an exact string: - -`grep -RI {{search_string}} .` - -- Use extended regular expressions (supporting `?`, `+`, `{}`, `()` and `|`): - -`grep -E {{^regex$}} {{path/to/file}}` - -- Print 3 lines of [C]ontext around, [B]efore, or [A]fter each match: - -`grep -{{C|B|A}} 3 {{search_string}} {{path/to/file}}` - -- Print file name with the corresponding line number for each match: - -`grep -Hn {{search_string}} {{path/to/file}}` - -- Use the standard input instead of a file: - -`cat {{path/to/file}} | grep {{search_string}}` - -- Invert match for excluding specific strings: - -`grep -v {{search_string}}` diff --git a/pages.cn/common/groff.md b/pages.cn/common/groff.md deleted file mode 100644 index 5abfae289..000000000 --- a/pages.cn/common/groff.md +++ /dev/null @@ -1,24 +0,0 @@ -# groff - -> Typesetting program that reads plain text mixed with formatting commands and produces formatted output. -> It is the GNU replacement for the `troff` and `nroff` Unix commands for text formatting. - -- Render a man page as plain text, and display the result: - -`groff -man -T utf8 {{manpage.1}}` - -- Render a man page using the ASCII output device, and display it using a pager: - -`groff -man -T ascii {{manpage.1}} | less` - -- Render a man page into an HTML file: - -`groff -man -T html {{manpage.1}} > {{page.html}}` - -- Process a roff file using the `tbl` and `pic` preprocessors, and the `me` macro set: - -`groff -t -p -me -T utf8 {{foo.me}}` - -- Run a `groff` command with preprocessor and macro options guessed by the `grog` utility: - -`eval "$(grog -T utf8 {{foo.me}})"` diff --git a/pages.cn/common/groups.md b/pages.cn/common/groups.md deleted file mode 100644 index e57040987..000000000 --- a/pages.cn/common/groups.md +++ /dev/null @@ -1,15 +0,0 @@ -# groups - -> Print group memberships for a user. - -- Print group memberships for the current user: - -`groups` - -- Print group memberships for a specific user: - -`groups {{username}}` - -- Print group memberships for a list of users: - -`groups {{username1}} {{username2}} {{username3}}` diff --git a/pages.cn/common/grunt.md b/pages.cn/common/grunt.md deleted file mode 100644 index 23efca85f..000000000 --- a/pages.cn/common/grunt.md +++ /dev/null @@ -1,31 +0,0 @@ -# grunt - -> A JavaScript task runner for automating processes. - -- Run the default task process: - -`grunt` - -- Run one or more specific space-separated task(s): - -`grunt {{task_name}}` - -- Specify an alternative configuration file: - -`grunt --gruntfile {{path/to/file}}` - -- Specify an alternative base path for relative files: - -`grunt --base {{path/to/directory}}` - -- Specify an additional directory to scan for tasks in: - -`grunt --tasks {{path/to/directory}}` - -- Perform a dry-run without writing any files: - -`grunt --no-write` - -- List all available options: - -`grunt --help` diff --git a/pages.cn/common/gtop.md b/pages.cn/common/gtop.md deleted file mode 100644 index 69a44bd55..000000000 --- a/pages.cn/common/gtop.md +++ /dev/null @@ -1,15 +0,0 @@ -# gtop - -> System monitoring dashboard for the terminal. - -- Show the system stats dashboard: - -`gtop` - -- Sort by CPU usage: - -`c` - -- Sort by memory usage: - -`m` diff --git a/pages.cn/common/guetzli.md b/pages.cn/common/guetzli.md deleted file mode 100644 index b4eb3b37d..000000000 --- a/pages.cn/common/guetzli.md +++ /dev/null @@ -1,15 +0,0 @@ -# guetzli - -> JPEG image compression utility. - -- Compress a JPEG image: - -`guetzli {{input.jpg}} {{output.jpg}}` - -- Create compressed JPEG image from PNG image: - -`guetzli {{input.png}} {{output.jpg}}` - -- Compress a JPEG image with desired visual quality (84-100): - -`guetzli --quality {{quality_value}} {{input.jpg}} {{output.jpg}}` diff --git a/pages.cn/common/guile.md b/pages.cn/common/guile.md deleted file mode 100644 index 86d1cca12..000000000 --- a/pages.cn/common/guile.md +++ /dev/null @@ -1,19 +0,0 @@ -# guile - -> Guile Scheme interpreter. - -- Start the Guile Scheme REPL: - -`guile` - -- Execute the script in a given Scheme file: - -`guile {{script.scm}}` - -- Execute a Scheme expression: - -`guile -c "{{expression}}"` - -- Listen on a port or a Unix domain socket (the default is port 37146) for remote REPL connections: - -`guile --listen={{port_or_socket}}` diff --git a/pages.cn/common/gulp.md b/pages.cn/common/gulp.md deleted file mode 100644 index a93ac39c3..000000000 --- a/pages.cn/common/gulp.md +++ /dev/null @@ -1,12 +0,0 @@ -# gulp - -> JavaScript task runner and streaming build system. -> Tasks are defined within gulpfile.js at the project root. - -- Run the default task: - -`gulp` - -- Run individual tasks: - -`gulp {{task}} {{othertask}}` diff --git a/pages.cn/common/gunzip.md b/pages.cn/common/gunzip.md deleted file mode 100644 index 94fa8b600..000000000 --- a/pages.cn/common/gunzip.md +++ /dev/null @@ -1,15 +0,0 @@ -# gunzip - -> Extract file(s) from a gzip (.gz) archive. - -- Extract a file from an archive, replacing the original file if it exists: - -`gunzip {{archive.tar.gz}}` - -- Extract a file to a target destination: - -`gunzip -c {{archive.tar.gz}} > {{archive.tar}}` - -- List the contents of a compressed file: - -`gunzip -l {{file.txt.gz}}` diff --git a/pages.cn/common/gzip.md b/pages.cn/common/gzip.md deleted file mode 100644 index dc64d18b3..000000000 --- a/pages.cn/common/gzip.md +++ /dev/null @@ -1,23 +0,0 @@ -# gzip - -> Compress/uncompress files with gzip compression (LZ77). - -- Compress a file, replacing it with a gzipped compressed version: - -`gzip {{file.ext}}` - -- Decompress a file, replacing it with the original uncompressed version: - -`gzip -d {{file.ext}}.gz` - -- Compress a file specifying the output filename: - -`gzip -c {{file.ext}} > {{compressed_file.ext.gz}}` - -- Uncompress a gzipped file specifying the output filename: - -`gzip -c -d {{file.ext}}.gz > {{uncompressed_file.ext}}` - -- Specify the compression level. 1=Fastest (Worst), 9=Slowest (Best), Default level is 6: - -`gzip -9 -c {{file.ext}} > {{compressed_file.ext.gz}}` diff --git a/pages.cn/common/handbrakecli.md b/pages.cn/common/handbrakecli.md deleted file mode 100644 index 4148b4dca..000000000 --- a/pages.cn/common/handbrakecli.md +++ /dev/null @@ -1,19 +0,0 @@ -# handbrakecli - -> Command-line interface to the HandBrake video conversion tool. - -- Convert a video file to MKV (AAC 160kbit audio and x264 CRF20 video): - -`handbrakecli -i {{input.avi}} -o {{output.mkv}} -e x264 -q 20 -B 160` - -- Resize a video file to 320x240: - -`handbrakecli -i {{input.mp4}} -o {{output.mp4} -w 320 -l 240` - -- List available presets: - -`handbrakecli --preset-list` - -- Convert an AVI video to MP4 using the Android preset: - -`handbrakecli --preset="Android" -i {{input.ext}} -o {{output.mp4}}` diff --git a/pages.cn/common/hangups.md b/pages.cn/common/hangups.md deleted file mode 100644 index fcbaf9c16..000000000 --- a/pages.cn/common/hangups.md +++ /dev/null @@ -1,15 +0,0 @@ -# hangups - -> Third party command line client for Google Hangouts. - -- Start hangups: - -`hangups` - -- View troubeshooting information and help: - -`hangups -h` - -- Set a refresh token for hangups: - -`hangups --token-path {{/path/to/token}}` diff --git a/pages.cn/common/haxelib.md b/pages.cn/common/haxelib.md deleted file mode 100644 index 0a85170b8..000000000 --- a/pages.cn/common/haxelib.md +++ /dev/null @@ -1,19 +0,0 @@ -# haxelib - -> Haxe Library Manager. - -- Search for a Haxe library: - -`haxelib search {{keyword}}` - -- Install a Haxe library: - -`haxelib install {{libname}}` - -- Upgrade all installed Haxe libraries: - -`haxelib upgrade` - -- Install the development version of a library from a Git repository: - -`haxelib git {{libname}} {{git_url}}` diff --git a/pages.cn/common/head.md b/pages.cn/common/head.md deleted file mode 100644 index e0351ae70..000000000 --- a/pages.cn/common/head.md +++ /dev/null @@ -1,19 +0,0 @@ -# head - -> Output the first part of files. - -- Output the first few lines of a file: - -`head -n {{count_of_lines}} {{filename}}` - -- Output the first few bytes of a file: - -`head -c {{size_in_bytes}} {{filename}}` - -- Output everything but the last few lines of a file: - -`head -n -{{count_of_lines}} {{filename}}` - -- Output everything but the last few bytes of a file: - -`head -c -{{size_in_bytes}} {{filename}}` diff --git a/pages.cn/common/helm.md b/pages.cn/common/helm.md deleted file mode 100644 index 65b460405..000000000 --- a/pages.cn/common/helm.md +++ /dev/null @@ -1,35 +0,0 @@ -# helm - -> Helm is a package manager for Kubernetes. - -- Create a helm chart: - -`helm create {{chart_name}}` - -- Add a new helm repository: - -`helm repo add {{repo_name}}` - -- List helm repositories: - -`helm repo list` - -- Update helm repositories: - -`helm repo update` - -- Delete a helm repository: - -`helm repo remove {{repo_name}}` - -- Install a helm chart: - -`helm install {{repo_name}}/{{chart_name}}` - -- Download helm chart as a tar archive: - -`helm get {{chart_release_name}}` - -- Update helm dependencies: - -`helm dependency update` diff --git a/pages.cn/common/help2man.md b/pages.cn/common/help2man.md deleted file mode 100644 index 3dfc70d05..000000000 --- a/pages.cn/common/help2man.md +++ /dev/null @@ -1,23 +0,0 @@ -# help2man - -> Produce simple man pages from an executable's `--help` and `--version` output. - -- Generate a man page for an executable: - -`help2man {{executable}}` - -- Specify the "name" paragraph in the man page: - -`help2man {{executable}} --name {{name}}` - -- Specify the section for the man page (defaults to 1): - -`help2man {{executable}} --section {{section}}` - -- Output to a file instead of stdout: - -`help2man {{executable}} --output {{path/to/file}}` - -- Display detailed help: - -`help2man --help` diff --git a/pages.cn/common/heroku.md b/pages.cn/common/heroku.md deleted file mode 100644 index 539571ee1..000000000 --- a/pages.cn/common/heroku.md +++ /dev/null @@ -1,27 +0,0 @@ -# heroku - -> Create and manage Heroku apps from the command line. - -- Login to your heroku account: - -`heroku login` - -- Create a heroku app: - -`heroku create` - -- Show logs for an app: - -`heroku logs --app {{app_name}}` - -- Run a one-off process inside a dyno (Heroku virtual machine): - -`heroku run {{process_name}} --app {{app_name}}` - -- List dynos (Heroku virtual machines) for an app: - -`heroku ps --app {{app_name}}` - -- Permanently destroy an app: - -`heroku destroy --app {{app_name}}` diff --git a/pages.cn/common/hg-add.md b/pages.cn/common/hg-add.md deleted file mode 100644 index 28d643d0f..000000000 --- a/pages.cn/common/hg-add.md +++ /dev/null @@ -1,23 +0,0 @@ -# hg add - -> Adds specified files to the staging area for the next commit in Mercurial. - -- Add files or directories to the staging area: - -`hg add {{path/to/file}}` - -- Add all unstaged files matching a specified pattern: - -`hg add --include {{pattern}}` - -- Add all unstaged files, excluding those that match a specified pattern: - -`hg add --exclude {{pattern}}` - -- Recursively add sub-repositories: - -`hg add --subrepos` - -- Perform a test-run without performing any actions: - -`hg add --dry-run` diff --git a/pages.cn/common/hg-branch.md b/pages.cn/common/hg-branch.md deleted file mode 100644 index 106b94921..000000000 --- a/pages.cn/common/hg-branch.md +++ /dev/null @@ -1,11 +0,0 @@ -# hg branch - -> Create or show a branch name. - -- Show the name of the currently active branch: - -`hg branch` - -- Create a new branch for the next commit: - -`hg branch {{branch_name}}` diff --git a/pages.cn/common/hg-clone.md b/pages.cn/common/hg-clone.md deleted file mode 100644 index aa8131fa0..000000000 --- a/pages.cn/common/hg-clone.md +++ /dev/null @@ -1,23 +0,0 @@ -# hg clone - -> Create a copy of an existing repository in a new directory. - -- Clone a repository to a specified directory: - -`hg clone {{remote_repository_source}} {{destination_path}}` - -- Clone a repository to the head of a specific branch, ignoring later commits: - -`hg clone --branch {{branch}} {{remote_repository_source}}` - -- Clone a repository with only the ".hg" directory, without checking out files: - -`hg clone --noupdate {{remote_repository_source}}` - -- Clone a repository to a specific revision, tag or branch, keeping the entire history: - -`hg clone --updaterev {{revision}} {{remote_repository_source}}` - -- Clone a repository up to a specific revision without any newer history: - -`hg clone --rev {{revision}} {{remote_repository_source}}` diff --git a/pages.cn/common/hg-commit.md b/pages.cn/common/hg-commit.md deleted file mode 100644 index 3faf5ba99..000000000 --- a/pages.cn/common/hg-commit.md +++ /dev/null @@ -1,27 +0,0 @@ -# hg commit - -> Commit all staged or specified files to the repository. - -- Commit staged files to the repository: - -`hg commit` - -- Commit a specific file or directory: - -`hg commit {{path/to/file}}` - -- Commit with a specific message: - -`hg commit --message {{message}}` - -- Commit all files matching a specified pattern: - -`hg commit --include {{pattern}}` - -- Commit all files, excluding those that match a specified pattern: - -`hg commit --exclude {{pattern}}` - -- Commit using the interactive mode: - -`hg commit --interactive` diff --git a/pages.cn/common/hg-init.md b/pages.cn/common/hg-init.md deleted file mode 100644 index 70d1babf5..000000000 --- a/pages.cn/common/hg-init.md +++ /dev/null @@ -1,11 +0,0 @@ -# hg init - -> Create a new repository in the specified directory. - -- Initialise a new repository in the current directory: - -`hg init` - -- Initialise a new repository in the specified directory: - -`hg init {{path/to/directory}}` diff --git a/pages.cn/common/hg-log.md b/pages.cn/common/hg-log.md deleted file mode 100644 index 70dae7c74..000000000 --- a/pages.cn/common/hg-log.md +++ /dev/null @@ -1,35 +0,0 @@ -# hg log - -> Display the revision history of the repository. - -- Display the entire revision history of the repository: - -`hg log` - -- Display the revision history with an ASCII graph: - -`hg log --graph` - -- Display the revision history with file names matching a specified pattern: - -`hg log --include {{pattern}}` - -- Display the revision history, excluding file names that match a specified pattern: - -`hg log --exclude {{pattern}}` - -- Display the log information for a specific revision: - -`hg log --rev {{revision}}` - -- Display the revision history for a specific branch: - -`hg log --branch {{branch}}` - -- Display the revision history for a specific date: - -`hg log --date {{date}}` - -- Display revisions committed by a specific user: - -`hg log --user {{user}}` diff --git a/pages.cn/common/hg-pull.md b/pages.cn/common/hg-pull.md deleted file mode 100644 index 91e58ff11..000000000 --- a/pages.cn/common/hg-pull.md +++ /dev/null @@ -1,31 +0,0 @@ -# hg pull - -> Pull changes from a specified repository to the local repository. - -- Pull from the "default" source path: - -`hg pull` - -- Pull from a specified source repository: - -`hg pull {{path/to/source_repository}}` - -- Update the local repository to the head of the remote: - -`hg pull --update` - -- Pull changes even when the remote repository is unrelated: - -`hg pull --force` - -- Specify a specific revision changeset to pull up to: - -`hg pull --rev {{revision}}` - -- Specify a specific branch to pull: - -`hg pull --branch {{branch}}` - -- Specify a specific bookmark to pull: - -`hg pull --bookmark {{bookmark}}` diff --git a/pages.cn/common/hg-push.md b/pages.cn/common/hg-push.md deleted file mode 100644 index 124d1454d..000000000 --- a/pages.cn/common/hg-push.md +++ /dev/null @@ -1,27 +0,0 @@ -# hg push - -> Push changes from the local repository to a specified destination. - -- Push changes to the "default" remote path: - -`hg push` - -- Push changes to a specified remote repository: - -`hg push {{path/to/destination_repository}}` - -- Push a new branch if it does not exist (disabled by default): - -`hg push --new-branch` - -- Specify a specific revision changeset to push: - -`hg push --rev {{revision}}` - -- Specify a specific branch to push: - -`hg push --branch {{branch}}` - -- Specify a specific bookmark to push: - -`hg push --bookmark {{bookmark}}` diff --git a/pages.cn/common/hg-remove.md b/pages.cn/common/hg-remove.md deleted file mode 100644 index 8cf65363e..000000000 --- a/pages.cn/common/hg-remove.md +++ /dev/null @@ -1,23 +0,0 @@ -# hg remove - -> Remove specified files from the staging area. - -- Remove files or directories from the staging area: - -`hg remove {{path/to/file}}` - -- Remove all staged files matching a specified pattern: - -`hg remove --include {{pattern}}` - -- Remove all staged files, excluding those that match a specified pattern: - -`hg remove --exclude {{pattern}}` - -- Recursively remove sub-repositories: - -`hg remove --subrepos` - -- Remove files from the repository that have been physically removed: - -`hg remove --after` diff --git a/pages.cn/common/hg-serve.md b/pages.cn/common/hg-serve.md deleted file mode 100644 index 0f1b27d84..000000000 --- a/pages.cn/common/hg-serve.md +++ /dev/null @@ -1,27 +0,0 @@ -# hg serve - -> Start a standalone Mercurial web server for browsing repositories. - -- Start a web server instance: - -`hg serve` - -- Start a web server instance on the specified port: - -`hg serve --port {{port}}` - -- Start a web server instance on the specified listening address: - -`hg serve --address {{address}}` - -- Start a web server instance with a specific identifier: - -`hg serve --name {{name}}` - -- Start a web server instance using the specified theme (see the templates directory): - -`hg serve --style {{style}}` - -- Start a web server instance using the specified SSL certificate bundle: - -`hg serve --certificate {{path/to/certificate}}` diff --git a/pages.cn/common/hg-update.md b/pages.cn/common/hg-update.md deleted file mode 100644 index 957017156..000000000 --- a/pages.cn/common/hg-update.md +++ /dev/null @@ -1,19 +0,0 @@ -# hg update - -> Update the working directory to a specified changeset. - -- Update to the tip of the current branch: - -`hg update` - -- Update to the specified revision: - -`hg update --rev {{revision}}` - -- Update and discard uncommitted changes: - -`hg update --clean` - -- Update to the last commit matching a specified date: - -`hg update --date {{dd-mm-yyyy}}` diff --git a/pages.cn/common/hg.md b/pages.cn/common/hg.md deleted file mode 100644 index b85b1de81..000000000 --- a/pages.cn/common/hg.md +++ /dev/null @@ -1,20 +0,0 @@ -# hg - -> A command line interface for Mercurial, a distributed source control management system. -> See `hg-add`, `hg-commit` and other pages for additional information. - -- Execute Mercurial command: - -`hg {{command}}` - -- Call general help: - -`hg help` - -- Call help on a command: - -`hg help {{command}}` - -- Check the Mercurial version: - -`hg --version` diff --git a/pages.cn/common/history.md b/pages.cn/common/history.md deleted file mode 100644 index 8e7acaadc..000000000 --- a/pages.cn/common/history.md +++ /dev/null @@ -1,15 +0,0 @@ -# history - -> Command Line history. - -- Display the commands history list with line numbers: - -`history` - -- Clear the commands history list (only for current `bash` shell): - -`history -c` - -- Overwrite history file with history of current `bash` shell (often combined with `history -c` to purge history): - -`history -w` diff --git a/pages.cn/common/hn.md b/pages.cn/common/hn.md deleted file mode 100644 index 2b1044958..000000000 --- a/pages.cn/common/hn.md +++ /dev/null @@ -1,19 +0,0 @@ -# hn - -> Command-line interface for Hacker News. - -- View stories on Hacker News: - -`hn` - -- View _number_ of stories on Hacker News: - -`hn --limit {{number}}` - -- View stories on Hacker News, and keep the list open after selecting a link: - -`hn --keep-open` - -- View stories on Hacker News sorted by submission date: - -`hn --latest` diff --git a/pages.cn/common/host.md b/pages.cn/common/host.md deleted file mode 100644 index ecd88fc2f..000000000 --- a/pages.cn/common/host.md +++ /dev/null @@ -1,19 +0,0 @@ -# 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}}` - -- Specify an alternate DNS server to query: - -`host {{domain}} {{8.8.8.8}}` diff --git a/pages.cn/common/hostess.md b/pages.cn/common/hostess.md deleted file mode 100644 index 998f6787d..000000000 --- a/pages.cn/common/hostess.md +++ /dev/null @@ -1,19 +0,0 @@ -# hostess - -> An idempotent command-line utility for managing your /etc/hosts file. - -- List domains, target ips and on/off status: - -`hostess list` - -- Add a domain pointing to your machine to your hosts file: - -`hostess add {{local.example.com}} {{127.0.0.1}}` - -- Remove a domain from your hosts file: - -`hostess del {{local.example.com}}` - -- Disable a domain (but don't remove it completely): - -`hostess off {{local.example.com}}` diff --git a/pages.cn/common/hostid.md b/pages.cn/common/hostid.md deleted file mode 100644 index 9aff83b58..000000000 --- a/pages.cn/common/hostid.md +++ /dev/null @@ -1,7 +0,0 @@ -# hostid - -> Prints the numeric identifier for the current host (not necessarily the IP address). - -- Display the numeric identifier for the current host in hexadecimal: - -`hostid` diff --git a/pages.cn/common/hr.md b/pages.cn/common/hr.md deleted file mode 100644 index 52e5fedd1..000000000 --- a/pages.cn/common/hr.md +++ /dev/null @@ -1,15 +0,0 @@ -# hr - -> Print a horizontal rule in the terminal. - -- Print a horizontal rule: - -`hr` - -- Print a horizontal rule with a custom string: - -`hr {{string}}` - -- Print a multiline horizontal rule: - -`hr {{string_a}} {{string_b}} {{string_c}}` diff --git a/pages.cn/common/htpasswd.md b/pages.cn/common/htpasswd.md deleted file mode 100644 index 4f9b72b61..000000000 --- a/pages.cn/common/htpasswd.md +++ /dev/null @@ -1,23 +0,0 @@ -# htpasswd - -> Create and manage htpasswd files to protect web server directories using basic authentication. - -- Create/overwrite htpasswd file: - -`htpasswd -c {{path/to/file}} {{user_name}}` - -- Add user to htpasswd file or update existing user: - -`htpasswd {{path/to/file}} {{user_name}}` - -- Add user to htpasswd file in batch mode without an interactive password prompt (for script usage): - -`htpasswd -b {{path/to/file}} {{user_name}} {{password}}` - -- Delete user from htpasswd file: - -`htpasswd -D {{path/to/file}} {{user_name}}` - -- Verify user password: - -`htpasswd -v {{path/to/file}} {{user_name}}` diff --git a/pages.cn/common/http.md b/pages.cn/common/http.md deleted file mode 100644 index 87f02da3e..000000000 --- a/pages.cn/common/http.md +++ /dev/null @@ -1,31 +0,0 @@ -# http - -> HTTPie: HTTP client, a user-friendly cURL replacement. - -- Download a URL to a file: - -`http -d {{example.org}}` - -- Send form-encoded data: - -`http -f {{example.org}} {{name='bob'}} {{profile_picture@'bob.png'}}` - -- Send JSON object: - -`http {{example.org}} {{name='bob'}}` - -- Specify an HTTP method: - -`http {{HEAD}} {{example.org}}` - -- Include an extra header: - -`http {{example.org}} {{X-MyHeader:123}}` - -- Pass a user name and password for server authentication: - -`http -a {{username:password}} {{example.org}}` - -- Specify raw request body via stdin: - -`cat {{data.txt}} | http PUT {{example.org}}` diff --git a/pages.cn/common/hub.md b/pages.cn/common/hub.md deleted file mode 100644 index 97b682ec5..000000000 --- a/pages.cn/common/hub.md +++ /dev/null @@ -1,24 +0,0 @@ -# hub - -> A wrapper for git that adds commands for working with github-based projects. -> The commands can also be used using "git" instead of "hub". - -- Clone a repository you own, using just the repository name rather than the full URL: - -`hub clone {{repo_name}}` - -- Clone another user's repository, using their github username and the repository name: - -`hub clone {{username}}/{{repo_name}}` - -- Create a fork of the current repository (cloned from another user) under your github profile: - -`hub fork` - -- Create a PR of the current branch in the original repository (after pushing the branch to github): - -`hub pull-request` - -- Upload the current (local-only) repository to your github account: - -`hub create` diff --git a/pages.cn/common/hugo.md b/pages.cn/common/hugo.md deleted file mode 100644 index 5aa06fa37..000000000 --- a/pages.cn/common/hugo.md +++ /dev/null @@ -1,31 +0,0 @@ -# hugo - -> Hugo is a fast and flexible static site generator. - -- Create a new Hugo site: - -`hugo new site {{path/to/site}}` - -- Create a new Hugo theme (themes may also be downloaded from https://themes.gohugo.io/): - -`hugo new theme {{theme_name}}` - -- Create a new page: - -`hugo new {{section_name}}/{{filename}}` - -- Build a site to the `./public/` directory: - -`hugo` - -- Build a site including pages that are marked as a "draft": - -`hugo --buildDrafts` - -- Build a site to a given directory: - -`hugo --destination {{path/to/destination}}` - -- Build a site, start up a webserver to serve it, and automatically reload when pages are edited: - -`hugo server` diff --git a/pages.cn/common/hyperfine.md b/pages.cn/common/hyperfine.md deleted file mode 100644 index d99e959d4..000000000 --- a/pages.cn/common/hyperfine.md +++ /dev/null @@ -1,27 +0,0 @@ -# hyperfine - -> A command-line benchmarking tool. - -- Run a basic benchmark, performing at least 10 runs: - -`hyperfine '{{make}}'` - -- Run a comparative benchmark: - -`hyperfine '{{make target1}}' '{{make target2}}'` - -- Change minimum number of benchmarking runs: - -`hyperfine --min-runs {{7}} '{{make}}'` - -- Perform benchmark with warmup: - -`hyperfine --warmup {{5}} '{{make}}'` - -- Run a command before each benchmark run (to clear caches, etc.): - -`hyperfine --prepare '{{make clean}}' '{{make}}'` - -- Run a benchmark where a single parameter changes for each run: - -`hyperfine --prepare '{{make clean}}' --parameter-scan num_threads {{1}} {{10}} '{{make -j {num_threads}}}'` diff --git a/pages.cn/common/iconv.md b/pages.cn/common/iconv.md deleted file mode 100644 index 40baed855..000000000 --- a/pages.cn/common/iconv.md +++ /dev/null @@ -1,15 +0,0 @@ -# iconv - -> Converts text from one encoding to another. - -- Convert file to a specific encoding, and print to stdout: - -`iconv -f {{from_encoding}} -t {{to_encoding}} {{input_file}}` - -- Convert file to the current locale's encoding, and output to a file: - -`iconv -f {{from_encoding}} {{input_file}} > {{output_file}}` - -- List supported encodings: - -`iconv -l` diff --git a/pages.cn/common/id.md b/pages.cn/common/id.md deleted file mode 100644 index 2aa5331ba..000000000 --- a/pages.cn/common/id.md +++ /dev/null @@ -1,11 +0,0 @@ -# id - -> Display current user and group identity. - -- Display the current user identity as a number: - -`id -u` - -- Display the current group identity as a number: - -`id -g` diff --git a/pages.cn/common/id3tag.md b/pages.cn/common/id3tag.md deleted file mode 100644 index 7494dc75b..000000000 --- a/pages.cn/common/id3tag.md +++ /dev/null @@ -1,15 +0,0 @@ -# id3tag - -> Tool for reading, writing, and manipulating ID3v1 and ID3v2 tags of MP3 files. - -- Set artist and title tag of an MP3 file: - -`id3tag --artist={{artist}} --title={{title}} {{path/to/file.mp3}}` - -- Set album title of all MP3 files in the current directory: - -`id3tag --album={{album}} {{*.mp3}}` - -- Get more help: - -`id3tag --help` diff --git a/pages.cn/common/if.md b/pages.cn/common/if.md deleted file mode 100644 index 25e6252df..000000000 --- a/pages.cn/common/if.md +++ /dev/null @@ -1,11 +0,0 @@ -# if - -> Simple shell conditional. - -- Echo a different thing depending on a command's success: - -`{{command}} && echo "success" || echo "failure"` - -- Full if syntax: - -`if {{condition}}; then echo "true"; else echo "false"; fi` diff --git a/pages.cn/common/ifconfig.md b/pages.cn/common/ifconfig.md deleted file mode 100644 index 365522845..000000000 --- a/pages.cn/common/ifconfig.md +++ /dev/null @@ -1,23 +0,0 @@ -# ifconfig - -> Network Interface Configurator. - -- 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}}` diff --git a/pages.cn/common/ignite.md b/pages.cn/common/ignite.md deleted file mode 100644 index 943c585f1..000000000 --- a/pages.cn/common/ignite.md +++ /dev/null @@ -1,19 +0,0 @@ -# ignite - -> A CLI for React Native boilerplates, plugins, generators, and more. - -- Create a new React Native project: - -`ignite new {{project_name}}` - -- Generate file from a plugin: - -`ignite generate {{plugin_name}} {{file_name}}` - -- Add an Ignite plugin to the project: - -`ignite add {{plugin_name}}` - -- Remove an Ignite plugin from the project: - -`ignite remove {{plugin_name}}` diff --git a/pages.cn/common/imapsync.md b/pages.cn/common/imapsync.md deleted file mode 100644 index 5d02f5295..000000000 --- a/pages.cn/common/imapsync.md +++ /dev/null @@ -1,7 +0,0 @@ -# imapsync - -> Email IMAP tool for syncing, copying and migrating email mailboxes between two imap servers, one way, and without duplicates. - -- Synchronize imap account between host1 and host2: - -`imapsync --host1 {{host1}} --user1 {{user1}} --password1 {{secret1}} --host2 {{host2}} --user2 {{user2}} --password2 {{secret2}}` diff --git a/pages.cn/common/import.md b/pages.cn/common/import.md deleted file mode 100644 index a59c41e95..000000000 --- a/pages.cn/common/import.md +++ /dev/null @@ -1,16 +0,0 @@ -# import - -> Capture some or all of an X server screen, and save the image to a file. -> Part of the ImageMagick library. - -- Capture the entire X server screen in the PostScript image format: - -`import -window root {{output.postscript}}` - -- Capture contents of a remote X server screen in the PNG image format: - -`import -window root -display {{remote_host}}:{screen}.{display} {{output.png}}` - -- Capture a specific window, given its ID as displayed by `xwininfo`, into the JPEG format: - -`import -window {{window_id}} {{output.jpg}}` diff --git a/pages.cn/common/in2csv.md b/pages.cn/common/in2csv.md deleted file mode 100644 index 6342fe081..000000000 --- a/pages.cn/common/in2csv.md +++ /dev/null @@ -1,20 +0,0 @@ -# in2csv - -> Converts various tabular data formats into CSV. -> Included in csvkit. - -- Convert an XLS file to CSV: - -`in2csv {{data.xls}}` - -- Convert a DBF file to a CSV file: - -`in2csv {{data.dbf}} > {{data.csv}}` - -- Convert a specific sheet from an XLSX file to CSV: - -`in2csv --sheet={{sheet_name}} {{data.xlsx}}` - -- Pipe a JSON file to in2csv: - -`cat {{data.json}} | in2csv -f json > {{data.csv}}` diff --git a/pages.cn/common/inkscape.md b/pages.cn/common/inkscape.md deleted file mode 100644 index dfa30dce4..000000000 --- a/pages.cn/common/inkscape.md +++ /dev/null @@ -1,28 +0,0 @@ -# inkscape - -> An SVG (Scalable Vector Graphics) editing program. -> Use -z to not open the GUI and only process files in the console. - -- Open an SVG file in the Inkscape GUI: - -`inkscape {{filename.svg}}` - -- Export an SVG file into a bitmap with the default format (PNG) and the default resolution (90 DPI): - -`inkscape {{filename.svg}} -e {{filename.png}}` - -- Export an SVG file into a bitmap of 600x400 pixels (aspect ratio distortion may occur): - -`inkscape {{filename.svg}} -e {{filename.png}} -w {{600}} -h {{400}}` - -- Export a single object, given its ID, into a bitmap: - -`inkscape {{filename.svg}} -i {{id}} -e {{object.png}}` - -- Export an SVG document to PDF, converting all texts to paths: - -`inkscape {{filename.svg}} --export-pdf={{filename.pdf}} --export-text-to-path` - -- Duplicate the object with id="path123", rotate the duplicate 90 degrees, save the file, and quit Inkscape: - -`inkscape {{filename.svg}} --select=path123 --verb=EditDuplicate --verb=ObjectRotate90 --verb=FileSave --verb=FileQuit` diff --git a/pages.cn/common/install.md b/pages.cn/common/install.md deleted file mode 100644 index 0059a913d..000000000 --- a/pages.cn/common/install.md +++ /dev/null @@ -1,24 +0,0 @@ -# install - -> Copy files and set attributes. -> Copy files (often executable) to a system location like `/usr/local/bin`, give them the appropriate permissions/ownership. - -- Copy files to destination: - -`install {{path/to/source}} {{path/to/destination}}` - -- Copy files to destination, setting their ownership: - -`install -o {{user}} {{path/to/source}} {{path/to/destination}}` - -- Copy files to destination, setting their group ownership: - -`install -g {{user}} {{path/to/source}} {{path/to/destination}}` - -- Copy files to destination, setting their `mode`: - -`install -m {{+x}} {{path/to/source}} {{path/to/destination}}` - -- Copy files and apply access/modification times of source to destination: - -`install -p {{path/to/source}} {{path/to/destination}}` diff --git a/pages.cn/common/ionic.md b/pages.cn/common/ionic.md deleted file mode 100644 index f6abe27de..000000000 --- a/pages.cn/common/ionic.md +++ /dev/null @@ -1,27 +0,0 @@ -# ionic - -> A framework to build hybrid mobile apps. - -- Create a new project: - -`ionic start` - -- Start a local dev server for app dev/testing: - -`ionic serve` - -- Generate new app component, directive, page, pipe, provider or tabs: - -`ionic g {{page}}` - -- Show versions of ionic, cordova, environment, etc.: - -`ionic info` - -- Run app on an android/ios device: - -`ionic cordova run {{android|ios}} --device` - -- Check the health of a ionic app: - -`ionic doctor {{check}}` diff --git a/pages.cn/common/ionice.md b/pages.cn/common/ionice.md deleted file mode 100644 index 2b0115a03..000000000 --- a/pages.cn/common/ionice.md +++ /dev/null @@ -1,17 +0,0 @@ -# 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). - -- Set I/O scheduling class of a running process: - -`ionice -c {{scheduling_class}} -p {{pid}}` - -- Run a command with custom I/O scheduling class and priority: - -`ionice -c {{scheduling_class}} -n {{priority}} {{command}}` - -- Print the I/O scheduling class and priority of a running process: - -`ionice -p {{pid}}` diff --git a/pages.cn/common/ioping.md b/pages.cn/common/ioping.md deleted file mode 100644 index 03b2eb965..000000000 --- a/pages.cn/common/ioping.md +++ /dev/null @@ -1,19 +0,0 @@ -# ioping - -> Monitor I/O latency in real time. - -- Show disk I/O latency using the default values and the current directory: - -`ioping .` - -- Measure latency on /tmp using 10 requests of 1 megabyte each: - -`ioping -c 10 -s 1M /tmp` - -- Measure disk seek rate on /dev/sda: - -`ioping -R /dev/sda` - -- Measure disk sequential speed on /dev/sda: - -`ioping -RL /dev/sda` diff --git a/pages.cn/common/ipcs.md b/pages.cn/common/ipcs.md deleted file mode 100644 index d35fa4a16..000000000 --- a/pages.cn/common/ipcs.md +++ /dev/null @@ -1,11 +0,0 @@ -# ipcs - -> Display information about resources used in IPC (Inter-process Communication). - -- Specific information about the Message Queue which has the id 32768: - -`ipcs -qi 32768` - -- General information about all the IPC: - -`ipcs -a` diff --git a/pages.cn/common/iperf.md b/pages.cn/common/iperf.md deleted file mode 100644 index c2237a0ff..000000000 --- a/pages.cn/common/iperf.md +++ /dev/null @@ -1,15 +0,0 @@ -# iperf - -> Measure network bandwidth between computers. - -- Run on server: - -`iperf -s` - -- Run on client: - -`iperf -c {{server_address}}` - -- Run on client with 5 parallel threads: - -`iperf -c {{server_address}} -P {{5}}` diff --git a/pages.cn/common/iperf3.md b/pages.cn/common/iperf3.md deleted file mode 100644 index 23d94d107..000000000 --- a/pages.cn/common/iperf3.md +++ /dev/null @@ -1,23 +0,0 @@ -# iperf3 - -> Traffic generator for testing network bandwidth. - -- Run iperf3 as a server: - -`iperf3 -s` - -- Run an iperf3 server on a specific port: - -`iperf3 -s -p {{port}}` - -- Start bandwidth test: - -`iperf3 -c {{server}}` - -- Run iperf3 in multiple parallel streams: - -`iperf3 -c {{server}} -P {{streams}}` - -- Reverse direction of the test. Server sends data to the client: - -`iperf3 -c {{server}} -R` diff --git a/pages.cn/common/ipfs.md b/pages.cn/common/ipfs.md deleted file mode 100644 index 1c434d099..000000000 --- a/pages.cn/common/ipfs.md +++ /dev/null @@ -1,32 +0,0 @@ -# ipfs - -> Inter Planetary File System. -> A peer-to-peer hypermedia protocol to make the web faster, safer, and more open. - -- Add a file from local to the file system, pin it and print the relative hash: - -`ipfs add {{filename}}` - -- Add a folder and its files recursively from local to the file system and print the relative hash: - -`ipfs add -r {{folder}}` - -- Save a remote file and give it a name but not pin it: - -`ipfs get {{hash}} -o {{filename}}` - -- Pin a remote file locally: - -`ipfs pin add {{hash}}` - -- Display pinned files: - -`ipfs pin ls` - -- Unpin a file from the local storage: - -`ipfs pin rm {{hash}}` - -- Remove unpinned files from local storage: - -`ipfs repo gc` diff --git a/pages.cn/common/irssi.md b/pages.cn/common/irssi.md deleted file mode 100644 index cdea60bc7..000000000 --- a/pages.cn/common/irssi.md +++ /dev/null @@ -1,27 +0,0 @@ -# irssi - -> Text based IRC client. - -- Open irssi and connect to a server with a nickname: - -`irssi -n {{nickname}} -c {{server.name.com}}` - -- Open irssi and connect with a specific server on a given port: - -`irssi -c {{server.name.com}} -p {{port}}` - -- View the help: - -`irssi --help` - -- Join a channel: - -`/join {{#channelname}}` - -- Change active window (starts at 1): - -`/win {{window_number}}` - -- Exit the application cleanly and quitting any server(s): - -`/quit` diff --git a/pages.cn/common/jar.md b/pages.cn/common/jar.md deleted file mode 100644 index 5bc83a8e8..000000000 --- a/pages.cn/common/jar.md +++ /dev/null @@ -1,15 +0,0 @@ -# jar - -> Java Applications/Libraries Packager. - -- Unzip .jar/.war file to the current directory: - -`jar -xvf {{file.jar}}` - -- List a .jar/.war file content: - -`jar tf {{path/to/file.jar}}` - -- List a .jar/.war file content with verbose output: - -`jar tvf {{path/to/file.jar}}` diff --git a/pages.cn/common/java.md b/pages.cn/common/java.md deleted file mode 100644 index ca800763b..000000000 --- a/pages.cn/common/java.md +++ /dev/null @@ -1,15 +0,0 @@ -# java - -> Java Application Launcher. - -- Execute a java .class file that contains a main method by using just the class name: - -`java {{classname}}` - -- Execute a .jar program: - -`java -jar {{filename.jar}}` - -- Display JDK, JRE and HotSpot versions: - -`java -version` diff --git a/pages.cn/common/javac.md b/pages.cn/common/javac.md deleted file mode 100644 index 5d04e04dd..000000000 --- a/pages.cn/common/javac.md +++ /dev/null @@ -1,19 +0,0 @@ -# javac - -> Java Application Compiler. - -- Compile a .java file: - -`javac {{file.java}}` - -- Compile several .java files: - -`javac {{file1.java}} {{file2.java}} {{file3.java}}` - -- Compile all .java files in current directory: - -`javac {{*.java}}` - -- Compile a .java file and place the resulting class file in a specific directory: - -`javac -d {{path/to/some/directory}} {{file.java}}` diff --git a/pages.cn/common/jekyll.md b/pages.cn/common/jekyll.md deleted file mode 100644 index ca1c98b3d..000000000 --- a/pages.cn/common/jekyll.md +++ /dev/null @@ -1,15 +0,0 @@ -# jekyll - -> A simple, blog-aware, static site generator. - -- Generate a development server that will run at http://localhost:4000/: - -`jekyll serve` - -- Enable incremental regeneration: - -`jekyll serve --incremental` - -- Generate the current folder into "./_site": - -`jekyll build` diff --git a/pages.cn/common/jest.md b/pages.cn/common/jest.md deleted file mode 100644 index 691cab7b4..000000000 --- a/pages.cn/common/jest.md +++ /dev/null @@ -1,23 +0,0 @@ -# jest - -> A zero-configuration JavaScript testing platform. - -- Run all tests: - -`jest` - -- Run only tests with a name that matches the regex pattern: - -`jest -t {{spec_name}}` - -- Run only tests relating to uncommitted files: - -`jest --onlyChanged` - -- Watch files for changes and rerun related tests: - -`jest --watch` - -- Show help: - -`jest --help` diff --git a/pages.cn/common/jhat.md b/pages.cn/common/jhat.md deleted file mode 100644 index 4cc4c7196..000000000 --- a/pages.cn/common/jhat.md +++ /dev/null @@ -1,15 +0,0 @@ -# jhat - -> Java Heap Analysis Tool. - -- Analyze a heap dump (from jmap), view via http on port 7000: - -`jhat {{dump_file.bin}}` - -- Analyze a heap dump, specifying an alternate port for the http server: - -`jhat -p {{port}} {{dump_file.bin}}` - -- Analyze a dump letting jhat use up to 8GB RAM (2-4x dump size recommended): - -`jhat -J-mx8G {{dump_file.bin}}` diff --git a/pages.cn/common/jmap.md b/pages.cn/common/jmap.md deleted file mode 100644 index b6d819cc0..000000000 --- a/pages.cn/common/jmap.md +++ /dev/null @@ -1,19 +0,0 @@ -# jmap - -> Java Memory Map Tool. - -- Print shared object mappings for a java process (output like pmap): - -`jmap {{java_pid}}` - -- Print heap summary information: - -`jmap -heap {{filename.jar}} {{java_pid}}` - -- Print histogram of heap usage by type: - -`jmap -histo {{java_pid}}` - -- Dump contents of the heap into a binary file for analysis with jhat: - -`jmap -dump:format=b,file={{filename}} {{java_pid}}` diff --git a/pages.cn/common/jobs.md b/pages.cn/common/jobs.md deleted file mode 100644 index 30c2c0fcd..000000000 --- a/pages.cn/common/jobs.md +++ /dev/null @@ -1,19 +0,0 @@ -# jobs - -> Display status of jobs in the current session. - -- Show status of all jobs: - -`jobs` - -- Show status of a particular job: - -`jobs {{job_id}}` - -- Show status and process IDs of all jobs: - -`jobs -l` - -- Show process IDs of all jobs: - -`jobs -p` diff --git a/pages.cn/common/join.md b/pages.cn/common/join.md deleted file mode 100644 index 1af8b9e98..000000000 --- a/pages.cn/common/join.md +++ /dev/null @@ -1,15 +0,0 @@ -# join - -> Join lines of two sorted files on a common field. - -- Join two files on the first (default) field: - -`join {{file1}} {{file2}}` - -- Join field3 of file1 with field1 of file2: - -`join -1 3 -2 1 {{file1}} {{file2}}` - -- Produce a line for each unpairable line for file1: - -`join -a 1 {{file1}} {{file2}}` diff --git a/pages.cn/common/jpegoptim.md b/pages.cn/common/jpegoptim.md deleted file mode 100644 index 724ece141..000000000 --- a/pages.cn/common/jpegoptim.md +++ /dev/null @@ -1,19 +0,0 @@ -# jpegoptim - -> Optimise JPEG images. - -- Optimise a set of JPEG images, retaining all associated data: - -`jpegoptim {{image1.jpeg}} {{image2.jpeg}} {{imageN.jpeg}}` - -- Optimise JPEG images, stripping all non-essential data: - -`jpegoptim --strip-all {{image1.jpeg}} {{image2.jpeg}} {{imageN.jpeg}}` - -- Force the output images to be progressive: - -`jpegoptim --all-progressive {{image1.jpeg}} {{image2.jpeg}} {{imageN.jpeg}}` - -- Force the output images to have a fixed maximum filesize: - -`jpegoptim --size={{250k}} {{image1.jpeg}} {{image2.jpeg}} {{imageN.jpeg}}` diff --git a/pages.cn/common/jps.md b/pages.cn/common/jps.md deleted file mode 100644 index 82a91c29c..000000000 --- a/pages.cn/common/jps.md +++ /dev/null @@ -1,23 +0,0 @@ -# jps - -> Show JVM Process Status of current user. - -- List all JVM processes: - -`jps` - -- List all JVM processes with only PID: - -`jps -q` - -- Display the arguments passed to the processes: - -`jps -m` - -- Display the full package name of all processes: - -`jps -l` - -- Display the arguments passed to the JVM: - -`jps -v` diff --git a/pages.cn/common/jq.md b/pages.cn/common/jq.md deleted file mode 100644 index 5b8116140..000000000 --- a/pages.cn/common/jq.md +++ /dev/null @@ -1,27 +0,0 @@ -# jq - -> A lightweight and flexible command-line JSON processor. - -- Output a JSON file, in pretty-print format: - -`jq . {{file.json}}` - -- Output all elements from arrays (or all key-value pairs from objects) in a JSON file: - -`jq .[] {{file.json}}` - -- Read JSON objects from a file into an array, and output it (inverse of `jq .[]`): - -`jq --slurp . {{file.json}}` - -- Output the first element in a JSON file: - -`jq .[0] {{file.json}}` - -- Output the value of a given key of the first element in a JSON text from stdin: - -`cat {{file.json}} | jq .[0].{{key_name}}` - -- Output the value of a given key of each element in a JSON text from stdin: - -`cat {{file.json}} | jq 'map(.{{key_name}})'` diff --git a/pages.cn/common/jrnl.md b/pages.cn/common/jrnl.md deleted file mode 100644 index 6373120c4..000000000 --- a/pages.cn/common/jrnl.md +++ /dev/null @@ -1,23 +0,0 @@ -# jrnl - -> A simple journal application for your command line. - -- Insert a new entry with your editor: - -`jrnl` - -- Quickly insert a new entry: - -`jrnl {{today at 3am}}: {{title}}. {{content}}` - -- View the last ten entries: - -`jrnl -n {{10}}` - -- View everything that happened from the start of last year to the start of last march: - -`jrnl -from {{"last year"}} -until {{march}}` - -- Edit all entries tagged with "texas" and "history": - -`jrnl {{@texas}} -and {{@history}} --edit` diff --git a/pages.cn/common/json5.md b/pages.cn/common/json5.md deleted file mode 100644 index 4fd6b273c..000000000 --- a/pages.cn/common/json5.md +++ /dev/null @@ -1,27 +0,0 @@ -# json5 - -> A command-line tool for converting JSON5 files to JSON. - -- Convert JSON5 stdin to JSON stdout: - -`echo {{input}} | json5` - -- Convert a JSON5 file to JSON and output to stdout: - -`json5 {{path/to/input_file.json5}}` - -- Convert a JSON5 file to the specified JSON file: - -`json5 {{path/to/input_file.json5}} --out-file {{path/to/output_file.json}}` - -- Validate a JSON5 file: - -`json5 {{path/to/input_file.json5}} --validate` - -- Specify the number of spaces to indent by (or "t" for tabs): - -`json5 --space {{indent_amount}}` - -- View available options: - -`json5 --help` diff --git a/pages.cn/common/jstack.md b/pages.cn/common/jstack.md deleted file mode 100644 index 93687df2f..000000000 --- a/pages.cn/common/jstack.md +++ /dev/null @@ -1,15 +0,0 @@ -# jstack - -> Java Stack Trace Tool. - -- Print java stack traces for all threads in a java process: - -`jstack {{java_pid}}` - -- Print mixed mode (java/c++) stack traces for all threads in a java process: - -`jstack -m {{java_pid}}` - -- Print stack traces from java core dump: - -`jstack {{/usr/bin/java}} {{file.core}}` diff --git a/pages.cn/common/julia.md b/pages.cn/common/julia.md deleted file mode 100644 index 29ccb678f..000000000 --- a/pages.cn/common/julia.md +++ /dev/null @@ -1,27 +0,0 @@ -# julia - -> A high-level, high-performance dynamic programming language for technical computing. - -- Start a Julia REPL session: - -`julia` - -- Execute a Julia program and exit: - -`julia {{program.jl}}` - -- Execute a Julia program that takes arguments: - -`julia {{program.jl}} {{arguments}}` - -- Evaluate a string containing Julia code: - -`julia -e '{{julia_code}}'` - -- Evaluate a string of Julia code, passing arguments to it: - -`julia -e '{{for x in ARGS; println(x); end}}' {{arguments}}` - -- Start Julia in parallel mode, using N worker processes: - -`julia -p {{N}}` diff --git a/pages.cn/common/jupyter.md b/pages.cn/common/jupyter.md deleted file mode 100644 index 3ee18191f..000000000 --- a/pages.cn/common/jupyter.md +++ /dev/null @@ -1,28 +0,0 @@ -# jupyter - -> Web application to create and share documents that contain code, visualizations and notes. -> Primarily used for data analysis, scientific computing and machine learning. - -- Start a Jupyter notebook server in the current directory: - -`jupyter notebook` - -- Open a specific Jupyter notebook: - -`jupyter notebook {{example.ipynb}}` - -- Start a server on a specific port: - -`jupyter notebook --port={{port}}` - -- List currently running notebook servers: - -`jupyter notebook list` - -- Stop the currently running server: - -`jupyter notebook stop` - -- Start JupyterLab, if installed, in the current directory: - -`jupyter lab` diff --git a/pages.cn/common/k6.md b/pages.cn/common/k6.md deleted file mode 100644 index 9ffcc6f6a..000000000 --- a/pages.cn/common/k6.md +++ /dev/null @@ -1,27 +0,0 @@ -# k6 - -> A modern load testing tool, using Go and JavaScript. - -- Run load test locally: - -`k6 run {{script.js}}` - -- Run load test locally with a given number of virtual users and duration: - -`k6 run --vus {{10}} --duration {{30s}} {{script.js}}` - -- Run load test locally with a given environment variable: - -`k6 run -e {{HOSTNAME=example.com}} {{script.js}}` - -- Run load test locally using InfluxDB to store results: - -`k6 run --out influxdb={{http://localhost:8086/k6db}} {{script.js}}` - -- Login to cloud service using secret token: - -`k6 login cloud --token {{secret}}` - -- Run load test on cloud infrastructure: - -`k6 cloud {{script.js}}` diff --git a/pages.cn/common/kafkacat.md b/pages.cn/common/kafkacat.md deleted file mode 100644 index 72af84426..000000000 --- a/pages.cn/common/kafkacat.md +++ /dev/null @@ -1,35 +0,0 @@ -# kafkacat - -> Apache Kafka producer and consumer tool. - -- Consume messages starting with the newest offset: - -`kafkacat -C -t {{topic}} -b {{brokers}}` - -- Consume messages starting with the oldest offset and exit after the last message is received: - -`kafkacat -C -t {{topic}} -b {{brokers}} -o beginning -e` - -- Consume messages as a Kafka consumer group: - -`kafkacat -G {{group_id}} {{topic}} -b {{brokers}}` - -- Publish message by reading from stdin: - -` echo {{message}} | kafkacat -P -t {{topic}} -b {{brokers}}` - -- Publish messages by reading from a file: - -`kafkacat -P -t {{topic}} -b {{brokers}} {{path/to/file}}` - -- List metadata for all topics and brokers: - -`kafkacat -L -b {{brokers}}` - -- List metadata for a specific topic: - -`kafkacat -L -t {{topic}} -b {{brokers}}` - -- Get offset for a topic/partition for a specific point in time: - -`kafkacat -Q -t {{topic}:{{partition}}:{{unix_timestamp}} -b {{brokers}}` diff --git a/pages.cn/common/kak.md b/pages.cn/common/kak.md deleted file mode 100644 index 9da41b0d7..000000000 --- a/pages.cn/common/kak.md +++ /dev/null @@ -1,36 +0,0 @@ -# kak - -> Kakoune is a mode-based code editor implementing the "multiple selections" paradigm. -> Data can be selected and simultaneously edited in different locations, using multiple selections; users can also connect to the same session for collaborative editing. - -- Open a file and enter normal mode, to execute commands: - -`kak {{path/to/file}}` - -- Enter insert mode from normal mode, to write text into the file: - -`i` - -- Escape insert mode, to go back to normal mode: - -`` - -- Replace all instances of "foo" in the current file with "bar": - -`%s{{foo}}c{{bar}}` - -- Un-select all secondary selections, and keep only the main one: - -`` - -- Search for numbers and select the first two: - -`/\d+N` - -- Insert the contents of a file: - -`!cat {{path/to/file}}` - -- Save the current file: - -`:w` diff --git a/pages.cn/common/keepass2.md b/pages.cn/common/keepass2.md deleted file mode 100644 index ec81c2d12..000000000 --- a/pages.cn/common/keepass2.md +++ /dev/null @@ -1,15 +0,0 @@ -# keepass2 - -> A light-weight password manager. - -- Start KeePass 2, opening the most recently-opened password database: - -`keepass2` - -- Start KeePass 2, opening a specific password database: - -`keepass2 {{path/to/database.kbdx}}` - -- Use a specific key file to open a password database: - -`keepass2 {{path/to/database.kbdx}} -keyfile:{{path/to/key/file.key}}` diff --git a/pages.cn/common/keybase.md b/pages.cn/common/keybase.md deleted file mode 100644 index b848421a3..000000000 --- a/pages.cn/common/keybase.md +++ /dev/null @@ -1,31 +0,0 @@ -# keybase - -> Key directory that maps social media identities to encryption keys in a publicly auditable manner. - -- Follow another user: - -`keybase follow {{username}}` - -- Add a new proof: - -`keybase prove {{service}} {{service_username}}` - -- Sign a file: - -`keybase sign --infile {{input_file}} --outfile {{output_file}}` - -- Verify a signed file: - -`keybase verify --infile {{input_file}} --outfile {{output_file}}` - -- Encrypt a file: - -`keybase encrypt --infile {{input_file}} --outfile {{output_file}} {{receiver}}` - -- Decrypt a file: - -`keybase decrypt --infile {{input_file}} --outfile {{output_file}}` - -- Revoke current device, log out, and delete local data: - -`keybase deprovision` diff --git a/pages.cn/common/kill.md b/pages.cn/common/kill.md deleted file mode 100644 index bd729e8c2..000000000 --- a/pages.cn/common/kill.md +++ /dev/null @@ -1,28 +0,0 @@ -# kill - -> Sends a signal to a process, usually related to stopping the process. -> All signals except for SIGKILL and SIGSTOP can be intercepted by the process to perform a clean exit. - -- Terminate a program using the default SIGTERM (terminate) signal: - -`kill {{process_id}}` - -- List available signal names (to be used without the `SIG` prefix): - -`kill -l` - -- Terminate a program using the SIGHUP (hang up) signal. Many daemons will reload instead of terminating: - -`kill -{{1|HUP}} {{process_id}}` - -- Terminate a program using the SIGINT (interrupt) signal. This is typically initiated by the user pressing `Ctrl + C`: - -`kill -{{2|INT}} {{process_id}}` - -- Signal the operating system to immediately terminate a program (which gets no chance to capture the signal): - -`kill -{{9|KILL}} {{process_id}}` - -- Signal the operating system to pause a program, it until a SIGCONT ("continue") signal is received: - -`kill -{{17|STOP}} {{process_id}}` diff --git a/pages.cn/common/killall.md b/pages.cn/common/killall.md deleted file mode 100644 index 359efab90..000000000 --- a/pages.cn/common/killall.md +++ /dev/null @@ -1,24 +0,0 @@ -# killall - -> Send kill signal to all instances of a process by name (must be exact name). -> All signals except SIGKILL and SIGSTOP can be intercepted by the process, allowing a clean exit. - -- Terminate a process using the default SIGTERM (terminate) signal: - -`killall {{process_name}}` - -- List available signal names (to be used without the 'SIG' prefix): - -`killall --list` - -- Interactively ask for confirmation before termination: - -`killall -i {{process_name}}` - -- Terminate a process using the SIGINT (interrupt) signal, which is the same signal sent by pressing `Ctrl + C`: - -`killall -INT {{process_name}}` - -- Force kill a process: - -`killall -KILL {{process_name}}` diff --git a/pages.cn/common/knife.md b/pages.cn/common/knife.md deleted file mode 100644 index 71c743b85..000000000 --- a/pages.cn/common/knife.md +++ /dev/null @@ -1,31 +0,0 @@ -# knife - -> CLI for interacting with a Chef server from a local Chef repo. - -- Bootstrap a new node: - -`knife bootstrap {{fqdn_or_ip}}` - -- List all registered nodes: - -`knife node list` - -- Show a node: - -`knife node show {{node_name}}` - -- Edit a node: - -`knife node edit {{node_name}}` - -- Edit a role: - -`knife role edit {{role_name}}` - -- View a data bag: - -`knife data bag show {{data_bag_name}} {{data_bag_item}}` - -- Upload a local cookbook to the Chef server: - -`knife cookbook upload {{cookbook_name}}` diff --git a/pages.cn/common/kompose.md b/pages.cn/common/kompose.md deleted file mode 100644 index b6769547b..000000000 --- a/pages.cn/common/kompose.md +++ /dev/null @@ -1,15 +0,0 @@ -# kompose - -> A tool to convert docker-compose applications to Kubernetes. - -- Deploy a dockerized application to Kubernetes: - -`kompose up -f {{docker-compose.yml}}` - -- Delete instantiated services/deployments from Kubernetes: - -`kompose down -f {{docker-compose.yml}}` - -- Convert a docker-compose file into Kubernetes resources file: - -`kompose convert -f {{docker-compose.yml}}` diff --git a/pages.cn/common/kube-fzf.md b/pages.cn/common/kube-fzf.md deleted file mode 100644 index 9c07e821e..000000000 --- a/pages.cn/common/kube-fzf.md +++ /dev/null @@ -1,28 +0,0 @@ -# kube-fzf - -> Shell commands for command line fuzzy searching of Kubernetes Pods. -> See also `kubectl` for related commands. - -- Get pod details (from current namespace): - -`findpod` - -- Get pod details (from all namespaces): - -`findpod -a` - -- Describe a pod: - -`describepod` - -- Tail pod logs: - -`tailpod` - -- Exec into a pod's container: - -`execpod {{shell_command}}` - -- Port-forward a pod: - -`pfpod {{port_number}}` diff --git a/pages.cn/common/kubeadm.md b/pages.cn/common/kubeadm.md deleted file mode 100644 index 3c8a11829..000000000 --- a/pages.cn/common/kubeadm.md +++ /dev/null @@ -1,31 +0,0 @@ -# kubeadm - -> Command line interface for creating and managing Kubernetes clusters. - -- Create a Kubernetes master node: - -`kubeadm init` - -- Bootstrap a Kubernetes worker node and join it to a cluster: - -`kubeadm join --token {{token}}` - -- Create a new bootstrap token with a TTL of 12 hours: - -`kubeadm token create --ttl {{12h0m0s}}` - -- Check if the Kubernetes cluster is upgradeable and which versions are available: - -`kubeadm upgrade plan` - -- Upgrade Kubernetes cluster to a specified version: - -`kubeadm upgrade apply {{version}}` - -- View the kubeadm ConfigMap containing the cluster's configuration: - -`kubeadm config view` - -- Revert changes made to the host by 'kubeadm init' or 'kubeadm join': - -`kubeadm reset` diff --git a/pages.cn/common/kubectl.md b/pages.cn/common/kubectl.md deleted file mode 100644 index 3599fee47..000000000 --- a/pages.cn/common/kubectl.md +++ /dev/null @@ -1,31 +0,0 @@ -# kubectl - -> Command line interface for running commands against Kubernetes clusters. - -- List all pods in all namespaces: - -`kubectl get pods --all-namespaces` - -- List all pods with more information (such as node name): - -`kubectl get pods -o wide` - -- Update specified pod with the label 'unhealthy' and the value 'true': - -`kubectl label pods {{name}} unhealthy=true` - -- List all resources with different types: - -`kubectl get all` - -- Show metrics for all nodes: - -`kubectl top node` - -- Show metrics for all pods in the default namespace: - -`kubectl top pod` - -- Print the address of the master and cluster services: - -`kubectl cluster-info` diff --git a/pages.cn/common/kubectx.md b/pages.cn/common/kubectx.md deleted file mode 100644 index 5aeab3639..000000000 --- a/pages.cn/common/kubectx.md +++ /dev/null @@ -1,19 +0,0 @@ -# kubectx - -> Utility to manage and switch between `kubectl` contexts. - -- List the contexts: - -`kubectx` - -- Switch to a named context: - -`kubectx {{name}}` - -- Switch to the previous context: - -`kubectx -` - -- Delete a named context: - -`kubectx -d {{name}}` diff --git a/pages.cn/common/kubens.md b/pages.cn/common/kubens.md deleted file mode 100644 index 57c641c58..000000000 --- a/pages.cn/common/kubens.md +++ /dev/null @@ -1,15 +0,0 @@ -# kubens - -> Utility to switch between Kubernetes namespaces. - -- List the namespaces: - -`kubens` - -- Change the active namespace: - -`kubens {{name}}` - -- Switch to the previous namespace: - -`kubens -` diff --git a/pages.cn/common/kubetail.md b/pages.cn/common/kubetail.md deleted file mode 100644 index 7d026922e..000000000 --- a/pages.cn/common/kubetail.md +++ /dev/null @@ -1,19 +0,0 @@ -# kubetail - -> Utility to tail multiple Kubernetes pod logs at the same time. - -- Tail the logs of multiple pods (whose name starts with "my_app") in one go: - -`kubetail {{my_app}}` - -- Tail only a specific container from multiple pods: - -`kubetail {{my_app}} -c {{my_container}}` - -- To tail multiple containers from multiple pods: - -`kubetail {{my_app}} -c {{my_container_1}} -c {{my_container_2}}` - -- To tail multiple applications at the same time seperate them by comma: - -`kubetail {{my_app_1}},{{my_app_2}}` diff --git a/pages.cn/common/laravel.md b/pages.cn/common/laravel.md deleted file mode 100644 index c944d90db..000000000 --- a/pages.cn/common/laravel.md +++ /dev/null @@ -1,19 +0,0 @@ -# laravel - -> A command line installer for the Laravel framework. - -- Create a new Laravel application: - -`laravel new {{name}}` - -- Use the latest development release: - -`laravel new {{name}} --dev` - -- Overwrite if the directory already exists: - -`laravel new {{name}} --force` - -- List the available installer commands: - -`laravel list` diff --git a/pages.cn/common/last.md b/pages.cn/common/last.md deleted file mode 100644 index b03e1054c..000000000 --- a/pages.cn/common/last.md +++ /dev/null @@ -1,27 +0,0 @@ -# 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}}` - -- Print the full date and time for entries and then display the hostname column last to prevent truncation: - -`last -F -a` - -- View all logins by a specific user and show the ip address instead of the hostname: - -`last {{user_name}} -i` - -- View all recorded reboots (i.e., the last logins of the pseudo user "reboot"): - -`last reboot` - -- View all recorded shutdowns (i.e., the last logins of the pseudo user "shutdown"): - -`last shutdown` diff --git a/pages.cn/common/latexmk.md b/pages.cn/common/latexmk.md deleted file mode 100644 index fe235f4aa..000000000 --- a/pages.cn/common/latexmk.md +++ /dev/null @@ -1,28 +0,0 @@ -# latexmk - -> Compile LaTeX source files into finished documents. -> Automatically does multiple runs when needed. - -- Compile a dvi (DeVice Independent file) document from every source: - -`latexmk` - -- Compile a dvi document from a specific source file: - -`latexmk {{source.tex}}` - -- Compile a pdf document: - -`latexmk -pdf {{source.tex}}` - -- Force the generation of a document even if there are errors: - -`latexmk -f {{source.tex}}` - -- Clean up temporary tex files created for a specific tex file: - -`latexmk -c {{source.tex}}` - -- Clean up all temporary tex files in the current directory: - -`latexmk -c` diff --git a/pages.cn/common/leave.md b/pages.cn/common/leave.md deleted file mode 100644 index 101db80ca..000000000 --- a/pages.cn/common/leave.md +++ /dev/null @@ -1,20 +0,0 @@ -# leave - -> Remind when it's time to leave. -> To remove reminders use `kill $(pidof leave)`. - -- Set a reminder at a given time: - -`leave {{time_to_leave}}` - -- Remind to leave at noon: - -`leave {{1200}}` - -- Set a reminder in a specific amount of time: - -`leave +{{amount_of_time}}` - -- Remind to leave in 4 hours and 4 minutes: - -`leave +{{0404}}` diff --git a/pages.cn/common/lebab.md b/pages.cn/common/lebab.md deleted file mode 100644 index 63d859b46..000000000 --- a/pages.cn/common/lebab.md +++ /dev/null @@ -1,24 +0,0 @@ -# lebab - -> A JavaScript modernizer for transpiling code to ES6/ES7. -> Transformations must be provided for all examples. - -- Display a list of the available transformations: - -`lebab --help` - -- Transpile using one or more comma-separated transformations: - -`lebab --transform {{transformation}}` - -- Transpile a file to stdout: - -`lebab {{path/to/input_file}}` - -- Transpile a file to the specified output file: - -`lebab {{path/to/input_file}} --out-file {{path/to/output_file}}` - -- Replace all `.js` files in-place in the specified directory, glob or file: - -`lebab --replace {{directory|glob|file}}` diff --git a/pages.cn/common/lein.md b/pages.cn/common/lein.md deleted file mode 100644 index a20818d98..000000000 --- a/pages.cn/common/lein.md +++ /dev/null @@ -1,23 +0,0 @@ -# lein - -> Manage clojure projects with declarative configuration. - -- Generate scaffolding for a new project based on a template: - -`lein new {{template_name}} {{project_name}}` - -- Start a REPL session either with the project or standalone: - -`lein repl` - -- Run the project's "-main" function with optional args: - -`lein run {{args}}` - -- Run the project's tests: - -`lein test` - -- Package up the project files and all its dependencies into a jar file: - -`lein uberjar` diff --git a/pages.cn/common/less.md b/pages.cn/common/less.md deleted file mode 100644 index ea3601925..000000000 --- a/pages.cn/common/less.md +++ /dev/null @@ -1,35 +0,0 @@ -# less - -> Open a file for interactive reading, allowing scrolling and search. - -- Open a file: - -`less {{source_file}}` - -- Page down / up: - -` (down), b (up)` - -- Go to end / start of file: - -`G (end), g (start)` - -- Forward search for a string (press `n`/`N` to go to next/previous match): - -`/{{something}}` - -- Backward search for a string (press `n`/`N` to go to next/previous match): - -`?{{something}}` - -- Follow the output of the currently opened file: - -`F` - -- Open the current file in an editor: - -`v` - -- Exit: - -`q` diff --git a/pages.cn/common/lex.md b/pages.cn/common/lex.md deleted file mode 100644 index 7b5d95c84..000000000 --- a/pages.cn/common/lex.md +++ /dev/null @@ -1,16 +0,0 @@ -# lex - -> Lexical analyser generator. -> Given the specification for a lexical analyser, generates C code implementing it. - -- Generate an analyser from a Lex file: - -`lex {{analyser.l}}` - -- Specify the output file: - -`lex {{analyser.l}} --outfile {{analyser.c}}` - -- Compile a C file generated by Lex: - -`cc {{path/to/lex.yy.c}} --output {{executable}}` diff --git a/pages.cn/common/license.md b/pages.cn/common/license.md deleted file mode 100644 index e947f96e9..000000000 --- a/pages.cn/common/license.md +++ /dev/null @@ -1,19 +0,0 @@ -# license - -> Create license files for open-source projects. - -- Print a license to stdout, using the defaults (auto-detected author name, and current year): - -`license {{license_name}}` - -- Generate a license and save it to a file: - -`license -o {{filename}} {{license_name}}` - -- List all available licenses: - -`license ls` - -- Generate a license with custom author name and year: - -`license --name {{author}} --year {{release_year}} {{license_name}}` diff --git a/pages.cn/common/light-arionum-cli.md b/pages.cn/common/light-arionum-cli.md deleted file mode 100644 index cbf7086ac..000000000 --- a/pages.cn/common/light-arionum-cli.md +++ /dev/null @@ -1,35 +0,0 @@ -# light-arionum-cli - -> The PHP light wallet for the Arionum cryptocurrency. - -- Generate a new public/private key pair: - -`light-arionum-cli` - -- Display the balance of the current address: - -`light-arionum-cli balance` - -- Display the balance of the specified address: - -`light-arionum-cli balance {{address}}` - -- Send a transaction with an optional message: - -`light-arionum-cli send {{address}} {{value}} {{optional_message}}` - -- Export the current wallet information: - -`light-arionum-cli export` - -- Display information about the current block: - -`light-arionum-cli block` - -- Display information about the current address' transactions: - -`light-arionum-cli transactions` - -- Display information about a specific transaction: - -`light-arionum-cli transaction {{transaction_id}}` diff --git a/pages.cn/common/link.md b/pages.cn/common/link.md deleted file mode 100644 index f57667a6a..000000000 --- a/pages.cn/common/link.md +++ /dev/null @@ -1,8 +0,0 @@ -# link - -> Create a hard link to an existing file. -> For more options, see the `ln` command. - -- Create a hard link from a new file to an existing file: - -`link {{path/to/existing_file}} {{path/to/new_file}}` diff --git a/pages.cn/common/live-server.md b/pages.cn/common/live-server.md deleted file mode 100644 index 18a35a4d9..000000000 --- a/pages.cn/common/live-server.md +++ /dev/null @@ -1,19 +0,0 @@ -# live-server - -> A simple development http server with live reload capability. - -- Serve an index.html file and reload on changes: - -`live-server` - -- Specify a port (default is 8080) from which to serve a file: - -`live-server --port={{8081}}` - -- Specify a given file to serve: - -`live-server --open={{about.html}}` - -- Proxy all requests for ROUTE to URL: - -`live-server --proxy={{/}}:{{http:localhost:3000}}` diff --git a/pages.cn/common/ln.md b/pages.cn/common/ln.md deleted file mode 100644 index ade29879a..000000000 --- a/pages.cn/common/ln.md +++ /dev/null @@ -1,15 +0,0 @@ -# ln - -> Creates links to files and folders. - -- Create a symbolic link to a file (or folder): - -`ln -s {{path/to/file}} {{path/to/symlink}}` - -- Overwrite an existing symbolic to point to a different file: - -`ln -sf {{path/to/new_file}} {{path/to/symlink}}` - -- Create a hard link to a file: - -`ln {{path/to/file}} {{path/to/hardlink}}` diff --git a/pages.cn/common/loc.md b/pages.cn/common/loc.md deleted file mode 100644 index e3f1bccd8..000000000 --- a/pages.cn/common/loc.md +++ /dev/null @@ -1,19 +0,0 @@ -# loc - -> Tool written in Rust that counts lines of code. - -- Print lines of code in the current directory: - -`loc` - -- Print lines of code in the target directory: - -`loc {{path/to/directory}}` - -- Print lines of code with stats for individual files: - -`loc --files` - -- Print lines of code without .gitignore (etc.) files (e.g. two -u flags will additionally count hidden files and dirs): - -`loc -u` diff --git a/pages.cn/common/locust.md b/pages.cn/common/locust.md deleted file mode 100644 index 508cd9dbe..000000000 --- a/pages.cn/common/locust.md +++ /dev/null @@ -1,27 +0,0 @@ -# locust - -> Load-testing tool to determine number of concurrent users a system can handle. - -- Load-test "example.com" with web interface using locustfile.py: - -`locust --host={{http://example.com}}` - -- Use a different test file: - -`locust --locustfile={{test_file.py}} --host={{http://example.com}}` - -- Run test without web interface, spawning 1 user a second until there are 100 users: - -`locust --no-web --clients={{100}} --hatch-rate={{1}} --host={{http://example.com}}` - -- Start locust in master mode: - -`locust --master --host={{http://example.com}}` - -- Connect locust slave to master: - -`locust --slave --host={{http://example.com}}` - -- Connect locust slave to master on a different machine: - -`locust --slave --master-host={{master_hostname}} --host={{http://example.com}}` diff --git a/pages.cn/common/logname.md b/pages.cn/common/logname.md deleted file mode 100644 index ee90d6b89..000000000 --- a/pages.cn/common/logname.md +++ /dev/null @@ -1,7 +0,0 @@ -# logname - -> Shows the user's login name. - -- Display the currently logged in user's name: - -`logname` diff --git a/pages.cn/common/logstash.md b/pages.cn/common/logstash.md deleted file mode 100644 index d285a93e0..000000000 --- a/pages.cn/common/logstash.md +++ /dev/null @@ -1,16 +0,0 @@ -# logstash - -> An ETL (extract, transform and load) tool. -> Commonly used to load data from various sources, like databases and log files, into elasticsearch. - -- Check validity of a logstash configuration: - -`logstash --configtest --config {{logstash_config.conf}}` - -- Run logstash using configuration: - -`sudo logstash --config {{logstash_config.conf}}` - -- Run logstash with the most basic inline configuration string: - -`sudo logstash -e 'input {} filter {} output {}'` diff --git a/pages.cn/common/lolcat.md b/pages.cn/common/lolcat.md deleted file mode 100644 index 35980d4f8..000000000 --- a/pages.cn/common/lolcat.md +++ /dev/null @@ -1,19 +0,0 @@ -# lolcat - -> Put a rainbow in everything you `cat` to the console. - -- Print a file to the console in rainbow colors: - -`lolcat {{path/to/file}}` - -- Print the result of a text-producing command in rainbow colors: - -`{{fortune}} | lolcat` - -- Print a file to the console with animated rainbow colors: - -`lolcat -a {{path/to/file}}` - -- Print a file to the console with 24-bit (truecolor) rainbow colors: - -`lolcat -t {{path/to/file}}` diff --git a/pages.cn/common/lorem.md b/pages.cn/common/lorem.md deleted file mode 100644 index 1e9527e34..000000000 --- a/pages.cn/common/lorem.md +++ /dev/null @@ -1,19 +0,0 @@ -# lorem - -> Create more or less random lorem ipsum text. - -- Print the specified number of words: - -`lorem -n {{20}}` - -- Print 10 lines of Goethe's Faust: - -`lorem -l {{10}} --faust` - -- Print 5 sentences of Poe's Raven: - -`lorem -s {{5}} --raven` - -- Print 40 random characters from Boccacio's Decameron: - -`lorem --randomize -c {{40}} --decamerone` diff --git a/pages.cn/common/lp.md b/pages.cn/common/lp.md deleted file mode 100644 index 8413f9e89..000000000 --- a/pages.cn/common/lp.md +++ /dev/null @@ -1,23 +0,0 @@ -# lp - -> Print files. - -- Print the output of a command to the default printer (see `lpstat` command): - -`echo "test" | lp` - -- Print a file to the default printer: - -`lp {{path/to/filename}}` - -- Print a file to a named printer (see `lpstat` command): - -`lp -d {{printer_name}} {{path/to/filename}}` - -- Print N copies of file to default printer (replace N with desired number of copies): - -`lp -n {{N}} {{path/to/filename}}` - -- Print only certain pages to the default printer (print pages 1, 3-5, and 16): - -`lp -P 1,3-5,16 {{path/to/filename}}` diff --git a/pages.cn/common/lpass.md b/pages.cn/common/lpass.md deleted file mode 100644 index 9d4ec9728..000000000 --- a/pages.cn/common/lpass.md +++ /dev/null @@ -1,23 +0,0 @@ -# lpass - -> Command line interface for the LastPass password manager. - -- Login to your LastPass account, by entering your master password when prompted: - -`lpass login {{username}}` - -- Show login status: - -`lpass status` - -- List all sites grouped by category: - -`lpass ls` - -- Generate a new password for "gmail.com" with identifier "myinbox" and add to LastPass: - -`lpass generate --username {{username}} --url {{gmail.com}} {{myinbox}} {{password_length}}` - -- Show password for a specified entry: - -`lpass show {{myinbox}} --password` diff --git a/pages.cn/common/lpstat.md b/pages.cn/common/lpstat.md deleted file mode 100644 index d0983b625..000000000 --- a/pages.cn/common/lpstat.md +++ /dev/null @@ -1,19 +0,0 @@ -# lpstat - -> Show status information about printers. - -- List printers present on the machine and whether they are enabled for printing: - -`lpstat -p` - -- Show the default printer: - -`lpstat -d` - -- Display all available status information: - -`lpstat -t` - -- Show a list of print jobs queued by the specified user: - -`lpstat -u {{user}}` diff --git a/pages.cn/common/ls.md b/pages.cn/common/ls.md deleted file mode 100644 index 9d3725c04..000000000 --- a/pages.cn/common/ls.md +++ /dev/null @@ -1,27 +0,0 @@ -# ls - -> List directory contents. - -- List files one per line: - -`ls -1` - -- List all files, including hidden files: - -`ls -a` - -- Long format list (permissions, ownership, size and modification date) of all files: - -`ls -la` - -- Long format list with size displayed using human readable units (KB, MB, GB): - -`ls -lh` - -- Long format list sorted by size (descending): - -`ls -lS` - -- Long format list of all files, sorted by modification date (oldest first): - -`ls -ltr` diff --git a/pages.cn/common/lsof.md b/pages.cn/common/lsof.md deleted file mode 100644 index 221bcbfa4..000000000 --- a/pages.cn/common/lsof.md +++ /dev/null @@ -1,32 +0,0 @@ -# lsof - -> Lists open files and the corresponding processes. -> Note: Root privileges (or sudo) is required to list files opened by others. - -- Find the processes that have a given file open: - -`lsof {{path/to/file}}` - -- Find the process that opened a local internet port: - -`lsof -i :{{port}}` - -- Only output the process ID (PID): - -`lsof -t {{path/to/file}}` - -- List files opened by the given user: - -`lsof -u {{username}}` - -- List files opened by the given command or process: - -`lsof -c {{process_or_command_name}}` - -- List files opened by a specific process, given its PID: - -`lsof -p {{PID}}` - -- List open files in a directory: - -`lsof +D {{path/to/directory}}` diff --git a/pages.cn/common/lua.md b/pages.cn/common/lua.md deleted file mode 100644 index 981f3536d..000000000 --- a/pages.cn/common/lua.md +++ /dev/null @@ -1,15 +0,0 @@ -# lua - -> A powerful, light-weight embeddable programming language. - -- Start an interactive Lua shell: - -`lua` - -- Execute a Lua script: - -`lua {{script_name.lua}} {{--optional-argument}}` - -- Execute a Lua expression: - -`lua -e '{{print( "Hello World" )}}` diff --git a/pages.cn/common/luac.md b/pages.cn/common/luac.md deleted file mode 100644 index 88b5b389c..000000000 --- a/pages.cn/common/luac.md +++ /dev/null @@ -1,11 +0,0 @@ -# luac - -> Lua bytecode compiler. - -- Compile a Lua source file to Lua bytecode: - -`luac -o {{byte_code.luac}} {{source.lua}}` - -- Do not include debug symbols in the output: - -`luac -s -o {{byte_code.luac}} {{source.lua}}` diff --git a/pages.cn/common/lumen.md b/pages.cn/common/lumen.md deleted file mode 100644 index 2c70d8564..000000000 --- a/pages.cn/common/lumen.md +++ /dev/null @@ -1,11 +0,0 @@ -# lumen - -> A command line installer for the Lumen micro-framework. - -- Create a new Lumen application: - -`lumen new {{application_name}}` - -- List the available installer commands: - -`lumen list` diff --git a/pages.cn/common/lwp-request.md b/pages.cn/common/lwp-request.md deleted file mode 100644 index 5d80b06ae..000000000 --- a/pages.cn/common/lwp-request.md +++ /dev/null @@ -1,28 +0,0 @@ -# lwp-request - -> Simple command-line HTTP client. -> Built with libwww-perl. - -- Make a simple GET request: - -`lwp-request -m GET {{http://example.com/some/path}}` - -- Upload a file with a POST request: - -`cat {{/path/to/file}} | lwp-request -m POST {{http://example.com/some/path}}` - -- Make a request with a custom user agent: - -`lwp-request -H 'User-Agent: {{user_agent}} -m {{METHOD}} {{http://example.com/some/path}}` - -- Make a request with HTTP authentication: - -`lwp-request -C {{username}}:{{password}} -m {{METHOD}} {{http://example.com/some/path}}` - -- Make a request and print request headers: - -`lwp-request -U -m {{METHOD}} {{http://example.com/some/path}}` - -- Make a request and print response headers and status chain: - -`lwp-request -E -m {{METHOD}} {{http://example.com/some/path}}` diff --git a/pages.cn/common/lz4.md b/pages.cn/common/lz4.md deleted file mode 100644 index 33b42e250..000000000 --- a/pages.cn/common/lz4.md +++ /dev/null @@ -1,27 +0,0 @@ -# lz4 - -> Compress or decompress .lz4 files. - -- Compress a file: - -`lz4 {{file}}` - -- Decompress a file: - -`lz4 -d {{file.lz4}}` - -- Decompress a file and write to stdout: - -`lz4 -dc {{file.lz4}}` - -- Package and compress a directory and its contents: - -`tar cvf - {{path/to/dir}} | lz4 - {{dir.tar.lz4}}` - -- Decompress and unpack a directory and its contents: - -`lz4 -d {{dir.tar.lz4}} | tar -xv` - -- Compress a file using the best compression: - -`lz4 -9 {{file}}` diff --git a/pages.cn/common/m4.md b/pages.cn/common/m4.md deleted file mode 100644 index c1f794949..000000000 --- a/pages.cn/common/m4.md +++ /dev/null @@ -1,11 +0,0 @@ -# m4 - -> Macro processor. - -- Process macros in a file: - -`m4 {{path/to/file}}` - -- Define a macro before processing files: - -`m4 -D{{macro_name}}={{macro_value}} {{path/to/file}}` diff --git a/pages.cn/common/magento.md b/pages.cn/common/magento.md deleted file mode 100644 index b6efafd53..000000000 --- a/pages.cn/common/magento.md +++ /dev/null @@ -1,35 +0,0 @@ -# magento - -> A CLI for managing the Magento PHP framework. - -- Enable one or more space-separated modules: - -`magento module:enable {{module(s)}}` - -- Disable one or more space-separated modules: - -`magento module:disable {{module(s)}}` - -- Update the database after enabling modules: - -`magento setup:upgrade` - -- Update code and dependency injection configuration: - -`magento setup:di:compile` - -- Deploy static assets: - -`magento setup:static-content:deploy` - -- Enable maintenance mode: - -`magento maintenance:enable` - -- Disable maintenance mode: - -`magento maintenance:disable` - -- List all available commands: - -`magento list` diff --git a/pages.cn/common/mailx.md b/pages.cn/common/mailx.md deleted file mode 100644 index fe9b4b07c..000000000 --- a/pages.cn/common/mailx.md +++ /dev/null @@ -1,27 +0,0 @@ -# mailx - -> Send and receive mail. - -- Send mail (the content should be typed after the command, and ended with `Ctrl+D`): - -`mailx -s "{{subject}}" {{to_addr}}` - -- Send mail with content passed from another command: - -`echo "{{content}}" | mailx -s "{{subject}}" {{to_addr}}` - -- Send mail with content read from 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 specifying the sender address: - -`mailx -s "{{subject}}" -r {{from_addr}} {{to_addr}}` - -- Send mail with an attachment: - -`mailx -a {{file}} -s "{{subject}}" {{to_addr}}` diff --git a/pages.cn/common/make.md b/pages.cn/common/make.md deleted file mode 100644 index ea7b7a009..000000000 --- a/pages.cn/common/make.md +++ /dev/null @@ -1,28 +0,0 @@ -# make - -> Task runner for targets described in Makefile. -> Mostly used to control the compilation of an executable from source code. - -- Call the first target specified in the Makefile (usually named "all"): - -`make` - -- Call a specific target: - -`make {{target}}` - -- Call a specific target, executing 4 jobs at a time in parallel: - -`make -j{{4}} {{target}}` - -- Use a specific Makefile: - -`make --file {{file}}` - -- Execute make from another directory: - -`make --directory {{directory}}` - -- Force making of a target, even if source files are unchanged: - -`make --always-make {{target}}` diff --git a/pages.cn/common/makensis.md b/pages.cn/common/makensis.md deleted file mode 100644 index a97b6be0b..000000000 --- a/pages.cn/common/makensis.md +++ /dev/null @@ -1,16 +0,0 @@ -# makensis - -> Cross-platform compiler for NSIS installers. -> It compiles a NSIS script into a Windows installer executable. - -- Compile a NSIS script: - -`makensis {{path/to/file.nsi}}` - -- Compile a NSIS script in strict mode (treat warnings as errors): - -`makensis -WX {{path/to/file.nsi}}` - -- Print help for a specific command: - -`makensis -CMDHELP {{command}}` diff --git a/pages.cn/common/man.md b/pages.cn/common/man.md deleted file mode 100644 index 55f9bc8e4..000000000 --- a/pages.cn/common/man.md +++ /dev/null @@ -1,23 +0,0 @@ -# man - -> Format and display manual pages. - -- Display man page for a command: - -`man {{command}}` - -- Display man page for a command from section 7: - -`man {{command}}.{{7}}` - -- Display path searched for manpages: - -`man --path` - -- Display location of a manpage rather than the manpage itself: - -`man -w {{command}}` - -- Do a keyword search for manpages containing a search string: - -`man -k {{keyword}}` diff --git a/pages.cn/common/mc.md b/pages.cn/common/mc.md deleted file mode 100644 index db93ea130..000000000 --- a/pages.cn/common/mc.md +++ /dev/null @@ -1,8 +0,0 @@ -# mc - -> Midnight Commander, a terminal based file manager. -> Navigate the folder structure using the arrow keys, the mouse or by typing the commands into the terminal. - -- Start mc: - -`mc` diff --git a/pages.cn/common/md5sum.md b/pages.cn/common/md5sum.md deleted file mode 100644 index 4dcd6fbc4..000000000 --- a/pages.cn/common/md5sum.md +++ /dev/null @@ -1,15 +0,0 @@ -# md5sum - -> Calculate MD5 cryptographic checksums. - -- Calculate the MD5 checksum for a file: - -`md5sum {{filename1}}` - -- Calculate MD5 checksums for multiple files: - -`md5sum {{filename1}} {{filename2}}` - -- Read a file of MD5SUMs and verify all files have matching checksums: - -`md5sum -c {{filename.md5}}` diff --git a/pages.cn/common/mdp.md b/pages.cn/common/mdp.md deleted file mode 100644 index da5406938..000000000 --- a/pages.cn/common/mdp.md +++ /dev/null @@ -1,19 +0,0 @@ -# mdp - -> A command-line based tool to make presentations from markdown files. - -- Launch a presentation in the terminal from a markdown file: - -`mdp {{presentation.md}}` - -- Disable fading transitions: - -`mdp --nofade {{presentation.md}}` - -- Invert font colors to use in terminals with light background: - -`mdp --invert {{presentation.md}}` - -- Disable transparency in transparent terminals: - -`mdp --notrans {{presentation.md}}` diff --git a/pages.cn/common/mediainfo.md b/pages.cn/common/mediainfo.md deleted file mode 100644 index ad16d5577..000000000 --- a/pages.cn/common/mediainfo.md +++ /dev/null @@ -1,15 +0,0 @@ -# mediainfo - -> Display metadata from video and audio files. - -- Display metadata for a given file in the console: - -`mediainfo {{file}}` - -- Store the output to a given file along with displaying in the console: - -`mediainfo --Logfile={{out.txt}} {{file}}` - -- Display the list of metadata attributes that can be extracted: - -`mediainfo --Info-Parameters` diff --git a/pages.cn/common/meshlabserver.md b/pages.cn/common/meshlabserver.md deleted file mode 100644 index 4307b2253..000000000 --- a/pages.cn/common/meshlabserver.md +++ /dev/null @@ -1,23 +0,0 @@ -# meshlabserver - -> Command line interface for the MeshLab 3D mesh processing software. - -- Convert an STL file to an OBJ file: - -`meshlabserver -i {{input.stl}} -o {{output.obj}}` - -- Convert a WRL file to a OFF file, including the vertex and face normals in the output mesh: - -`meshlabserver -i {{input.wrl}} -o {{output.off}} -om vn fn` - -- Dump a list of all the available processing filters into a file: - -`meshlabserver -d {{filename}}` - -- Process a 3D file using a filter script created in the MeshLab GUI (Filters > Show current filter script > Save Script): - -`meshlabserver -i {{input.ply}} -o {{output.ply}} -s {{filter_script.mlx}}` - -- Process a 3D file using a filter script, writing the output of the filters into a log file: - -`meshlabserver -i {{input.x3d}} -o {{output.x3d}} -s {{filter_script.mlx}} -l {{logfile}}` diff --git a/pages.cn/common/meteor.md b/pages.cn/common/meteor.md deleted file mode 100644 index 403bcfa57..000000000 --- a/pages.cn/common/meteor.md +++ /dev/null @@ -1,27 +0,0 @@ -# meteor - -> Full-stack javascript platform for building web applications. - -- Run a meteor project from its root directory in development mode: - -`meteor` - -- Create a project under the given directory: - -`meteor create {{path/to/directory}}` - -- Display the list of packages the project is currently using: - -`meteor list` - -- Add a package to the project: - -`meteor add {{package_name}}` - -- Remove a package from the project: - -`meteor remove {{package_name}}` - -- Create a production build of the project as a tarball under the given directory: - -`meteor build {{path/to/directory}}` diff --git a/pages.cn/common/micro.md b/pages.cn/common/micro.md deleted file mode 100644 index 2b00a28b2..000000000 --- a/pages.cn/common/micro.md +++ /dev/null @@ -1,28 +0,0 @@ -# micro - -> Micro is a modern and intuitive terminal-based text editor. -> You can use your keyboard, but also your mouse to navigate and/or select text. - -- Open a file: - -`micro {{file}}` - -- Cut the entire line: - -`Ctrl + K` - -- Search for a pattern in the file (press `Ctrl + N`/`Ctrl + P` to go to next/previous match): - -`Ctrl + F "{{pattern}}" ` - -- Execute a command: - -`Ctrl + E {{command}} ` - -- Perform a substitution in the whole file: - -`Ctrl + E replaceall "{{pattern}}" "{{replacement}}" ` - -- Quit: - -`Ctrl + Q` diff --git a/pages.cn/common/minetest.md b/pages.cn/common/minetest.md deleted file mode 100644 index abfc69cef..000000000 --- a/pages.cn/common/minetest.md +++ /dev/null @@ -1,20 +0,0 @@ -# minetest - -> Multiplayer infinite-world block sandbox. -> See also `minetestserver`, the server-only binary. - -- Start minetest in client mode: - -`minetest` - -- Start minetest in server mode: - -`minetest --server` - -- Write logs to a specific file: - -`minetest --logfile {{path/to/file}}` - -- Only write errors to the console: - -`minetest --quiet` diff --git a/pages.cn/common/minetestserver.md b/pages.cn/common/minetestserver.md deleted file mode 100644 index 470e4fd3e..000000000 --- a/pages.cn/common/minetestserver.md +++ /dev/null @@ -1,36 +0,0 @@ -# minetestserver - -> Multiplayer infinite-world block sandbox server. -> See also `minetest`, the graphical client. - -- Start the server: - -`minetestserver` - -- List available worlds: - -`minetestserver --world list` - -- Specify the world name to load: - -`minetestserver --world {{world_name}}` - -- List the available game IDs: - -`minetestserver --gameid list` - -- Specify a game to use: - -`minetestserver --gameid {{game_id}}` - -- Listen on a specific port: - -`minetestserver --port {{34567}}` - -- Migrate to a different data backend: - -`minetestserver --migrate {{sqlite3|leveldb|redis}}` - -- Start an interactive terminal after starting the server: - -`minetestserver --terminal` diff --git a/pages.cn/common/minikube.md b/pages.cn/common/minikube.md deleted file mode 100644 index 9cb9f5d04..000000000 --- a/pages.cn/common/minikube.md +++ /dev/null @@ -1,19 +0,0 @@ -# minikube - -> Tool to run Kubernetes locally. - -- Start the cluster: - -`minikube start` - -- Get the IP address of the cluster: - -`minikube ip` - -- Access a service named my_service exposed via a node port and get the url: - -`minikube service {{my_service}} --url` - -- Open kubernetes dashboard in a browser: - -`minikube dashboard` diff --git a/pages.cn/common/mitmdump.md b/pages.cn/common/mitmdump.md deleted file mode 100644 index e5a83e85f..000000000 --- a/pages.cn/common/mitmdump.md +++ /dev/null @@ -1,16 +0,0 @@ -# mitmdump - -> View, record, and programmatically transform HTTP traffic. -> The command-line counterpart to mitmproxy. - -- Start a proxy and save all output to a file: - -`mitmdump -w {{filename}}` - -- Filter a saved traffic file to just POST requests: - -`mitmdump -nr {{input_filename}} -w {{output_filename}} {{"~m post"}}` - -- Replay a saved traffic file: - -`mitmdump -nc {{filename}}` diff --git a/pages.cn/common/mitmproxy.md b/pages.cn/common/mitmproxy.md deleted file mode 100644 index 431caa423..000000000 --- a/pages.cn/common/mitmproxy.md +++ /dev/null @@ -1,11 +0,0 @@ -# mitmproxy - -> An interactive man-in-the-middle HTTP proxy. - -- Start mitmproxy with default settings: - -`mitmproxy` - -- Start mitmproxy bound to custom address and port: - -`mitmproxy -b {{ip_address}} -p {{port}}` diff --git a/pages.cn/common/mix.md b/pages.cn/common/mix.md deleted file mode 100644 index 062fa06ec..000000000 --- a/pages.cn/common/mix.md +++ /dev/null @@ -1,23 +0,0 @@ -# mix - -> Mix is a build tool that provides tasks for creating, compiling, and testing Elixir projects, managing its dependencies, and more. - -- Execute a particular file: - -`mix run {{my_script.exs}}` - -- Create a new project: - -`mix new {{project_name}}` - -- Compile project: - -`mix compile` - -- Run project tests: - -`mix test` - -- List all mix commands: - -`mix help` diff --git a/pages.cn/common/mkdir.md b/pages.cn/common/mkdir.md deleted file mode 100644 index 905bba39f..000000000 --- a/pages.cn/common/mkdir.md +++ /dev/null @@ -1,11 +0,0 @@ -# mkdir - -> Creates a directory. - -- Create a directory in current folder or given path: - -`mkdir {{directory}}` - -- Create directories recursively (useful for creating nested dirs): - -`mkdir -p {{path/to/directory}}` diff --git a/pages.cn/common/mkfifo.md b/pages.cn/common/mkfifo.md deleted file mode 100644 index 55c3042d5..000000000 --- a/pages.cn/common/mkfifo.md +++ /dev/null @@ -1,7 +0,0 @@ -# mkfifo - -> Makes FIFOs (named pipes). - -- Create a named pipe at a given path: - -`mkfifo {{path/to/pipe}}` diff --git a/pages.cn/common/mktemp.md b/pages.cn/common/mktemp.md deleted file mode 100644 index 3db073a11..000000000 --- a/pages.cn/common/mktemp.md +++ /dev/null @@ -1,15 +0,0 @@ -# mktemp - -> Create a temporary file or directory. - -- Create an empty temporary file and return the absolute path to it: - -`mktemp` - -- Create a temporary directory and return the absolute path to it: - -`mktemp -d` - -- Create a temporary file with a specified suffix: - -`mktemp --suffix "{{.txt}}"` diff --git a/pages.cn/common/mlr.md b/pages.cn/common/mlr.md deleted file mode 100644 index 7d73bb953..000000000 --- a/pages.cn/common/mlr.md +++ /dev/null @@ -1,27 +0,0 @@ -# mlr - -> Miller is like `awk`, `sed`, `cut`, `join`, and `sort` for name-indexed data such as CSV, TSV, and tabular JSON. - -- Pretty-print a CSV file in a tabular format: - -`mlr --icsv --opprint cat {{example.csv}}` - -- Receive JSON data and pretty print the output: - -`echo '{"hello":"world"}' | mlr --ijson --opprint cat` - -- Sort alphabetically on a field: - -`mlr --icsv --opprint sort -f {{field}} {{example.csv}}` - -- Sort in descending numerical order on a field: - -`mlr --icsv --opprint sort -nr {{field}} {{example.csv}}` - -- Convert CSV to JSON, performing calculations and display those calculations: - -`mlr --icsv --ojson put '${{newField1}} = ${{oldFieldA}}/${{oldFieldB}}' {{example.csv}}` - -- Receive JSON and format the output as vertical JSON: - -`echo '{"hello":"world", "foo":"bar"}' | mlr --ijson --ojson --jvstack cat` diff --git a/pages.cn/common/mmv.md b/pages.cn/common/mmv.md deleted file mode 100644 index 5c6ba37d1..000000000 --- a/pages.cn/common/mmv.md +++ /dev/null @@ -1,19 +0,0 @@ -# mmv - -> Move and rename files in bulk. - -- Rename all files with a certain extension to a different extension: - -`mmv "*{{.old_extension}}" "#1{{.new_extension}}"` - -- Copy report6part4.txt to ./french/rapport6partie4.txt along with all similarly named files: - -`mmv -c {{"report*part*.txt"}} {{"./french/rapport#1partie#2.txt"}}` - -- Append all .txt files into one file: - -`mmv -a {{"*.txt"}} {{"all.txt"}}` - -- Convert dates in filenames from "M-D-Y" format to "D-M-Y" format: - -`mmv {{"[0-1][0-9]-[0-3][0-9]-[0-9][0-9][0-9][0-9].txt"}} {{"#3#4-#1#2-#5#6#7#8.txt"}}` diff --git a/pages.cn/common/mocha.md b/pages.cn/common/mocha.md deleted file mode 100644 index 6bff8bc86..000000000 --- a/pages.cn/common/mocha.md +++ /dev/null @@ -1,23 +0,0 @@ -# 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}}` diff --git a/pages.cn/common/mogrify.md b/pages.cn/common/mogrify.md deleted file mode 100644 index 6cb853c30..000000000 --- a/pages.cn/common/mogrify.md +++ /dev/null @@ -1,24 +0,0 @@ -# mogrify - -> Perform operations on multiple images, such as resizing, cropping, flipping, and adding effects. -> Changes are applied directly to the original file. - -- Resize all JPEG images in the folder to 50% of their initial size: - -`mogrify -resize {{50%}} {{*.jpg}}` - -- Resize all images starting with "DSC" to 800x600: - -`mogrify -resize {{800x600}} {{DSC*}}` - -- Convert all PNG images in the folder to JPEG: - -`mogrify -format {{jpg}} {{*.png}}` - -- Halve the saturation of all image files in the current directory: - -`mogrify -modulate {{100,50}} {{*}}` - -- Double the brightness of all image files in the current directory: - -`mogrify -modulate {{200}} {{*}}` diff --git a/pages.cn/common/mongo.md b/pages.cn/common/mongo.md deleted file mode 100644 index 34f0592a4..000000000 --- a/pages.cn/common/mongo.md +++ /dev/null @@ -1,19 +0,0 @@ -# mongo - -> MongoDB interactive shell client. - -- Connect to a database: - -`mongo {{database}}` - -- Connect to a database running on a given host on a given port: - -`mongo --host {{host}} --port {{port}} {{database}}` - -- Connect to a database with a given username; user will be prompted for password: - -`mongo --username {{username}} {{database}} --password` - -- Evaluate a javascript expression on the database: - -`mongo --eval '{{JSON.stringify(db.foo.findOne())}}' {{database}}` diff --git a/pages.cn/common/mongod.md b/pages.cn/common/mongod.md deleted file mode 100644 index 709faa072..000000000 --- a/pages.cn/common/mongod.md +++ /dev/null @@ -1,15 +0,0 @@ -# mongod - -> The MongoDB database server. - -- Specify a config file: - -`mongod --config {{filename}}` - -- Specify the port to listen on: - -`mongod --port {{port}}` - -- Specify database profiling level. 0 is off, 1 is only slow operations, 2 is all: - -`mongod --profile {{0|1|2}}` diff --git a/pages.cn/common/mongodump.md b/pages.cn/common/mongodump.md deleted file mode 100644 index 6ed98617b..000000000 --- a/pages.cn/common/mongodump.md +++ /dev/null @@ -1,27 +0,0 @@ -# mongodump - -> Utility to export the contents of a MongoDB instance. - -- Create a dump of all databases (this will place the files inside a folder called "dump"): - -`mongodump` - -- Specify an output location for the dump: - -`mongodump --out {{path/to/folder}}` - -- Create a dump of a given database: - -`mongodump --db {{database_name}}` - -- Create a dump of a given collection within a given database: - -`mongodump --collection {{collection_name}} --db {{database_name}}` - -- Connect to a given host running on a given port, and create a dump: - -`mongodump --host {{host}} --port {{port}}` - -- Create a dump of a given database with a given username; user will be prompted for password: - -`mongodump --username {{username}} {{database}} --password` diff --git a/pages.cn/common/mongorestore.md b/pages.cn/common/mongorestore.md deleted file mode 100644 index 30da0771e..000000000 --- a/pages.cn/common/mongorestore.md +++ /dev/null @@ -1,19 +0,0 @@ -# mongorestore - -> Utility to import a collection or database from a binary dump into a MongoDB instance. - -- Import a bson data dump from a folder to a MongoDB database: - -`mongorestore --db {{database_name}} {{path/to/folder}}` - -- Import a bson data dump from a folder to a given database in a MongoDB server host, running at a given port, with user authentication (user will be prompted for password): - -`mongorestore --host {{database_host:port}} --db {{database_name}} --username {{username}} {{path/to/folder}} --password` - -- Import a collection from a bson file to a MongoDB database: - -`mongorestore --db {{database_name}} {{path/to/file}}` - -- Import a collection from a bson file to a given database in a MongoDB server host, running at a given port, with user authentication (user will be prompted for password): - -`mongorestore --host {{database_host:port}} --db {{database_name}} --username {{username}} {{path/to/file}} --password` diff --git a/pages.cn/common/monodis.md b/pages.cn/common/monodis.md deleted file mode 100644 index 831a44796..000000000 --- a/pages.cn/common/monodis.md +++ /dev/null @@ -1,31 +0,0 @@ -# monodis - -> The Mono Common Intermediate Language (CIL) disassembler. - -- Disassemble an assembly to textual CIL: - -`monodis {{path/to/assembly.exe}}` - -- Save the output to a file: - -`monodis --output={{path/to/output.il}} {{path/to/assembly.exe}}` - -- Show information about an assembly: - -`monodis --assembly {{path/to/assembly.dll}}` - -- List the references of an assembly: - -`monodis --assemblyref {{path/to/assembly.exe}}` - -- List all the methods in an assembly: - -`monodis --method {{path/to/assembly.exe}}` - -- Show a list of resources embedded within an assembly: - -`monodis --manifest {{path/to/assembly.dll}}` - -- Extract all the embedded resources to the current directory: - -`monodis --mresources {{path/to/assembly.dll}}` diff --git a/pages.cn/common/monop.md b/pages.cn/common/monop.md deleted file mode 100644 index e0b0ccec1..000000000 --- a/pages.cn/common/monop.md +++ /dev/null @@ -1,31 +0,0 @@ -# monop - -> Finds and displays signatures of Types and methods inside .NET assemblies. - -- Show the structure of a Type built-in of the .NET Framework: - -`monop {{System.String}}` - -- List the types in an assembly: - -`monop -r:{{path/to/assembly.exe}}` - -- Show the structure of a Type in a specific assembly: - -`monop -r:{{path/to/assembly.dll}} {{Namespace.Path.To.Type}}` - -- Only show members defined in the specified Type: - -`monop -r:{{path/to/assembly.dll}} --only-declared {{Namespace.Path.To.Type}}` - -- Show private members: - -`monop -r:{{path/to/assembly.dll}} --private {{Namespace.Path.To.Type}}` - -- Hide obsolete members: - -`monop -r:{{path/to/assembly.dll}} --filter-obsolete {{Namespace.Path.To.Type}}` - -- List the other assemblies that a specified assembly references: - -`monop -r:{{path/to/assembly.dll}} --refs` diff --git a/pages.cn/common/montage.md b/pages.cn/common/montage.md deleted file mode 100644 index b3966a9f5..000000000 --- a/pages.cn/common/montage.md +++ /dev/null @@ -1,24 +0,0 @@ -# montage - -> Imagemagick image montage tool. -> Tiles images into a customisable grid. - -- Tile images into a grid, automatically resizing images larger than the grid cell size: - -`montage {{image1.png}} {{image2.jpg}} {{imageN.png}} montage.jpg` - -- Tile images into a grid, automatically calculating the grid cell size from the largest image: - -`montage {{image1.png}} {{image2.jpg}} {{imageN.png}} -geometry +0+0 montage.jpg` - -- Set the grid cell size and resize images to fit it before tiling: - -`montage {{image1.png}} {{image2.jpg}} {{imageN.png}} -geometry 640x480+0+0 montage.jpg` - -- Limit the number of rows and columns in the grid, causing input images to overflow into multiple output montages: - -`montage {{image1.png}} {{image2.jpg}} {{imageN.png}} -geometry +0+0 -tile 2x3 montage_%d.jpg` - -- Resize and crop images to completely fill their grid cells before tiling: - -`montage {{image1.png}} {{image2.jpg}} {{imageN.png}} -geometry +0+0 -resize 640x480^ -gravity center -crop 640x480+0+0 montage.jpg` diff --git a/pages.cn/common/more.md b/pages.cn/common/more.md deleted file mode 100644 index 1ea8a9a67..000000000 --- a/pages.cn/common/more.md +++ /dev/null @@ -1,19 +0,0 @@ -# more - -> Open a file for interactive reading, allowing scrolling and search (in forward direction only). - -- Open a file: - -`more {{source_file}}` - -- Page down: - -`` - -- Search for a string (press `n` to go to the next match): - -`/{{something}}` - -- Exit: - -`q` diff --git a/pages.cn/common/moro.md b/pages.cn/common/moro.md deleted file mode 100644 index 447eb736c..000000000 --- a/pages.cn/common/moro.md +++ /dev/null @@ -1,31 +0,0 @@ -# moro - -> Track work time. - -- Invoke `moro` without parameters, to set the current time as the start of the working day: - -`moro` - -- Specify a custom time for the start of the working day: - -`moro hi {{09:30}}` - -- Invoke `moro` without parameters a second time, to set the current time at the end of the working day: - -`moro` - -- Specify a custom time for the end of the working day: - -`moro bye {{17:30}}` - -- Add a note on the current working day: - -`moro note {{3 hours on project Foo}}` - -- Show a report of time logs and notes for the current working day: - -`moro report` - -- Show a report of time logs and notes for all working days on record: - -`moro report --all` diff --git a/pages.cn/common/mosh.md b/pages.cn/common/mosh.md deleted file mode 100644 index a40453a18..000000000 --- a/pages.cn/common/mosh.md +++ /dev/null @@ -1,28 +0,0 @@ -# mosh - -> Mobile Shell (`mosh`) is a robust and responsive replacement for SSH. -> `mosh` persists connections to remote servers while roaming between networks. - -- Connect to a remote server: - -`mosh {{username}}@{{remote_host}}` - -- Connect to a remote server with a specific identity (private key): - -`mosh --ssh="ssh -i {{/path/to/key_file}}" {{username}}@{{remote_host}}` - -- Connect to a remote server using a specific port: - -`mosh --ssh="ssh -p {{2222}}" {{username}}@{{remote_host}}` - -- Run a command on a remote server: - -`mosh {{remote_host}} -- {{command -with -flags}}` - -- Select Mosh UDP port (useful when `{{remote_host}}` is behind a NAT): - -`mosh -p {{124}} {{username}}@{{remote_host}}` - -- Usage when `mosh-server` binary is outside standard path: - -`mosh --server={{/path/to/bin/}}mosh-server {{remote_host}}` diff --git a/pages.cn/common/most.md b/pages.cn/common/most.md deleted file mode 100644 index 539049129..000000000 --- a/pages.cn/common/most.md +++ /dev/null @@ -1,35 +0,0 @@ -# most - -> Open one or several files for interactive reading, allowing scrolling and search. - -- Open a file: - -`most {{path/to/file}}` - -- Open several files: - -`most {{path/to/file1}} {{path/to/file2}}` - -- Open a file at the first occurrence of "string": - -`most {{file}} +/{{string}}` - -- Move through opened files: - -`:O n` - -- Jump to the 100th line: - -`{{100}}j` - -- Edit current file: - -`e` - -- Split the current window in half: - -` o` - -- Exit: - -`Q` diff --git a/pages.cn/common/mount.md b/pages.cn/common/mount.md deleted file mode 100644 index e798ddccd..000000000 --- a/pages.cn/common/mount.md +++ /dev/null @@ -1,23 +0,0 @@ -# mount - -> Provides access to an entire filesystem in one directory. - -- Show all mounted filesystems: - -`mount` - -- Mount a device to a directory: - -`mount -t {{filesystem_type}} {{path/to/device_file}} {{path/to/target_directory}}` - -- Mount a CD-ROM device (with the filetype ISO9660) to /cdrom (readonly): - -`mount -t {{iso9660}} -o ro {{/dev/cdrom}} {{/cdrom}}` - -- Mount all the filesystem defined in /etc/fstab: - -`mount -a` - -- Mount a specific filesystem described in /etc/fstab (e.g. "/dev/sda1 /my_drive ext2 defaults 0 2"): - -`mount {{/my_drive}}` diff --git a/pages.cn/common/mp4box.md b/pages.cn/common/mp4box.md deleted file mode 100644 index 2f953c962..000000000 --- a/pages.cn/common/mp4box.md +++ /dev/null @@ -1,15 +0,0 @@ -# mp4box - -> MPEG-4 Systems Toolbox - Muxes streams into MP4 container. - -- Display information about an existing MP4 file: - -`mp4box -info {{filename}}` - -- Add an SRT subtitle file into an MP4 file: - -`mp4box -add {{input_subs.srt}}:lang=eng -add {{input.mp4}} {{output.mp4}}` - -- Combine audio from one file and video from another: - -`mp4box -add {{input1.mp4}}#audio -add {{input2.mp4}}#video {{output.mp4}` diff --git a/pages.cn/common/mpc.md b/pages.cn/common/mpc.md deleted file mode 100644 index 79807efa8..000000000 --- a/pages.cn/common/mpc.md +++ /dev/null @@ -1,28 +0,0 @@ -# mpc - -> Music Player Client. -> Program for controlling the Music Player Daemon (MPD). - -- Toggle play/pause: - -`mpc toggle` - -- Stop playing: - -`mpc stop` - -- Show information about the currently playing song: - -`mpc status` - -- Play next song: - -`mpc next` - -- Play previous song: - -`mpc prev` - -- Forward or rewind the currently playing song: - -`mpc [+-]{{seconds}}` diff --git a/pages.cn/common/mpv.md b/pages.cn/common/mpv.md deleted file mode 100644 index 6b6da06af..000000000 --- a/pages.cn/common/mpv.md +++ /dev/null @@ -1,27 +0,0 @@ -# mpv - -> A audio/video player based on MPlayer. - -- Play a video or audio file: - -`mpv {{file}}` - -- Jump backward/forward 5 seconds: - -`LEFT RIGHT` - -- Jump backward/forward 1 minute: - -`DOWN UP` - -- Decrease or increase playback speed by 10 %: - -`[ ]` - -- Play a file at a specified speed (0.01 to 100, default 1): - -`mpv --speed {{speed}} {{file}}` - -- Play a file using a profile defined in the `mpv.conf` file: - -`mpv --profile {{profile_name}} {{file}}` diff --git a/pages.cn/common/mr.md b/pages.cn/common/mr.md deleted file mode 100644 index 39b97f0ef..000000000 --- a/pages.cn/common/mr.md +++ /dev/null @@ -1,19 +0,0 @@ -# mr - -> Myrepos manages all your version control repositories at once. - -- Register a repository: - -`mr register` - -- Update repositories in 5 concurent jobs: - -`mr -j{{5}} update` - -- Print the status of all repositories: - -`mr status` - -- Checkout all repositories to the latest version: - -`mr checkout` diff --git a/pages.cn/common/msbuild.md b/pages.cn/common/msbuild.md deleted file mode 100644 index 9737dca43..000000000 --- a/pages.cn/common/msbuild.md +++ /dev/null @@ -1,31 +0,0 @@ -# msbuild - -> The Microsoft build tool for Visual Studio project solutions. - -- Build the first project file in the current directory: - -`msbuild` - -- Build a specific project file: - -`msbuild {{path/to/project_file}}` - -- Set one or more semicolon-separated targets to build: - -`msbuild {{path/to/project_file}} /target:{{targets}}` - -- Set one or more semicolon-separated properties: - -`msbuild {{path/to/project_file}} /property:{{name=value}}` - -- Set the build tools version to use: - -`msbuild {{path/to/project_file}} /toolsversion:{{version}}` - -- Display detailed information at the end of the log about how the project was configured: - -`msbuild {{path/to/project_file}} /detailedsummary` - -- Display detailed help information: - -`msbuild /help` diff --git a/pages.cn/common/msmtp.md b/pages.cn/common/msmtp.md deleted file mode 100644 index 4680fd78b..000000000 --- a/pages.cn/common/msmtp.md +++ /dev/null @@ -1,16 +0,0 @@ -# msmtp - -> An SMTP client. -> It reads text from standard input and sends it to an SMTP server. - -- Send an email using the default account configured in `~/.msmtprc`: - -`echo {{"Hello world"}} | msmtp {{to@example.org}}` - -- Send an email using a specific account configured in `~/.msmtprc`: - -`echo {{"Hello world"}} | msmtp --account={{account_name}} {{to@example.org}}` - -- Send an email without a configured account. The password should be specified in the `~/.msmtprc` file: - -`echo {{"Hello world"}} | msmtp --host={{localhost}} --port={{999}} --from={{from@example.org}} {{to@example.org}}` diff --git a/pages.cn/common/mtr.md b/pages.cn/common/mtr.md deleted file mode 100644 index d8a7f3700..000000000 --- a/pages.cn/common/mtr.md +++ /dev/null @@ -1,23 +0,0 @@ -# mtr - -> Matt's Traceroute: combined traceroute and ping tool. - -- Traceroute to a host and continuously ping all intermediary hops: - -`mtr {{host}}` - -- Disable IP address and host name mapping: - -`mtr -n {{host}}` - -- Generate output after pinging each hop 10 times: - -`mtr -w {{host}}` - -- Force IP IPv4 or IPV6: - -`mtr -4 {{host}}` - -- Wait for a given time (in seconds) before sending another packet to the same hop: - -`mtr -i {{seconds}} {{host}}` diff --git a/pages.cn/common/mutool.md b/pages.cn/common/mutool.md deleted file mode 100644 index 59e61ff36..000000000 --- a/pages.cn/common/mutool.md +++ /dev/null @@ -1,23 +0,0 @@ -# mutool - -> Convert PDF files, query information and extract data. - -- Convert pages 1-10 into 10 PNG images: - -`mutool convert -o {{image%d.png}} {{file.pdf}} {{1-10}}` - -- Convert pages 2, 3 and 5 of a PDF into text in the standard output: - -`mutool draw -F {{txt}} {{file.pdf}} {{2,3,5}}` - -- Concatenate two PDFs: - -`mutool merge -o {{output.pdf}} {{input1.pdf}} {{input2.pdf}}` - -- Query information about all content embedded in a PDF: - -`mutool info {{input.pdf}}` - -- Extract all images, fonts and resources embedded in a PDF out into the current directory: - -`mutool extract {{input.pdf}}` diff --git a/pages.cn/common/mutt.md b/pages.cn/common/mutt.md deleted file mode 100644 index c43f888cf..000000000 --- a/pages.cn/common/mutt.md +++ /dev/null @@ -1,23 +0,0 @@ -# mutt - -> Command-line email client. - -- Open the specified mailbox: - -`mutt -f {{mailbox}}` - -- Send an email and specify a subject and a cc recipient: - -`mutt -s {{subject}} -c {{cc@example.com}} {{recipient@example.com}}` - -- Send an email with files attached: - -`mutt -a {{file1}} {{file2}} -- {{recipient@example.com}}` - -- Specify a file to include as the message body: - -`mutt -i {{file}} {{recipient@example.com}}` - -- Specify a draft file containing the header and the body of the message, in RFC 5322 format: - -`mutt -H {{file}} {{recipient@example.com}}` diff --git a/pages.cn/common/mv.md b/pages.cn/common/mv.md deleted file mode 100644 index c055b4184..000000000 --- a/pages.cn/common/mv.md +++ /dev/null @@ -1,23 +0,0 @@ -# mv - -> Move or rename files and directories. - -- Move files in arbitrary locations: - -`mv {{source}} {{target}}` - -- Do not prompt for confirmation before overwriting existing files: - -`mv -f {{source}} {{target}}` - -- Prompt for confirmation before overwriting existing files, regardless of file permissions: - -`mv -i {{source}} {{target}}` - -- Do not overwrite existing files at the target: - -`mv -n {{source}} {{target}}` - -- Move files in verbose mode, showing files after they are moved: - -`mv -v {{source}} {{target}}` diff --git a/pages.cn/common/mvn.md b/pages.cn/common/mvn.md deleted file mode 100644 index 73858ab4e..000000000 --- a/pages.cn/common/mvn.md +++ /dev/null @@ -1,36 +0,0 @@ -# mvn - -> Apache Maven. -> Tool for building and managing Java-based projects. - -- Compile a project: - -`mvn compile` - -- Compile and package the compiled code in its distributable format, such as a `jar`: - -`mvn package` - -- Compile and package, skipping unit tests: - -`mvn package -Dmaven.test.skip=true` - -- Install the built package in local maven repository. (This will invoke the compile and package commands too): - -`mvn install` - -- Delete build artifacts from the target folder: - -`mvn clean` - -- Do a clean and then invoke the package phase: - -`mvn clean package` - -- Clean and then package the code with a given build profile: - -`mvn clean -P{{profile}} package` - -- Run a class with a main method: - -`mvn exec:java -Dexec.mainClass="{{com.example.Main}}" -Dexec.args="{{arg1 arg2}}"` diff --git a/pages.cn/common/mysql.md b/pages.cn/common/mysql.md deleted file mode 100644 index 8bea86355..000000000 --- a/pages.cn/common/mysql.md +++ /dev/null @@ -1,23 +0,0 @@ -# mysql - -> The MySQL command-line tool. - -- Connect to a database: - -`mysql {{database_name}}` - -- Connect to a database, user will be prompted for a password: - -`mysql -u {{user}} --password {{database_name}}` - -- Connect to a database on another host: - -`mysql -h {{database_host}} {{database_name}}` - -- Connect to a database through a Unix socket: - -`mysql --socket {{path/to/socket.sock}}` - -- Execute SQL statements in a script file (batch file): - -`mysql -e "source {{filename.sql}}" {{database_name}}` diff --git a/pages.cn/common/mysqldump.md b/pages.cn/common/mysqldump.md deleted file mode 100644 index f32918639..000000000 --- a/pages.cn/common/mysqldump.md +++ /dev/null @@ -1,11 +0,0 @@ -# mysqldump - -> Backups MySQL databases. - -- Create a backup, user will be prompted for a password: - -`mysqldump -u {{user}} --password {{database_name}} -r {{filename.sql}}` - -- Restore a backup, user will be prompted for a password: - -`mysql -u {{user}} --password -e "source {{filename.sql}}" {{database_name}}` diff --git a/pages.cn/common/nano.md b/pages.cn/common/nano.md deleted file mode 100644 index c164eb866..000000000 --- a/pages.cn/common/nano.md +++ /dev/null @@ -1,15 +0,0 @@ -# nano - -> Simple, easy to use editor. An enhanced, free Pico clone. - -- Start nano in terminal with {filename}: - -`nano {{filename}}` - -- Enable smooth scrolling: - -`nano -S {{filename}}` - -- Indent new lines to the previous lines' indentation: - -`nano -i {{filename}}` diff --git a/pages.cn/common/nasm.md b/pages.cn/common/nasm.md deleted file mode 100644 index 8be1682d7..000000000 --- a/pages.cn/common/nasm.md +++ /dev/null @@ -1,23 +0,0 @@ -# nasm - -> The Netwide Assembler, a portable 80x86 assembler. - -- Assemble `source.asm` into a binary file `source`, in the (default) raw binary format: - -`nasm {{source.asm}}` - -- Assemble `source.asm` into a binary file `output_file`, in the specified format: - -`nasm -f {{format}} {{source.asm}} -o {{output_file}}` - -- List valid output formats (along with basic nasm help): - -`nasm -hf` - -- Assemble and generate an assembly listing file: - -`nasm -l {{list_file}} {{source.asm}}` - -- Add a directory (must be written with trailing slash) to the include file search path before assembling: - -`nasm -i {{/path/to/include_dir/}} {{source.asm}}` diff --git a/pages.cn/common/nc.md b/pages.cn/common/nc.md deleted file mode 100644 index 0ec7955e9..000000000 --- a/pages.cn/common/nc.md +++ /dev/null @@ -1,39 +0,0 @@ -# nc - -> Reads and writes tcp or udp data. - -- Listen on a specified port: - -`nc -l {{port}}` - -- Connect to a certain port (you can then write to this port): - -`nc {{ip_address}} {{port}}` - -- Set a timeout: - -`nc -w {{timeout_in_seconds}} {{ipaddress}} {{port}}` - -- Serve a file: - -`nc -l {{port}} < {{file}}` - -- Receive a file: - -`nc {{ip_address}} {{port}} > {{file}}` - -- Server stay up after client detach: - -`nc -k -l {{port}}` - -- Client stay up after EOF: - -`nc -q {{timeout}} {{ip_address}}` - -- Port scanning: - -`nc -v -z {{ip_address}} {{port}}` - -- Proxy and port forwarding: - -`nc -l {{port}} | nc {{hostname}} {{port}}` diff --git a/pages.cn/common/ncmpcpp.md b/pages.cn/common/ncmpcpp.md deleted file mode 100644 index 8bd43ad01..000000000 --- a/pages.cn/common/ncmpcpp.md +++ /dev/null @@ -1,19 +0,0 @@ -# ncmpcpp - -> A command line music player client for the Music Player Daemon. - -- Connect to a music player daemon on a given host and port: - -`ncmpcpp --host {{ip}} --port {{port}}` - -- Display metadata of the current song to console: - -`ncmpcpp --current-song` - -- Use a specified configuration file: - -`ncmpcpp --config {{file}}` - -- Use a different set of key bindings from a file: - -`ncmpcpp --bindings {{file}}` diff --git a/pages.cn/common/neofetch.md b/pages.cn/common/neofetch.md deleted file mode 100644 index 2a9d52b9d..000000000 --- a/pages.cn/common/neofetch.md +++ /dev/null @@ -1,19 +0,0 @@ -# neofetch - -> CLI tool to display information about your operating system, software and hardware. - -- Return the default config, and create it if it's the first time the program runs: - -`neofetch` - -- Trigger an info line from appearing in the output, where 'infoname' is the function name in the config file, e.g. memory: - -`neofetch --{{enable|disable}} {{infoname}}` - -- Hide/Show OS architecture: - -`neofetch --os_arch {{on|off}}` - -- Enable/Disable CPU brand in output: - -`neofetch --cpu_brand {{on|off}}` diff --git a/pages.cn/common/ng.md b/pages.cn/common/ng.md deleted file mode 100644 index a222db758..000000000 --- a/pages.cn/common/ng.md +++ /dev/null @@ -1,35 +0,0 @@ -# ng - -> Command Line Interface (CLI) for creating and managing Angular applications. - -- Create a new Angular application inside a folder: - -`ng new {{project_name}}` - -- Add a new component to one's application: - -`ng generate component {{component_name}}` - -- Add a new class to one's application: - -`ng generate class {{class_name}}` - -- Add a new directive to one's application: - -`ng generate directive {{directive_name}}` - -- Run the application with the following command in its root directory: - -`ng serve` - -- Build the application: - -`ng build` - -- Run unit tests: - -`ng test` - -- Check the version of your current Angular installation: - -`ng version` diff --git a/pages.cn/common/nginx.md b/pages.cn/common/nginx.md deleted file mode 100644 index 9aa467c6c..000000000 --- a/pages.cn/common/nginx.md +++ /dev/null @@ -1,23 +0,0 @@ -# nginx - -> Nginx web server. - -- Start server with the default config file: - -`nginx` - -- Start server with a custom config file: - -`nginx -c {{config_file}}` - -- Start server with a prefix for all relative paths in the config file: - -`nginx -c {{config_file}} -p {{prefix/for/relative/paths}}` - -- Test the configuration without affecting the running server: - -`nginx -t` - -- Reload the configuration by sending a signal with no downtime: - -`nginx -s reload` diff --git a/pages.cn/common/ngrep.md b/pages.cn/common/ngrep.md deleted file mode 100644 index 06d474087..000000000 --- a/pages.cn/common/ngrep.md +++ /dev/null @@ -1,23 +0,0 @@ -# ngrep - -> Filter network traffic packets using regular expressions. - -- Capture traffic of all interfaces: - -`ngrep -d any` - -- Capture traffic of a specific interface: - -`ngrep -d {{eth0}}` - -- Capture traffic crossing port 22 of interface eth0: - -`ngrep -d {{eth0}} port {{22}}` - -- Capture traffic from or to a host: - -`ngrep host {{www.example.com}}` - -- Filter keyword 'User-Agent:' of interface eth0: - -`ngrep -d {{eth0}} '{{User-Agent:}}'` diff --git a/pages.cn/common/nice.md b/pages.cn/common/nice.md deleted file mode 100644 index c23226397..000000000 --- a/pages.cn/common/nice.md +++ /dev/null @@ -1,8 +0,0 @@ -# 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}}` diff --git a/pages.cn/common/nikto.md b/pages.cn/common/nikto.md deleted file mode 100644 index 15216d809..000000000 --- a/pages.cn/common/nikto.md +++ /dev/null @@ -1,23 +0,0 @@ -# nikto - -> Web server scanner which performs comprehensive tests against web servers for multiple items. - -- Perform a basic Nikto scan against a target host: - -`perl nikto.pl -h {{192.168.0.1}}` - -- Specify the port number when performing a basic scan: - -`perl nikto.pl -h {{192.168.0.1}} -p {{443}}` - -- Scan ports and protocols with full URL syntax: - -`perl nikto.pl -h {{https://192.168.0.1:443/}}` - -- Scan multiple ports in the same scanning session: - -`perl nikto.pl -h {{192.168.0.1}} -p {{80,88,443}}` - -- Update to the latest plugins and databases: - -`perl nikto.pl -update` diff --git a/pages.cn/common/nim.md b/pages.cn/common/nim.md deleted file mode 100644 index b28f3c7a3..000000000 --- a/pages.cn/common/nim.md +++ /dev/null @@ -1,24 +0,0 @@ -# nim - -> The Nim compiler. -> Processes, compiles and links Nim language source files. - -- Compile a source file: - -`nim compile {{file.nim}}` - -- Compile and run a source file: - -`nim compile -r {{file.nim}}` - -- Compile a source file with release optimizations enabled: - -`nim compile -d:release {{file.nim}}` - -- Build a release binary optimized for low file size: - -`nim compile -d:release --opt:size {{file.nim}}` - -- Generate HTML documentation for a module (output will be placed in the current directory): - -`nim doc {{file.nim}}` diff --git a/pages.cn/common/nimble.md b/pages.cn/common/nimble.md deleted file mode 100644 index 7f7c453c7..000000000 --- a/pages.cn/common/nimble.md +++ /dev/null @@ -1,28 +0,0 @@ -# nimble - -> Package manager for the Nim programming language. -> Manage Nim projects and their dependencies. - -- Search for packages: - -`nimble search {{search_string}}` - -- Install a package: - -`nimble install {{package_name}}` - -- List installed packages: - -`nimble list -i` - -- Create a new Nimble package in the current directory: - -`nimble init` - -- Build a Nimble package: - -`nimble build` - -- Install a Nimble package: - -`nimble install` diff --git a/pages.cn/common/nix-collect-garbage.md b/pages.cn/common/nix-collect-garbage.md deleted file mode 100644 index 12f169497..000000000 --- a/pages.cn/common/nix-collect-garbage.md +++ /dev/null @@ -1,16 +0,0 @@ -# nix-collect-garbage - -> Delete unused and unreachable nix store paths. -> Generations can be listed using `nix-env --list-generations`. - -- Delete all store paths unused by current generations of each profile: - -`sudo nix-collect-garbage --delete-old` - -- Simulate the deletion of old store paths: - -`sudo nix-collect-garbage --delete-old --dry-run` - -- Delete all store paths older than 30 days: - -`sudo nix-collect-garbage --delete-older-than {{30d}}` diff --git a/pages.cn/common/nix-env.md b/pages.cn/common/nix-env.md deleted file mode 100644 index 0226bfb05..000000000 --- a/pages.cn/common/nix-env.md +++ /dev/null @@ -1,27 +0,0 @@ -# nix-env - -> Manipulate or query Nix user environments. - -- Show available package with name or without name: - -`nix-env -qa {{pkg_name}}` - -- Show the status of available packages: - -`nix-env -qas` - -- Install package: - -`nix-env -i {{pkg_name}}` - -- Uninstall package: - -`nix-env -e {{pkg_name}}` - -- Upgrade one package: - -`nix-env -u {{pkg_name}}` - -- Upgrade all packages: - -`nix-env -u` diff --git a/pages.cn/common/nl.md b/pages.cn/common/nl.md deleted file mode 100644 index 761ffc1f0..000000000 --- a/pages.cn/common/nl.md +++ /dev/null @@ -1,23 +0,0 @@ -# nl - -> A utility for numbering lines, either from a file, or from standard input. - -- Number non-blank lines in a file: - -`nl {{file}}` - -- Read from standard output: - -`cat {{file}} | nl {{options}} -` - -- Number only the lines with printable text: - -`nl -t {{file}}` - -- Number all lines including blank lines: - -`nl -b a {{file}}` - -- Number only the body lines that match a basic regular expression (BRE) pattern: - -`nl -b p'FooBar[0-9]' {{file}}` diff --git a/pages.cn/common/nmap.md b/pages.cn/common/nmap.md deleted file mode 100644 index ae203e31d..000000000 --- a/pages.cn/common/nmap.md +++ /dev/null @@ -1,32 +0,0 @@ -# nmap - -> Network exploration tool and security / port scanner. -> Some features only activate when Nmap is run with privileges. - -- Try to determine whether the specified hosts are up and what are their names: - -`nmap -sn {{ip_or_hostname}} {{optional_another_address}}` - -- Like above, but also run a default 1000-port TCP scan if host seems up: - -`nmap {{ip_or_hostname}} {{optional_another_address}}` - -- Also enable scripts, service detection, OS fingerprinting and traceroute: - -`nmap -A {{address_or_addresses}}` - -- Assume good network connection and speed up execution: - -`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}}` - -- Perform TLS cipher scan against a host to determine supported ciphers and SSL/TLS protocols: - -`nmap --script ssl-enum-ciphers {{address_or_addresses}} -p 443` diff --git a/pages.cn/common/node.md b/pages.cn/common/node.md deleted file mode 100644 index efe50ee92..000000000 --- a/pages.cn/common/node.md +++ /dev/null @@ -1,15 +0,0 @@ -# node - -> Server-side JavaScript platform (Node.js). - -- Run a JavaScript file: - -`node {{file}}.js` - -- Start a REPL (interactive shell): - -`node` - -- Evaluate JavaScript by passing it in the command: - -`node -e "{{code}}"` diff --git a/pages.cn/common/nohup.md b/pages.cn/common/nohup.md deleted file mode 100644 index ac1f849cf..000000000 --- a/pages.cn/common/nohup.md +++ /dev/null @@ -1,7 +0,0 @@ -# nohup - -> Allows for a process to live when the terminal gets killed. - -- Run process that can live beyond the terminal: - -`nohup {{command options}}` diff --git a/pages.cn/common/nokogiri.md b/pages.cn/common/nokogiri.md deleted file mode 100644 index c944c742e..000000000 --- a/pages.cn/common/nokogiri.md +++ /dev/null @@ -1,23 +0,0 @@ -# nokogiri - -> An HTML, XML, SAX and Reader parser. - -- Parse the contents of a url or file: - -`nokogiri {{url|path/to/file}}` - -- Parse as a specific type: - -`nokogiri {{url|path/to/file}} --type {{xml|html}}` - -- Load a specific initialisation file before parsing: - -`nokogiri {{url|path/to/file}} -C {{path/to/config_file}}` - -- Parse using a specific encoding: - -`nokogiri {{url|path/to/file}} --encoding {{encoding}}` - -- Validate using a RELAX NG file: - -`nokogiri {{url|path/to/file}} --rng {{url|path/to/file}}` diff --git a/pages.cn/common/noti.md b/pages.cn/common/noti.md deleted file mode 100644 index cd466a84e..000000000 --- a/pages.cn/common/noti.md +++ /dev/null @@ -1,15 +0,0 @@ -# noti - -> Monitor a process and trigger a banner notification. - -- Display a notification when tar finishes compressing files: - -`noti {{tar -cjf example.tar.bz2 example/}}` - -- Display a notification even when you put it after the command to watch: - -`{{command_to_watch}}; noti` - -- Monitor a process by PID and trigger a notification when the PID disappears: - -`noti -w {{process_id}}` diff --git a/pages.cn/common/npm-check.md b/pages.cn/common/npm-check.md deleted file mode 100644 index d71d7aa78..000000000 --- a/pages.cn/common/npm-check.md +++ /dev/null @@ -1,19 +0,0 @@ -# npm-check - -> Check for outdated, incorrect, and unused npm package dependencies. - -- Display a report of outdated, incorrect, and unused dependencies: - -`npm-check` - -- Interactively update out-of-date packages: - -`npm-check --update` - -- Update everything without prompting: - -`npm-check --update-all` - -- Don't check for unused packages: - -`npm-check --skip-unused` diff --git a/pages.cn/common/npm.md b/pages.cn/common/npm.md deleted file mode 100644 index da33713c0..000000000 --- a/pages.cn/common/npm.md +++ /dev/null @@ -1,36 +0,0 @@ -# npm - -> JavaScript and Node.js package manager. -> Manage Node.js projects and their module dependencies. - -- Download and install a module globally: - -`npm install -g {{module_name}}` - -- Download all dependencies referenced in package.json: - -`npm install` - -- Download a given dependency required for the application to run, and add it to the package.json: - -`npm install {{module_name}}@{{version}} --save` - -- Download a given dependency for development purposes, and add it to the package.json: - -`npm install {{module_name}}@{{version}} --save-dev` - -- Uninstall a module: - -`npm uninstall {{module_name}}` - -- List a tree of installed modules referenced in package.json: - -`npm list` - -- List top-level globally installed modules: - -`npm list -g --depth={{0}}` - -- Interactively create a package.json file: - -`npm init` diff --git a/pages.cn/common/nproc.md b/pages.cn/common/nproc.md deleted file mode 100644 index 9cff59d08..000000000 --- a/pages.cn/common/nproc.md +++ /dev/null @@ -1,15 +0,0 @@ -# nproc - -> Print the number of processing units (normally CPUs) available. - -- Display the number of available processing units: - -`nproc` - -- Display the number of installed processing units, including any inactive ones: - -`nproc --all` - -- If possible, subtract a given number of units from the returned value: - -`nproc --ignore {{count}}` diff --git a/pages.cn/common/npx.md b/pages.cn/common/npx.md deleted file mode 100644 index 04c2a312f..000000000 --- a/pages.cn/common/npx.md +++ /dev/null @@ -1,15 +0,0 @@ -# npx - -> Execute binaries from `npm` packages. - -- Execute the binary from a given npm module: - -`npx {{module_name}}` - -- In case a package has multiple binaries, specify the package name along with the binary: - -`npx -p {{package_name}} {{module_name}}` - -- View help contents: - -`npx --help` diff --git a/pages.cn/common/nrm.md b/pages.cn/common/nrm.md deleted file mode 100644 index 53ac52912..000000000 --- a/pages.cn/common/nrm.md +++ /dev/null @@ -1,24 +0,0 @@ -# nrm - -> NPM registry manager. -> Helps to easily switch between different npm registries. - -- List all registries: - -`nrm ls` - -- Change to a particular registry: - -`nrm use {{registry}}` - -- Show the response time for all registries: - -`nrm test` - -- Add a custom registry: - -`nrm add {{registry}} {{url}}` - -- Delete a registry: - -`nrm del {{registry}}` diff --git a/pages.cn/common/nslookup.md b/pages.cn/common/nslookup.md deleted file mode 100644 index 5f5e4667b..000000000 --- a/pages.cn/common/nslookup.md +++ /dev/null @@ -1,31 +0,0 @@ -# nslookup - -> Query name server(s) for various domain records. - -- Query your system's default name server for an IP address (A record) of the domain: - -`nslookup {{example.com}}` - -- Query a given name server for a NS record of the domain: - -`nslookup -type=NS {{example.com}} {{8.8.8.8}}` - -- Query for a reverse lookup (PTR record) of an IP address: - -`nslookup -type=PTR {{54.240.162.118}}` - -- Query for ANY available records using TCP protocol: - -`nslookup -vc -type=ANY {{example.com}} ` - -- Query a given name server for the whole zone file (zone transfer) of the domain using TCP protocol: - -`nslookup -vc -type=AXFR {{example.com}} {{name_server}}` - -- Query for a mail server (MX record) of the domain, showing details of the transaction: - -`nslookup -type=MX -debug {{example.com}}` - -- Query a given name server on a specific port number for a TXT record of the domain: - -`nslookup -port={{port_number}} -type=TXT {{example.com}} {{name_server}}` diff --git a/pages.cn/common/numfmt.md b/pages.cn/common/numfmt.md deleted file mode 100644 index 50b3826ce..000000000 --- a/pages.cn/common/numfmt.md +++ /dev/null @@ -1,15 +0,0 @@ -# numfmt - -> Convert numbers to and from human-readable strings. - -- Convert 1.5K (SI Units) to 1500: - -`numfmt --from={{si}} {{1.5K}}` - -- Convert 5th field (1-indexed) to IEC Units without converting header: - -`ls -l | numfmt --header={{1}} --field={{5}} --to={{iec}}` - -- Convert to IEC units, pad with 5 characters, left aligned: - -`du -s * | numfmt --to={{iec}} --format={{"%-5f"}}` diff --git a/pages.cn/common/nvim.md b/pages.cn/common/nvim.md deleted file mode 100644 index 620b6c05f..000000000 --- a/pages.cn/common/nvim.md +++ /dev/null @@ -1,36 +0,0 @@ -# nvim - -> Neovim, a programmer's text editor based on Vim, provides several modes for different kinds of text manipulation. -> Pressing `i` enters edit mode. `` goes back to normal mode, which doesn't allow regular text insertion. - -- Open a file: - -`nvim {{file}}` - -- Enter text editing mode (insert mode): - -`i` - -- Copy ("yank") or cut ("delete") the current line (paste it with `P`): - -`{{yy|dd}}` - -- Undo the last operation: - -`u` - -- Search for a pattern in the file (press `n`/`N` to go to next/previous match): - -`/{{search_pattern}}` - -- Perform a regex substitution in the whole file: - -`:%s/{{pattern}}/{{replacement}}/g` - -- Save (write) the file, and quit: - -`:wq` - -- Quit without saving: - -`:q!` diff --git a/pages.cn/common/nvm.md b/pages.cn/common/nvm.md deleted file mode 100644 index 150e7c9c9..000000000 --- a/pages.cn/common/nvm.md +++ /dev/null @@ -1,28 +0,0 @@ -# nvm - -> Node.js version manager. -> Switch between NodeJS versions: system, node, 0.10, 0.12, 4.2 etc. - -- Install a specific version of NodeJS: - -`nvm install {{node_version}}` - -- Use a specific version NodeJS in the current shell: - -`nvm use {{node_version}}` - -- Set the default NodeJS version: - -`nvm alias default {{node_version}}` - -- List all available NodeJS versions and print the default one: - -`nvm list` - -- Run a specific version NodeJS REPL: - -`nvm run {{node_version}} --version` - -- Run app in a specific version of NodeJS: - -`nvm exec {{node_version}} node {{app.js}}` diff --git a/pages.cn/common/objdump.md b/pages.cn/common/objdump.md deleted file mode 100644 index aafbe48ec..000000000 --- a/pages.cn/common/objdump.md +++ /dev/null @@ -1,15 +0,0 @@ -# objdump - -> View information about object files. - -- Display the file header information: - -`objdump -f {{binary}}` - -- Display the dis-assembled output of executable sections: - -`objdump -d {{binary}}` - -- Display a complete binary hex dump of all sections: - -`objdump -s {{binary}}` diff --git a/pages.cn/common/od.md b/pages.cn/common/od.md deleted file mode 100644 index 63f9040dd..000000000 --- a/pages.cn/common/od.md +++ /dev/null @@ -1,28 +0,0 @@ -# od - -> Display file contents in octal, decimal or hexadecimal format. -> Optionally display the byte offsets and/or printable representation for each line. - -- Display file using default settings: octal format, 8 bytes per line, byte offsets in octal, and duplicate lines replaced with `*`: - -`od {{path/to/file}}` - -- Display file in verbose mode, i.e. without replacing duplicate lines with `*`: - -`od -v {{path/to/file}}` - -- Display file in hexadecimal format (2-byte units), with byte offsets in decimal format: - -`od --format={{x}} --address-radix={{d}} -v {{path/to/file}}` - -- Display file in hexadecimal format (1-byte units), and 4 bytes per line: - -`od --format={{x1}} --width={{4}} -v {{path/to/file}}` - -- Display file in hexadecimal format along with its character representation, and do not print byte offsets: - -`od --format={{xz}} --address-radix={{n}} -v {{path/to/file}}` - -- Read only 100 bytes of a file starting from the 500th byte: - -`od --read-bytes {{100}} --skip-bytes={{500}} -v {{path/to/file}}` diff --git a/pages.cn/common/odps-auth.md b/pages.cn/common/odps-auth.md deleted file mode 100644 index 433ccbeb2..000000000 --- a/pages.cn/common/odps-auth.md +++ /dev/null @@ -1,31 +0,0 @@ -# odps auth - -> User authorities in ODPS (Open Data Processing Service). - -- Add a user to the current project: - -`add user {{user_name}};` - -- Grant a set of authorities to a user: - -`grant {{action_list}} on {{object_type}} {{object_name}} to user {{user_name}};` - -- Show authorities of a user: - -`show grants for {{user_name}};` - -- Create a user role: - -`create role {{role_name}};` - -- Grant a set of authorities to a role: - -`grant {{action_list}} on {{object_type}} {{object_name}} to role {{role_name}};` - -- Describe authorities of a role: - -`desc role {{role_name}};` - -- Grant a role to a user: - -`grant {{role_name}} to {{user_name}};` diff --git a/pages.cn/common/odps-func.md b/pages.cn/common/odps-func.md deleted file mode 100644 index 3bbd78a24..000000000 --- a/pages.cn/common/odps-func.md +++ /dev/null @@ -1,19 +0,0 @@ -# odps func - -> Manage functions in ODPS (Open Data Processing Service). - -- Show functions in the current project: - -`list functions;` - -- Create a Java function using a .jar resource: - -`create function {{func_name}} as {{path.to.package.Func}} using '{{package.jar}}';` - -- Create a Python function using a .py resource: - -`create function {{func_name}} as {{script.Func}} using '{{script.py}}';` - -- Delete a function: - -`drop function {{func_name}};` diff --git a/pages.cn/common/odps-inst.md b/pages.cn/common/odps-inst.md deleted file mode 100644 index e916523aa..000000000 --- a/pages.cn/common/odps-inst.md +++ /dev/null @@ -1,23 +0,0 @@ -# odps inst - -> Manage instances in ODPS (Open Data Processing Service). - -- Show instances created by current user: - -`show instances;` - -- Describe the details of an instance: - -`desc instance {{instance_id}};` - -- Check the status of an instance: - -`status {{instance_id}};` - -- Wait on the termination of an instance, printing log and progress information until then: - -`wait {{instance_id}};` - -- Kill an instance: - -`kill {{instance_id}};` diff --git a/pages.cn/common/odps-resource.md b/pages.cn/common/odps-resource.md deleted file mode 100644 index 7101737b0..000000000 --- a/pages.cn/common/odps-resource.md +++ /dev/null @@ -1,27 +0,0 @@ -# odps resource - -> Manage resources in ODPS (Open Data Processing Service). - -- Show resources in the current project: - -`list resources;` - -- Add file resource: - -`add file {{file_name}} as {{alias}};` - -- Add archive resource: - -`add archive {{archive.tar.gz}} as {{alias}};` - -- Add .jar resource: - -`add jar {{package.jar}};` - -- Add .py resource: - -`add py {{script.py}};` - -- Delete resource: - -`drop resource {{resource_name}};` diff --git a/pages.cn/common/odps-table.md b/pages.cn/common/odps-table.md deleted file mode 100644 index 19bfcb466..000000000 --- a/pages.cn/common/odps-table.md +++ /dev/null @@ -1,23 +0,0 @@ -# odps table - -> Create and modify tables in ODPS (Open Data Processing Service). - -- Create a table with partition and lifecycle: - -`create table {{table_name}} ({{col}} {{type}}) partitioned by ({{col}} {{type}}) lifecycle {{days}};` - -- Create a table based on the definition of another table: - -`create table {{table_name}} like {{another_table}};` - -- Add partition to a table: - -`alter table {{table_name}} add partition ({{partition_spec}});` - -- Delete partition from a table: - -`alter table {{table_name}} drop partition ({{partition_spec}});` - -- Delete table: - -`drop table {{table_name}};` diff --git a/pages.cn/common/odps-tunnel.md b/pages.cn/common/odps-tunnel.md deleted file mode 100644 index a53537aeb..000000000 --- a/pages.cn/common/odps-tunnel.md +++ /dev/null @@ -1,19 +0,0 @@ -# odps tunnel - -> Data tunnel in ODPS (Open Data Processing Service). - -- Download table to local file: - -`tunnel download {{table_name}} {{file}};` - -- Upload local file to a table partition: - -`tunnel upload {{file}} {{table_name}}/{{partition_spec}};` - -- Upload table specifying field and record delimiters: - -`tunnel upload {{file}} {{table_name}} -fd {{field_delim}} -rd {{record_delim}};` - -- Upload table using multiple threads: - -`tunnel upload {{file}} {{table_name}} -threads {{num}};` diff --git a/pages.cn/common/odps.md b/pages.cn/common/odps.md deleted file mode 100644 index 2e67a936d..000000000 --- a/pages.cn/common/odps.md +++ /dev/null @@ -1,27 +0,0 @@ -# odps - -> Aliyun ODPS (Open Data Processing Service) command line tool. - -- Start the command line with a custom configuration file: - -`odpscmd --config={{odps_config.ini}}` - -- Switch current project: - -`use {{project_name}};` - -- Show tables in the current project: - -`show tables;` - -- Describe a table: - -`desc {{table_name}};` - -- Show table partitions: - -`show partitions {{table_name}};` - -- Describe a partition: - -`desc {{table_name}} partition ({{partition_spec}});` diff --git a/pages.cn/common/omf.md b/pages.cn/common/omf.md deleted file mode 100644 index 48f63a89b..000000000 --- a/pages.cn/common/omf.md +++ /dev/null @@ -1,28 +0,0 @@ -# omf - -> Oh My Fish, the Fishshell Framework. -> Install packages to extend and modify the fish shell. - -- Install one or more packages: - -`omf install {{name}}` - -- List installed packages: - -`omf list` - -- List available themes: - -`omf theme` - -- Apply a theme: - -`omf theme {{name}}` - -- Remove a theme or package: - -`omf remove {{name}}` - -- Uninstall Oh My Fish: - -`omf destroy` diff --git a/pages.cn/common/openssl.md b/pages.cn/common/openssl.md deleted file mode 100644 index ff49782f5..000000000 --- a/pages.cn/common/openssl.md +++ /dev/null @@ -1,31 +0,0 @@ -# openssl - -> OpenSSL cryptographic toolkit. - -- Generate a 2048bit RSA private key and save it to a file: - -`openssl genrsa -out {{filename.key}} 2048` - -- Generate a certificate signing request to be sent to a certificate authority: - -`openssl req -new -sha256 -key {{filename.key}} -out {{filename.csr}}` - -- Generate a self-signed certificate from a certificate signing request valid for some number of days: - -`openssl x509 -req -days {{days}} -in {{filename.csr}} -signkey {{filename.key}} -out {{filename.crt}}` - -- Display certificate information: - -`openssl x509 -in {{filename.crt}} -noout -text` - -- Display the start and expiry dates for a domain's certificate: - -`openssl s_client -connect {{host}}:{{port}} 2>/dev/null | openssl x509 -noout -dates` - -- Display the certificate presented by an SSL/TLS server: - -`openssl s_client -connect {{host}}:{{port}} A tool that takes LLVM source files and runs specified optimizations and/or analyses on them. - -- Run an optimization or analysis on a bitcode file: - -`opt -{{passname}} {{path/to/file.bc}} -S -o {{file_opt.bc}}` - -- Output the Control Flow Graph of a function to a "dot" file: - -`opt {{-dot-cfg}} -S {{path/to/file.bc}} -disable-output` - -- Optimize the program at level 2 and output the result to another file: - -`opt -O2 {{path/to/file.bc}} -S -o {{path/to/output_file.bc}}` diff --git a/pages.cn/common/optipng.md b/pages.cn/common/optipng.md deleted file mode 100644 index f482e5740..000000000 --- a/pages.cn/common/optipng.md +++ /dev/null @@ -1,27 +0,0 @@ -# optipng - -> PNG image file optimization utility. - -- Compress a PNG with default settings: - -`optipng {{path/to/file.png}}` - -- Compress a PNG with best compression: - -`optipng -o{{7}} {{path/to/file.png}}` - -- Compress a PNG with fastest compression: - -`optipng -o{{0}} {{path/to/file.png}}` - -- Compress a PNG and add interlacing: - -`optipng -i {{1}} {{path/to/file.png}}` - -- Compress a PNG and preserve all metadata (including file timestamps): - -`optipng -preserve {{path/to/file.png}}` - -- Compress a PNG and remove all metadata: - -`optipng -strip all {{path/to/file.png}}` diff --git a/pages.cn/common/p4.md b/pages.cn/common/p4.md deleted file mode 100644 index 56e24fd77..000000000 --- a/pages.cn/common/p4.md +++ /dev/null @@ -1,35 +0,0 @@ -# p4 - -> Perforce Version Control System. - -- Log in to the Perforce service: - -`p4 login -a` - -- Create a client: - -`p4 client` - -- Copy files from depot into the client workspace: - -`p4 sync` - -- Create or edit changelist description: - -`p4 change` - -- Open a file to edit: - -`p4 edit -c {{changelist_number}} {{file_name}}` - -- Open a new file to add it to the depot: - -`p4 add` - -- Display list of files modified by changelist: - -`p4 describe -c {{changelist_number}}` - -- Submit a changelist to the depot: - -`p4 submit -c {{changelist_number}}` diff --git a/pages.cn/common/p5.md b/pages.cn/common/p5.md deleted file mode 100644 index 380d5ba56..000000000 --- a/pages.cn/common/p5.md +++ /dev/null @@ -1,19 +0,0 @@ -# p5 - -> P5js template builder and sketch manager. - -- Create a new p5 collection: - -`p5 new {{collection_name}}` - -- Generate a new p5 project (should be run from collection directory): - -`p5 generate {{project_name}}` - -- Run the p5 manager server: - -`p5 server` - -- Update libraries to their latest versions: - -`p5 update` diff --git a/pages.cn/common/paci.md b/pages.cn/common/paci.md deleted file mode 100644 index 3a685aa14..000000000 --- a/pages.cn/common/paci.md +++ /dev/null @@ -1,23 +0,0 @@ -# paci - -> A lightweight and flexible package manager for bash scripts. - -- Update the list of available packages and versions (it's recommended to run this before other `paci` commands): - -`paci refresh` - -- Configure its behaviour: - -`paci configure` - -- Search for a given package: - -`paci search {{package}}` - -- Install a package: - -`paci install {{package}}` - -- Update a package: - -`paci update {{package}}` diff --git a/pages.cn/common/pandoc.md b/pages.cn/common/pandoc.md deleted file mode 100644 index a5fdaca14..000000000 --- a/pages.cn/common/pandoc.md +++ /dev/null @@ -1,23 +0,0 @@ -# pandoc - -> Convert documents between various formats. - -- Convert file to pdf (the output format is determined by file extension): - -`pandoc {{input.md}} -o {{output.pdf}}` - -- Force conversion to use a specific format: - -`pandoc {{input.docx}} --to {{markdown_github}} -o {{output.md}}` - -- Convert to a standalone file with the appropriate headers/footers (for LaTeX, HTML, etc.): - -`pandoc {{input.md}} -s -o {{output.tex}}` - -- List all supported input formats: - -`pandoc --list-input-formats` - -- List all supported output formats: - -`pandoc --list-output-formats` diff --git a/pages.cn/common/parallel.md b/pages.cn/common/parallel.md deleted file mode 100644 index c4ac66aa2..000000000 --- a/pages.cn/common/parallel.md +++ /dev/null @@ -1,27 +0,0 @@ -# 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 {{big_file.txt}} | parallel --pipe --block 1M {{command}}` - -- Run on multiple machines via SSH: - -`parallel -S {{machine1}},{{machine2}} {{command}} ::: {{arg1}} {{arg2}}` diff --git a/pages.cn/common/pass.md b/pages.cn/common/pass.md deleted file mode 100644 index 4e7c5a8cc..000000000 --- a/pages.cn/common/pass.md +++ /dev/null @@ -1,28 +0,0 @@ -# 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}}` diff --git a/pages.cn/common/passwd.md b/pages.cn/common/passwd.md deleted file mode 100644 index 1e980b8a8..000000000 --- a/pages.cn/common/passwd.md +++ /dev/null @@ -1,19 +0,0 @@ -# passwd - -> Passwd is a tool used to change a user's password. - -- Change the password of the current user: - -`passwd {{new_password}}` - -- Change the password of the specified user: - -`passwd {{username}} {{new_password}}` - -- Get the current status of the user: - -`passwd -S` - -- Make the password of the account blank (it will set the named account passwordless): - -`passwd -d` diff --git a/pages.cn/common/paste.md b/pages.cn/common/paste.md deleted file mode 100644 index 454ba2a6f..000000000 --- a/pages.cn/common/paste.md +++ /dev/null @@ -1,23 +0,0 @@ -# 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}}` diff --git a/pages.cn/common/patch.md b/pages.cn/common/patch.md deleted file mode 100644 index 44260c4b7..000000000 --- a/pages.cn/common/patch.md +++ /dev/null @@ -1,16 +0,0 @@ -# patch - -> Patch a file (or files) with a diff file. -> Note that diff files contain both the target filenames and list of changes. - -- Apply a patch: - -`patch < {{patch_file}}.diff` - -- Apply a patch to current directory: - -`patch -p1 < {{patch_file}}.diff` - -- Apply the reverse of a patch: - -`patch -R < {{patch_file}}.diff` diff --git a/pages.cn/common/pdfjoin.md b/pages.cn/common/pdfjoin.md deleted file mode 100644 index ad0e3081a..000000000 --- a/pages.cn/common/pdfjoin.md +++ /dev/null @@ -1,15 +0,0 @@ -# pdfjoin - -> PDF merging utility. - -- Merge two PDFs: - -`pdfjoin {{file1}} {{file2}} --outfile {{output_file}}` - -- Save pages 3 to 5 followed by page 1 to a new PDF: - -`pdfjoin {{file 3-5,1}} --outfile {{output_file}}` - -- Merge subranges from two PDFs: - -`pdfjoin {{file1 3-5,1}} {{file2 4-6}} --outfile {{output_file}}` diff --git a/pages.cn/common/pdflatex.md b/pages.cn/common/pdflatex.md deleted file mode 100644 index ebc195c27..000000000 --- a/pages.cn/common/pdflatex.md +++ /dev/null @@ -1,11 +0,0 @@ -# pdflatex - -> Compile a pdf document from LaTeX source files. - -- Compile a pdf document: - -`pdflatex {{source.tex}}` - -- Compile a pdf document, halting on each error: - -`pdflatex -halt-on-error {{source.tex}}` diff --git a/pages.cn/common/pdfposter.md b/pages.cn/common/pdfposter.md deleted file mode 100644 index ec8ef9d2f..000000000 --- a/pages.cn/common/pdfposter.md +++ /dev/null @@ -1,11 +0,0 @@ -# pdfposter - -> Convert a large-sheeted pdf into multiple A4 pages for printing. - -- Convert an A2 poster into 4 A4 pages: - -`pdfposter --poster-size a2 {{input_file.pdf}} {{output_file.pdf}}` - -- Scale an A4 poster to A3 and then generate 2 A4 pages: - -`pdfposter --scale 2 {{input_file.pdf}} {{output_file.pdf}}` diff --git a/pages.cn/common/pdftk.md b/pages.cn/common/pdftk.md deleted file mode 100644 index 8bfd90d19..000000000 --- a/pages.cn/common/pdftk.md +++ /dev/null @@ -1,23 +0,0 @@ -# pdftk - -> PDF toolkit. - -- Extract pages 1-3, 5 and 6-10 from a PDF file and save them as another one: - -`pdftk {{input.pdf}} cat {{1-3 5 6-10}} output {{output.pdf}}` - -- Merge (concatenate) a list of PDF files and save the result as another one: - -`pdftk {{file1.pdf}} {{file2.pdf}} ... cat output {{output.pdf}}` - -- Split each page of a PDF file into a separate file, with a given filename output pattern: - -`pdftk {{input.pdf}} burst output {{out_%d.pdf}}` - -- Rotate all pages by 180 degrees clockwise: - -`pdftk {{input.pdf}} cat {{1-endsouth}} output {{output.pdf}}` - -- Rotate third page by 90 degrees clockwise and leave others unchanged: - -`pdftk {{input.pdf}} cat {{1-2 3east 4-end}} output {{output.pdf}}` diff --git a/pages.cn/common/pdftotext.md b/pages.cn/common/pdftotext.md deleted file mode 100644 index 6bf3b1eb6..000000000 --- a/pages.cn/common/pdftotext.md +++ /dev/null @@ -1,19 +0,0 @@ -# pdftotext - -> Convert PDF files to plain text format. - -- Convert filename.pdf to plain text and print it to standard output: - -`pdftotext {{filename.pdf}} -` - -- Convert filename.pdf to plain text and save it as filename.txt: - -`pdftotext {{filename.pdf}}` - -- Convert input.pdf to plain text and save it as output.txt: - -`pdftotext {{input.pdf}} {{output.txt}}` - -- Convert pages 2, 3 and 4 of input.pdf to plain text and save them as output.txt: - -`pdftotext -f {{2}} -l {{4}} {{input.pdf}} {{output.txt}}` diff --git a/pages.cn/common/pdfunite.md b/pages.cn/common/pdfunite.md deleted file mode 100644 index 53cba201e..000000000 --- a/pages.cn/common/pdfunite.md +++ /dev/null @@ -1,11 +0,0 @@ -# pdfunite - -> PDF merging utility. - -- Merge 2 PDFs into a single PDF: - -`pdfunite {{path/to/fileA.pdf}} {{path/to/fileB.pdf}} {{path/to/merged_output.pdf}}` - -- Merge a folder of PDFs into a single PDF: - -`pdfunite {{path/to/directory/*.pdf}} {{path/to/merged_output.pdf}}` diff --git a/pages.cn/common/peerflix.md b/pages.cn/common/peerflix.md deleted file mode 100644 index cad33fa81..000000000 --- a/pages.cn/common/peerflix.md +++ /dev/null @@ -1,23 +0,0 @@ -# peerflix - -> Stream video- or audio-based torrents to a media player. - -- Stream the largest media file in a torrent: - -`peerflix "{{torrent_url|magnet_link}}"` - -- List all streamable files contained in a torrent (given as a magnet link): - -`peerflix "{{magnet:?xt=urn:btih:0123456789abcdef0123456789abcdef01234567}}" --list` - -- Stream the largest file in a torrent, given as a torrent URL, to VLC: - -`peerflix "{{http://example.net/music.torrent}}" --vlc` - -- Stream the largest file in a torrent to MPlayer, with subtitles: - -`peerflix "{{torrent_url|magnet_link}}" --mplayer --subtitles {{subtitle-file.srt}}` - -- Stream all files from a torrent to Airplay: - -`peerflix "{{torrent_url|magnet_link}}" --all --airplay` diff --git a/pages.cn/common/perl.md b/pages.cn/common/perl.md deleted file mode 100644 index fc5e6b51e..000000000 --- a/pages.cn/common/perl.md +++ /dev/null @@ -1,31 +0,0 @@ -# perl - -> The Perl 5 language interpreter. - -- Parse and execute a Perl script: - -`perl {{script.pl}}` - -- Check syntax errors on a Perl script: - -`perl -c {{script.pl}}` - -- Parse and execute a perl statement: - -`perl -e {{perl_statement}}` - -- Run a Perl script in debug mode, using `perldebug`: - -`perl -d {{script.pl}}` - -- Loo[p] over all lines of a file, editing them [i]n-place using a find/replace [e]xpression: - -`perl -p -i -e 's/{{find}}/{{replace}}/g' {{filename}}` - -- Run a find/replace expression on a file, saving the original file with a given extension: - -`perl -p -i'.old' -e 's/{{find}}/{{replace}}/g' {{filename}}` - -- Run a multi-line find/replace expression on a file, and save the result in another file: - -`perl -p0e 's/{{foo\nbar}}/{{foobar}}/g' {{input_file}} > {{output_file}}` diff --git a/pages.cn/common/pg_ctl.md b/pages.cn/common/pg_ctl.md deleted file mode 100644 index 1d8ea3f27..000000000 --- a/pages.cn/common/pg_ctl.md +++ /dev/null @@ -1,19 +0,0 @@ -# pg_ctl - -> Utility for controlling a PostgreSQL server and database cluster. - -- Start a PostgreSQL server: - -`pg_ctl -D {{data_directory}} -l {{log_file_name}}` - -- Initialize a PostgreSQL database cluster: - -`pg_ctl -D {{data_directory}} init` - -- Stop a PostgreSQL server: - -`pg_ctl -D {{data_directory}} stop` - -- Restart a PostgreSQL server: - -`pg_ctl -D {{data_directory}} restart` diff --git a/pages.cn/common/pg_dump.md b/pages.cn/common/pg_dump.md deleted file mode 100644 index 6afd1fa34..000000000 --- a/pages.cn/common/pg_dump.md +++ /dev/null @@ -1,19 +0,0 @@ -# pg_dump - -> Extract a PostgreSQL database into a script file or other archive file. - -- Dump database into a SQL-script file: - -`pg_dump {{db_name}} > {{output_file.sql}}` - -- Same as above, customize username: - -`pg_dump -U {{username}} {{db_name}} > {{output_file.sql}}` - -- Same as above, customize host and port: - -`pg_dump -h {{host}} -p {{port}} {{db_name}} > {{output_file.sql}}` - -- Dump a database into a custom-format archive file: - -`pg_dump -Fc {{db_name}} > {{output_file.dump}}` diff --git a/pages.cn/common/pg_restore.md b/pages.cn/common/pg_restore.md deleted file mode 100644 index 321c43c26..000000000 --- a/pages.cn/common/pg_restore.md +++ /dev/null @@ -1,23 +0,0 @@ -# pg_restore - -> Restore a PostgreSQL database from an archive file created by pg_dump. - -- Restore an archive into an existing database: - -`pg_restore -d {{db_name}} {{archive_file.dump}}` - -- Same as above, customize username: - -`pg_restore -U {{username}} -d {{db_name}} {{archive_file.dump}}` - -- Same as above, customize host and port: - -`pg_restore -h {{host}} -p {{port}} -d {{db_name}} {{archive_file.dump}}` - -- Clean database objects before creating them: - -`pg_restore --clean -d {{db_name}} {{archive_file.dump}}` - -- Use multiple jobs to do the restoring: - -`pg_restore -j {{2}} -d {{db_name}} {{archive_file.dump}}` diff --git a/pages.cn/common/pgrep.md b/pages.cn/common/pgrep.md deleted file mode 100644 index 1f5221736..000000000 --- a/pages.cn/common/pgrep.md +++ /dev/null @@ -1,15 +0,0 @@ -# pgrep - -> Find or signal process by name. - -- Return PIDs of any running processes with a matching command string: - -`pgrep {{process_name}}` - -- Search full command line with parameters instead of just the process name: - -`pgrep -f "{{process_name}} {{parameter}}"` - -- Search for process run by a specific user: - -`pgrep -u root {{process_name}}` diff --git a/pages.cn/common/phing.md b/pages.cn/common/phing.md deleted file mode 100644 index d90e6ef5a..000000000 --- a/pages.cn/common/phing.md +++ /dev/null @@ -1,35 +0,0 @@ -# phing - -> A PHP build tool based on Apache Ant. - -- Perform the default task in the "build.xml" file: - -`phing` - -- Initialise a new build file: - -`phing -i {{path/to/build.xml}}` - -- Perform a specific task: - -`phing {{task_name}}` - -- Specify a custom build file path: - -`phing -f {{path/to/build.xml}} {{task_name}}` - -- Specify a log file to output to: - -`phing -b {{path/to/log_file}} {{task_name}}` - -- Specify custom properties to use in the build: - -`phing -D{{property}}={{value}} {{task_name}}` - -- Specify a custom listener class: - -`phing -listener {{class_name}} {{task_name}}` - -- Build using verbose output: - -`phing -verbose {{task_name}}` diff --git a/pages.cn/common/phive.md b/pages.cn/common/phive.md deleted file mode 100644 index a195f1deb..000000000 --- a/pages.cn/common/phive.md +++ /dev/null @@ -1,35 +0,0 @@ -# phive - -> The Phar Installation and Verification Environment for secure PHP application deployment. - -- Display a list of available aliased Phars: - -`phive list` - -- Install a specified Phar to the local directory: - -`phive install {{alias|url}}` - -- Install a specified Phar globally: - -`phive install {{alias|url}} --global` - -- Install a specified Phar to a target directory: - -`phive install {{alias|url}} --target {{path/to/directory}}` - -- Update all Phar files to the latest version: - -`phive update` - -- Remove a specified Phar file: - -`phive remove {{alias|url}}` - -- Remove unused Phar files: - -`phive purge` - -- List all available commands: - -`phive help` diff --git a/pages.cn/common/php-artisan.md b/pages.cn/common/php-artisan.md deleted file mode 100644 index f81a751e0..000000000 --- a/pages.cn/common/php-artisan.md +++ /dev/null @@ -1,19 +0,0 @@ -# php artisan - -> Laravel's Artisan command line interface. - -- Start PHP's built-in web server for the current Laravel application: - -`php artisan serve` - -- Start an interactive PHP command line interface: - -`php artisan tinker` - -- Generate a new Eloquent model class with a migration, factory and resource controller: - -`php artisan make:model {{ModelName}} --all` - -- Display a list of all available commands: - -`php artisan help` diff --git a/pages.cn/common/php-yii.md b/pages.cn/common/php-yii.md deleted file mode 100644 index cca4c84d8..000000000 --- a/pages.cn/common/php-yii.md +++ /dev/null @@ -1,15 +0,0 @@ -# php yii - -> Yii Framework's command line interface. - -- Display a list of all available commands: - -`php yii {{help}}` - -- Start PHP's built-in web server for the current Yii application: - -`php yii {{serve}}` - -- Generate a controller, views and related files for the CRUD actions on the specified model class: - -`php yii {{gii/crud}} --modelClass={{ModelName}} --controllerClass={{ControllerName}}` diff --git a/pages.cn/common/php.md b/pages.cn/common/php.md deleted file mode 100644 index a8822bf6c..000000000 --- a/pages.cn/common/php.md +++ /dev/null @@ -1,23 +0,0 @@ -# php - -> PHP command line interface. - -- Parse and execute a php script: - -`php {{file}}` - -- Check syntax on (i.e. lint) a PHP script: - -`php -l {{file}}` - -- Run PHP interactively: - -`php -a` - -- Run PHP code (Notes: Don't use tags; escape double quotes with backslash): - -`php -r "{{code}}"` - -- Start a PHP built-in web server in the current directory: - -`php -S {{host:port}}` diff --git a/pages.cn/common/phpcpd.md b/pages.cn/common/phpcpd.md deleted file mode 100644 index 45779d823..000000000 --- a/pages.cn/common/phpcpd.md +++ /dev/null @@ -1,27 +0,0 @@ -# phpcpd - -> A copy and paste detector for PHP code. - -- Analyse duplicated code for a specific file or directory: - -`phpcpd {{path/to/file_or_directory}}` - -- Analyse using fuzzy matching for variable names: - -`phpcpd --fuzzy {{path/to/file_or_directory}}` - -- Specify a minimum number of identical lines (defaults to 5): - -`phpcpd --min-lines {{number_of_lines}} {{path/to/file_or_directory}}` - -- Specify a minimum number of identical tokens (defaults to 70): - -`phpcpd --min-tokens {{number_of_tokens}} {{path/to/file_or_directory}}` - -- Exclude a directory from analysis (must be relative to the source): - -`phpcpd --exclude {{path/to/excluded_directory}} {{path/to/file_or_directory}}` - -- Output the results to a PHP-CPD XML file: - -`phpcpd --log-pmd {{path/to/log_file}} {{path/to/file_or_directory}}` diff --git a/pages.cn/common/phpcs.md b/pages.cn/common/phpcs.md deleted file mode 100644 index e18aded99..000000000 --- a/pages.cn/common/phpcs.md +++ /dev/null @@ -1,35 +0,0 @@ -# phpcs - -> Tokenize PHP, JavaScript and CSS files to detect violations of a defined set of coding standards. - -- Sniff the specified directory for issues (defaults to the PEAR standard): - -`phpcs {{path/to/directory}}` - -- Display a list of installed coding standards: - -`phpcs -i` - -- Specify a coding standard to validate against: - -`phpcs {{path/to/directory}} --standard {{standard}}` - -- Specify file extension(s) to include when sniffing: - -`phpcs {{path/to/directory}} --extensions {{file_extension(s)}}` - -- Specify the format of the output report (e.g. `full`, `xml`, `json`, `summary`): - -`phpcs {{path/to/directory}} --report {{format}}` - -- Set config variables to be used during the process: - -`phpcs {{path/to/directory}} --config-set {{key}} {{value}}` - -- A comma-separated list of files to load before processing: - -`phpcs {{path/to/directory}} --bootstrap {{file(s)}}` - -- Don't recurse into subdirectories: - -`phpcs {{path/to/directory}} -l` diff --git a/pages.cn/common/phpize.md b/pages.cn/common/phpize.md deleted file mode 100644 index e76570167..000000000 --- a/pages.cn/common/phpize.md +++ /dev/null @@ -1,11 +0,0 @@ -# phpize - -> Prepare a PHP extension for compiling. - -- Prepare the PHP extension in the current directory for compiling: - -`phpize` - -- Delete files previously created by phpize: - -`phpize --clean` diff --git a/pages.cn/common/phploc.md b/pages.cn/common/phploc.md deleted file mode 100644 index ec2095187..000000000 --- a/pages.cn/common/phploc.md +++ /dev/null @@ -1,31 +0,0 @@ -# phploc - -> A tool for quickly measuring the size and analyzing the structure of a PHP project. - -- Analyse a directory and print the result: - -`phploc {{path/to/directory}}` - -- Include only specific files from a comma-separated list (globs are allowed): - -`phploc {{path/to/directory}} --names {{files}}` - -- Exclude specific files from a comma-separated list (globs are allowed): - -`phploc {{path/to/directory}} --names-exclude {{files}}` - -- Exclude a specific directory from analysis: - -`phploc {{path/to/directory}} --exclude {{path/to/exclude_directory}}` - -- Log the results to a specific CSV file: - -`phploc {{path/to/directory}} --log-csv {{path/to/file}}` - -- Log the results to a specific XML file: - -`phploc {{path/to/directory}} --log-xml {{path/to/file}}` - -- Count PHPUnit test case classes and test methods: - -`phploc {{path/to/directory}} --count-tests` diff --git a/pages.cn/common/phpmd.md b/pages.cn/common/phpmd.md deleted file mode 100644 index b6365e8f2..000000000 --- a/pages.cn/common/phpmd.md +++ /dev/null @@ -1,31 +0,0 @@ -# phpmd - -> A PHP mess detector that checks for common potential problems. - -- Display a list of available rulesets and formats: - -`phpmd` - -- Scan a file or directory for problems using comma-separated rulesets: - -`phpmd {{path/to/file_or_directory}} {{xml|text|html}} {{rulesets}}` - -- Specify the minimum priority threshold for rules: - -`phpmd {{path/to/file_or_directory}} {{xml|text|html}} {{rulesets}} --minimumpriority {{priority}}` - -- Include only the specified extensions in analysis: - -`phpmd {{path/to/file_or_directory}} {{xml|text|html}} {{rulesets}} --suffixes {{extensions}}` - -- Exclude the specified comma-separated directories: - -`phpmd {{path/to/file_or_directory}} {{xml|text|html}} {{rulesets}} --exclude {{directory_patterns}}` - -- Output the results to a file instead of stdout: - -`phpmd {{path/to/file_or_directory}} {{xml|text|html}} {{rulesets}} --reportfile {{path/to/report_file}}` - -- Ignore the use of warning-suppressive PHPDoc comments: - -`phpmd {{path/to/file_or_directory}} {{xml|text|html}} {{rulesets}} --strict` diff --git a/pages.cn/common/phpstan.md b/pages.cn/common/phpstan.md deleted file mode 100644 index ad16dfb9e..000000000 --- a/pages.cn/common/phpstan.md +++ /dev/null @@ -1,27 +0,0 @@ -# phpstan - -> A PHP static analysis tool to discover bugs in code. - -- Display available options for analysis: - -`phpstan analyse --help` - -- Analyse the specified space-separated directories: - -`phpstan analyse {{path/to/directory}}` - -- Analyse a directory using a configuration file: - -`phpstan analyse {{path/to/directory}} --configuration {{path/to/config}}` - -- Analyse using a specific rule level (0-7, higher is stricter): - -`phpstan analyse {{path/to/directory}} --level {{level}}` - -- Specify an autoload file to load before analysing: - -`phpstan analyse {{path/to/directory}} --autoload-file {{path/to/autoload_file}}` - -- Specify a memory limit during analysis: - -`phpstan analyse {{path/to/directory}} --memory-limit {{memory_limit}}` diff --git a/pages.cn/common/phpunit.md b/pages.cn/common/phpunit.md deleted file mode 100644 index f72df979a..000000000 --- a/pages.cn/common/phpunit.md +++ /dev/null @@ -1,19 +0,0 @@ -# phpunit - -> PHPUnit command-line test runner. - -- Run tests in the current directory. 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}}` diff --git a/pages.cn/common/picard.md b/pages.cn/common/picard.md deleted file mode 100644 index 26807a844..000000000 --- a/pages.cn/common/picard.md +++ /dev/null @@ -1,15 +0,0 @@ -# picard - -> Next generation MusicBrainz tagging application. - -- Start Picard: - -`picard` - -- Open a set of files: - -`picard {{path/to/file1.mp3}} {{path/to/file2.mp3}}` - -- Display the version of Picard installed: - -`picard --long-version` diff --git a/pages.cn/common/pigz.md b/pages.cn/common/pigz.md deleted file mode 100644 index 91546501d..000000000 --- a/pages.cn/common/pigz.md +++ /dev/null @@ -1,23 +0,0 @@ -# pigz - -> Multithreaded zlib compression utility. - -- Compress a file with default options: - -`pigz {{filename}}` - -- Compress a file using the best compression method: - -`pigz -9 {{filename}}` - -- Compress a file using no compression and 4 processors: - -`pigz -0 -p{{4}} {{filename}}` - -- Decompress a file: - -`pigz -d {{archive.gz}}` - -- List the contents of an archive: - -`pigz -l {{archive.tar.gz}}` diff --git a/pages.cn/common/ping.md b/pages.cn/common/ping.md deleted file mode 100644 index 1b72e6f30..000000000 --- a/pages.cn/common/ping.md +++ /dev/null @@ -1,27 +0,0 @@ -# ping - -> Send ICMP ECHO_REQUEST packets to network hosts. - -- Ping host: - -`ping {{host}}` - -- Ping a host only a specific number of times: - -`ping -c {{count}} {{host}}` - -- Ping host, specifying the interval in seconds between requests (default is 1 second): - -`ping -i {{seconds}} {{host}}` - -- Ping host without trying to lookup symbolic names for addresses: - -`ping -n {{host}}` - -- Ping host and ring the bell when a packet is received (if your terminal supports it): - -`ping -a {{host}}` - -- Also display a message if no response was received: - -`ping -O {{host}}` diff --git a/pages.cn/common/ping6.md b/pages.cn/common/ping6.md deleted file mode 100644 index 26280c9aa..000000000 --- a/pages.cn/common/ping6.md +++ /dev/null @@ -1,23 +0,0 @@ -# ping6 - -> Send ICMP ECHO_REQUEST packets to network hosts via IPv6 address. - -- Ping a host: - -`ping6 {{host}}` - -- Ping a host only a specific number of times: - -`ping6 -c {{count}} {{host}}` - -- Ping a host, specifying the interval in seconds between requests (default is 1 second): - -`ping6 -i {{seconds}} {{host}}` - -- Ping a host without trying to lookup symbolic names for addresses: - -`ping6 -n {{host}}` - -- Ping a host and ring the bell when a packet is received (if your terminal supports it): - -`ping6 -a {{host}}` diff --git a/pages.cn/common/pinky.md b/pages.cn/common/pinky.md deleted file mode 100644 index 6e047f2e3..000000000 --- a/pages.cn/common/pinky.md +++ /dev/null @@ -1,27 +0,0 @@ -# pinky - -> Print user information using the `finger` protocol. - -- Display details about the current user: - -`pinky` - -- Display details for a specific user: - -`pinky {{user}}` - -- Display details in the long format: - -`pinky {{user}} -l` - -- Omit the user's home directory and shell in long format: - -`pinky {{user}} -lb` - -- Omit the user's project file in long format: - -`pinky {{user}} -lh` - -- Omit the column headings in short format: - -`pinky {{user}} -f` diff --git a/pages.cn/common/pip.md b/pages.cn/common/pip.md deleted file mode 100644 index 341530c66..000000000 --- a/pages.cn/common/pip.md +++ /dev/null @@ -1,27 +0,0 @@ -# pip - -> Python package manager. - -- Install a package: - -`pip install {{package_name}}` - -- Install a specific version of a package: - -`pip install {{package_name}}=={{package_version}}` - -- Upgrade a package: - -`pip install -U {{package_name}}` - -- Uninstall a package: - -`pip uninstall {{package_name}}` - -- Save installed packages to file: - -`pip freeze > {{requirements.txt}}` - -- Install packages from file: - -`pip install -r {{requirements.txt}}` diff --git a/pages.cn/common/pipenv.md b/pages.cn/common/pipenv.md deleted file mode 100644 index c59e8b36f..000000000 --- a/pages.cn/common/pipenv.md +++ /dev/null @@ -1,32 +0,0 @@ -# pipenv - -> Simple and unified Python development workflow. -> Manages packages and the virtual environment for a project. - -- Create a new project: - -`pipenv` - -- Create a new project using Python 3: - -`pipenv --three` - -- Install a package: - -`pipenv install {{package_name}}` - -- Install all the dependencies for a project (including dev): - -`pipenv install --dev` - -- Uninstall a package: - -`pipenv uninstall {{package_name}}` - -- Start a shell within the created virtual environment: - -`pipenv shell` - -- Generate a requirements.txt for a project: - -`pipenv lock --requirements` diff --git a/pages.cn/common/pkill.md b/pages.cn/common/pkill.md deleted file mode 100644 index a0d89acaf..000000000 --- a/pages.cn/common/pkill.md +++ /dev/null @@ -1,16 +0,0 @@ -# pkill - -> Signal process by name. -> Mostly used for stopping processes. - -- Kill all processes which match: - -`pkill -9 {{process_name}}` - -- Kill all processes which match their full command instead of just the process name: - -`pkill -9 -f "{{command_name}}"` - -- Send SIGUSR1 signal to processes which match: - -`pkill -USR1 {{process_name}}` diff --git a/pages.cn/common/play.md b/pages.cn/common/play.md deleted file mode 100644 index 316290470..000000000 --- a/pages.cn/common/play.md +++ /dev/null @@ -1,20 +0,0 @@ -# play - -> Audio player of SoX - Sound eXchange. -> Plays any audio from the command line, with audio formats identified by the extension. - -- Play the given audio file: - -`play {{audiofile}}` - -- Play the given audio files: - -`play {{audiofile1}} {{audiofile2}}` - -- Play the given audio at twice the speed: - -`play {{audiofile}} speed 2.0` - -- Play the given audio in reverse: - -`play {{audiofile}} reverse` diff --git a/pages.cn/common/pm2.md b/pages.cn/common/pm2.md deleted file mode 100644 index 1fc16e08c..000000000 --- a/pages.cn/common/pm2.md +++ /dev/null @@ -1,24 +0,0 @@ -# pm2 - -> Process manager for Node.js. -> Used for log management, monitoring and configuring processes. - -- Start a process with a name that can be used for later operations: - -`pm2 start {{app.js}} --name {{myapp}}` - -- List processes: - -`pm2 list` - -- Monitor all processes: - -`pm2 monit` - -- Stop a process: - -`pm2 stop {{myapp}}` - -- Restart a process: - -`pm2 restart {{myapp}}` diff --git a/pages.cn/common/pngcrush.md b/pages.cn/common/pngcrush.md deleted file mode 100644 index 4c5db0879..000000000 --- a/pages.cn/common/pngcrush.md +++ /dev/null @@ -1,15 +0,0 @@ -# pngcrush - -> PNG image compression utility. - -- Compress a PNG file: - -`pngcrush {{in.png}} {{out.png}}` - -- Compress all PNGs and output to directory: - -`pngcrush -d {{path/to/output}} *.png` - -- Compress PNG file with all 114 available algorithms and pick the best result: - -`pngcrush -rem allb -brute -reduce {{in.png}} {{out.png}}` diff --git a/pages.cn/common/postcss.md b/pages.cn/common/postcss.md deleted file mode 100644 index 0646e3c29..000000000 --- a/pages.cn/common/postcss.md +++ /dev/null @@ -1,35 +0,0 @@ -# postcss - -> PostCSS is a tool for transforming styles with JS plugins. - -- Parse and transform a CSS file: - -`postcss {{path/to/file}}` - -- Parse and transform a CSS file and output to a specific file: - -`postcss {{path/to/file}} --output {{path/to/file}}` - -- Parse and transform a CSS file and output to a specific directory: - -`postcss {{path/to/file}} --dir {{path/to/directory}}` - -- Parse and transform a CSS file in-place: - -`postcss {{path/to/file}} --replace` - -- Specify a custom PostCSS parser: - -`postcss {{path/to/file}} --parser {{parser}}` - -- Specify a custom PostCSS syntax: - -`postcss {{path/to/file}} --syntax {{syntax}}` - -- Watch for changes to a CSS file: - -`postcss {{path/to/file}} --watch` - -- Display available options and examples: - -`postcss --help` diff --git a/pages.cn/common/printenv.md b/pages.cn/common/printenv.md deleted file mode 100644 index 9a285321a..000000000 --- a/pages.cn/common/printenv.md +++ /dev/null @@ -1,15 +0,0 @@ -# printenv - -> Print values of all or specific environment variables. - -- Display key-value pairs of all environment variables: - -`printenv` - -- Display the value of a specific variable: - -`printenv {{HOME}}` - -- Display the value of a variable and end with NUL instead of newline: - -`printenv --null {{HOME}}` diff --git a/pages.cn/common/printf.md b/pages.cn/common/printf.md deleted file mode 100644 index 5dd6062e0..000000000 --- a/pages.cn/common/printf.md +++ /dev/null @@ -1,23 +0,0 @@ -# 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}}` diff --git a/pages.cn/common/progpilot.md b/pages.cn/common/progpilot.md deleted file mode 100644 index 5b32e4e60..000000000 --- a/pages.cn/common/progpilot.md +++ /dev/null @@ -1,15 +0,0 @@ -# progpilot - -> A PHP static analysis tool for detecting security vulnerabilities. - -- Analyse the current directory: - -`progpilot` - -- Analyse a specific file or directory: - -`progpilot {{path/to/file_or_directory}}` - -- Specify a custom configuration file: - -`progpilot --configuration {{path/to/configuration.yml}}` diff --git a/pages.cn/common/prosodyctl.md b/pages.cn/common/prosodyctl.md deleted file mode 100644 index 203ef293b..000000000 --- a/pages.cn/common/prosodyctl.md +++ /dev/null @@ -1,23 +0,0 @@ -# prosodyctl - -> The control tool for the Prosody XMPP server. - -- Show the status of the Prosody server: - -`sudo prosodyctl status` - -- Reload the server's configuration files: - -`sudo prosodyctl reload` - -- Add a user to the Prosody XMPP server: - -`sudo prosodyctl adduser {{user@example.com}}` - -- Set a user's password: - -`sudo prosodyctl passwd {{user@example.com}}` - -- Permanently delete a user: - -`sudo prosodyctl deluser {{user@example.com}}` diff --git a/pages.cn/common/protoc.md b/pages.cn/common/protoc.md deleted file mode 100644 index 441e08516..000000000 --- a/pages.cn/common/protoc.md +++ /dev/null @@ -1,15 +0,0 @@ -# protoc - -> Parse Google Protobuf `.proto` files and generate output in the specified language. - -- Generate Python code from a `.proto` file: - -`protoc --python_out={{path/to/output_directory}} {{input_file.proto}}` - -- Generate Java code from a `.proto` file that imports other `.proto` files: - -`protoc --java_out={{path/to/output_directory}} --proto_path={{path/to/import_search_path}} {{input_file.proto}}` - -- Generate code for multiple languages: - -`protoc --csharp_out={{path/to/c#_output_directory}} --js_out={{path/to/js_output_directory}} {{input_file.proto}}` diff --git a/pages.cn/common/ps.md b/pages.cn/common/ps.md deleted file mode 100644 index c5949a620..000000000 --- a/pages.cn/common/ps.md +++ /dev/null @@ -1,27 +0,0 @@ -# ps - -> Information about running processes. - -- List all running processes: - -`ps aux` - -- List all running processes including the full command string: - -`ps auxww` - -- Search for a process that matches a string: - -`ps aux | grep {{string}}` - -- List all processes of the current user in extra full format: - -`ps --user $(id -u) -F` - -- List all processes of the current user as a tree: - -`ps --user $(id -u) f` - -- Get the parent pid of a process: - -`ps -o ppid= -p {{pid}}` diff --git a/pages.cn/common/psgrep.md b/pages.cn/common/psgrep.md deleted file mode 100644 index cc02688ad..000000000 --- a/pages.cn/common/psgrep.md +++ /dev/null @@ -1,15 +0,0 @@ -# psgrep - -> Search through processes with grep. - -- Find process lines containing a specific string: - -`psgrep {{process_name}}` - -- Find process lines containing a specific string, do not include headers: - -`psgrep -n {{process_name}}` - -- Search using simplified format (PID, user, command): - -`psgrep -s {{process_name}}` diff --git a/pages.cn/common/psql.md b/pages.cn/common/psql.md deleted file mode 100644 index 3996c11f1..000000000 --- a/pages.cn/common/psql.md +++ /dev/null @@ -1,23 +0,0 @@ -# psql - -> PostgreSQL command-line client. - -- Connect to database. It connects to localhost using default port 5432 with default user as currently logged in user: - -`psql {{database}}` - -- Connect to database on given server host running on given port with given username, without a 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}}` - -- Execute a single SQL query or PostgreSQL command on the given database (useful in shell scripts): - -`psql -c '{{query}}' {{database}}` - -- Execute commands from a file on the given database: - -`psql {{database}} -f {{file.sql}}` diff --git a/pages.cn/common/pssh.md b/pages.cn/common/pssh.md deleted file mode 100644 index 76c08313a..000000000 --- a/pages.cn/common/pssh.md +++ /dev/null @@ -1,27 +0,0 @@ -# pssh - -> Parallel SSH program. - -- Run a command on two hosts, and print its output on each server inline: - -`pssh -i -H "{{host1}} {{host2}}" {{hostname -i}}` - -- Run a command and save the output to separate files: - -`pssh -H {{host1}} -H {{host2}} -o {{path/to/output_dir}} {{hostname -i}}` - -- Run a command on multiple hosts, specified in a new-line separated file: - -`pssh -i -h {{path/to/hosts_file}} {{hostname -i}}` - -- Run a command as root (this asks for the root password): - -`pssh -i -h {{path/to/hosts_file}} -A -l {{root_username}} {{hostname -i}}` - -- Run a command with extra SSH arguments: - -`pssh -i -h {{path/to/hosts_file}} -x "{{-O VisualHostKey=yes}}" {{hostname -i}}` - -- Run a command limiting the number of parallel connections to 10: - -`pssh -i -h {{path/to/hosts_file}} -p {{10}} '{{cd dir; ./script.sh; exit}}'` diff --git a/pages.cn/common/pt.md b/pages.cn/common/pt.md deleted file mode 100644 index 0fa151089..000000000 --- a/pages.cn/common/pt.md +++ /dev/null @@ -1,24 +0,0 @@ -# pt - -> Platinum Searcher. -> A code search tool similar to `ag`. - -- Find files containing "foo" and print the files with highlighted matches: - -`pt {{foo}}` - -- Find files containing "foo" and display count of matches in each file: - -`pt -c {{foo}}` - -- Find files containing "foo" as a whole word and ignore its case: - -`pt -wi {{foo}}` - -- Find "foo" in files with a given extension using a regular expression: - -`pt -G='{{\.bar$}}' {{foo}}` - -- Find files whose contents match the regular expression, up to 2 folders deep: - -`pt --depth={{2}} -e '{{^ba[rz]*$}}'` diff --git a/pages.cn/common/pup.md b/pages.cn/common/pup.md deleted file mode 100644 index 4b32e85e7..000000000 --- a/pages.cn/common/pup.md +++ /dev/null @@ -1,27 +0,0 @@ -# pup - -> Command line HTML parsing tool. - -- Transform a raw HTML file into a cleaned, indented, and colored format: - -`cat {{index.html}} | pup --color` - -- Filter HTML by element tag name: - -`cat {{index.html}} | pup '{{tag}}'` - -- Filter HTML by id: - -`cat {{index.html}} | pup '{{div#id}}'` - -- Filter HTML by attribute value: - -`cat {{index.html}} | pup '{{input[type="text"]}}'` - -- Print all text from the filtered HTML elements and their children: - -`cat {{index.html}} | pup '{{div}} text{}'` - -- Print HTML as JSON: - -`cat {{index.html}} | pup '{{div}} json{}'` diff --git a/pages.cn/common/pv.md b/pages.cn/common/pv.md deleted file mode 100644 index 3705bd683..000000000 --- a/pages.cn/common/pv.md +++ /dev/null @@ -1,27 +0,0 @@ -# pv - -> Monitor the progress of data through a pipe. - -- Print the contents of the file and display a progress bar: - -`pv {{file}}` - -- Measure the speed and amount of data flow between pipes (`-s` is optional): - -`command1 | pv -s {{expected_amount_of_data_for_eta}} | command2` - -- Filter a file, see both progress and amount of output data: - -`pv -cN in {{big_text_file}} | grep {{pattern}} | pv -cN out > {{filtered_file}}` - -- Attach to an already running process and see its file reading progress: - -`pv -d {{PID}}` - -- Read an erroneous file, skip errors as `dd conv=sync,noerror` would: - -`pv -EE {{path/to/faulty_media}} > image.img` - -- Stop reading after reading specified amount of data, rate limit to 1K/s: - -`pv -L 1K -S {{maximum_file_size_to_be_read}}` diff --git a/pages.cn/common/pwd.md b/pages.cn/common/pwd.md deleted file mode 100644 index 5c9af42f8..000000000 --- a/pages.cn/common/pwd.md +++ /dev/null @@ -1,11 +0,0 @@ -# pwd - -> Print name of current/working directory. - -- Print the current directory: - -`pwd` - -- Print the current directory, and resolve all symlinks (i.e. show the "physical" path): - -`pwd -P` diff --git a/pages.cn/common/pycodestyle.md b/pages.cn/common/pycodestyle.md deleted file mode 100644 index 74477ae15..000000000 --- a/pages.cn/common/pycodestyle.md +++ /dev/null @@ -1,23 +0,0 @@ -# pycodestyle - -> A tool to check Python code against PEP 8 style conventions. - -- Check the style of a single file: - -`pycodestyle {{file.py}}` - -- Check the style of multiple files: - -`pycodestyle {{file1.py}} {{file2.py}} {{file3.py}}` - -- Show only the first occurrence of an error: - -`pycodestyle --first {{file.py}}` - -- Show the source code for each error: - -`pycodestyle --show-source {{file.py}}` - -- Show the specific PEP 8 text for each error: - -`pycodestyle --show-pep8 {{file.py}}` diff --git a/pages.cn/common/pyenv-virtualenv.md b/pages.cn/common/pyenv-virtualenv.md deleted file mode 100644 index 461787f76..000000000 --- a/pages.cn/common/pyenv-virtualenv.md +++ /dev/null @@ -1,11 +0,0 @@ -# pyenv virtualenv - -> Create virtual environments based on one's installed Python distributions. - -- Create a new Python 3.6.6 virtual environment: - -`pyenv virtualenv {{3.6.6}} {{my-virtual-env-3.6.6}}` - -- List all existing virtual environments: - -`pyenv virtualenvs` diff --git a/pages.cn/common/pyenv.md b/pages.cn/common/pyenv.md deleted file mode 100644 index 5aa0e54b1..000000000 --- a/pages.cn/common/pyenv.md +++ /dev/null @@ -1,27 +0,0 @@ -# pyenv - -> Switch between multiple versions of Python easily. - -- List all available commands: - -`pyenv commands` - -- List all Python versions under the ${PYENV_ROOT}/versions directory: - -`pyenv versions` - -- Install a Python version under the ${PYENV_ROOT}/versions directory: - -`pyenv install {{2.7.10}}` - -- Uninstall a Python version under the ${PYENV_ROOT}/versions directory: - -`pyenv uninstall {{2.7.10}}` - -- Set Python version to be used globally in the current machine: - -`pyenv global {{2.7.10}}` - -- Set Python version to be used in the current directory and all directories below it: - -`pyenv local {{2.7.10}}` diff --git a/pages.cn/common/pyflakes.md b/pages.cn/common/pyflakes.md deleted file mode 100644 index a0b92fe1f..000000000 --- a/pages.cn/common/pyflakes.md +++ /dev/null @@ -1,19 +0,0 @@ -# pyflakes - -> Checks Python source code files for errors. - -- Check a single Python file: - -`pyflakes check {{path/to/file}}.py` - -- Check Python files in a specific directory: - -`pyflakes checkPath {{path/to/directory}}` - -- Check Python files in a directory recursively: - -`pyflakes checkRecursive {{path/to/directory}}` - -- Check all Python files found in multiple directories: - -`pyflakes iterSourceCode {{path/to/directory_1}} {{path/to/directory_2}}` diff --git a/pages.cn/common/pygmentize.md b/pages.cn/common/pygmentize.md deleted file mode 100644 index e239a8ba7..000000000 --- a/pages.cn/common/pygmentize.md +++ /dev/null @@ -1,27 +0,0 @@ -# pygmentize - -> Python-based syntax highlighter. - -- Highlight file syntax and print to standard output (language is inferred from the file extension): - -`pygmentize {{file.py}}` - -- Explicitly set the language for syntax highlighting: - -`pygmentize -l {{javascript}} {{input_file}}` - -- List available lexers (processors for input languages): - -`pygmentize -L lexers` - -- Save output to a file in HTML format: - -`pygmentize -f html -o {{output_file.html}} {{input_file.py}}` - -- List available output formats: - -`pygmentize -L formatters` - -- Output an HTML file, with additional formatter options (full page, with line numbers): - -`pygmentize -f html -O "full,linenos=True" -o {{output_file.html}} {{input_file}}` diff --git a/pages.cn/common/python.md b/pages.cn/common/python.md deleted file mode 100644 index 7260a9d87..000000000 --- a/pages.cn/common/python.md +++ /dev/null @@ -1,27 +0,0 @@ -# python - -> Python language interpreter. - -- Call a Python interactive shell (REPL): - -`python` - -- Execute script in a given Python file: - -`python {{script.py}}` - -- Execute script as part of an interactive shell: - -`python -i {{script.py}}` - -- Execute a Python expression: - -`python -c "{{expression}}"` - -- Run library module as a script (terminates option list): - -`python -m {{module}} {{arguments}}` - -- Interactively debug a Python script: - -`python -m pdb {{script.py}}` diff --git a/pages.cn/common/q.md b/pages.cn/common/q.md deleted file mode 100644 index 5124db5cf..000000000 --- a/pages.cn/common/q.md +++ /dev/null @@ -1,27 +0,0 @@ -# q - -> Execute SQL-like queries on .csv and .tsv files. - -- Query .csv file by specifying the delimiter as ',': - -`q -d',' "SELECT * from {{path/to/file}}"` - -- Query .tsv file: - -`q -t "SELECT * from {{path/to/file}}"` - -- Query file with header row: - -`q -d{{delimiter}} -H "SELECT * from {{path/to/file}}"` - -- Read data from stdin; '-' in the query represents the data from stdin: - -`{{output}} | q "select * from -"` - -- Join two files (aliased as `f1` and `f2` in the example) on column `c1`, a common column: - -`q "SELECT * FROM {{path/to/file}} f1 JOIN {{path/to/other_file}} f2 ON (f1.c1 = f2.c1)"` - -- Format output using an output delimiter with an output header line (note: command will output column names based on the input file header or the column aliases overridden in the query): - -`q -D{{delimiter}} -O "SELECT {{column}} as {{alias}} from {{path/to/file}}"` diff --git a/pages.cn/common/qemu-img.md b/pages.cn/common/qemu-img.md deleted file mode 100644 index c4301a0b3..000000000 --- a/pages.cn/common/qemu-img.md +++ /dev/null @@ -1,19 +0,0 @@ -# qemu-img - -> Tool for Quick Emulator Virtual HDD image creation and manipulation. - -- Create disk image with a specific size (in gigabytes): - -`qemu-img create {{image_name.img}} {{gigabites}}G` - -- Show information about a disk image: - -`qemu-img info {{image_name.img}}` - -- Increase or decrease image size: - -`qemu-img resize {{image_name.img}} {{gigabites}}G` - -- Dump the allocation state of every sector of the specified disk image: - -`qemu-img map {{image_name.img}}` diff --git a/pages.cn/common/qemu.md b/pages.cn/common/qemu.md deleted file mode 100644 index 3d1ce3088..000000000 --- a/pages.cn/common/qemu.md +++ /dev/null @@ -1,24 +0,0 @@ -# qemu - -> Generic machine emulator and virtualizer. -> Supports a large variety of CPU architectures. - -- Boot from image emulating i386 architecture: - -`qemu-system-i386 -hda {{image_name.img}}` - -- Boot from image emulating x64 architecture: - -`qemu-system-x86_64 -hda {{image_name.img}}` - -- Boot QEMU instance with a live ISO image: - -`qemu-system-i386 -hda {{image_name.img}} -cdrom {{os_image.iso}} -boot d` - -- Specify amount of RAM for instance: - -`qemu-system-i386 -m 256 -hda image_name.img -cdrom os-image.iso -boot d` - -- Boot from physical device (e.g. from USB to test bootable medium): - -`qemu-system-i386 -hda /dev/{{storage_device}}` diff --git a/pages.cn/common/qpdf.md b/pages.cn/common/qpdf.md deleted file mode 100644 index 244017509..000000000 --- a/pages.cn/common/qpdf.md +++ /dev/null @@ -1,23 +0,0 @@ -# qpdf - -> Versatile PDF transformation software. - -- Extract pages 1-3, 5 and 6-10 from a PDF file and save them as another one: - -`qpdf --empty --pages {{input.pdf}} {{1-3,5,6-10}} -- {{output.pdf}}` - -- Merge (concatenate) a list of PDF files and save the result as another one: - -`qpdf --empty --pages {{file1.pdf}} {{1,6-8}} --pages {{file2.pdf}} {{3,4,5}} -- {{output.pdf}}` - -- Write each group of n pages to a separate output file with a given filename pattern: - -`qpdf --split-pages=n {{input.pdf}} {{out_%d.pdf}}` - -- Rotate certain pages of a pdf with a given angle: - -`qpdf --rotate={{90:2,4,6}} --rotate={{180:7-8}} {{input.pdf}} {{output.pdf}}` - -- Remove the password from a password protected file: - -`qpdf --password={{password}} --decrypt {{input.pdf}} {{output.pdf}}` diff --git a/pages.cn/common/quota.md b/pages.cn/common/quota.md deleted file mode 100644 index aabc4d32e..000000000 --- a/pages.cn/common/quota.md +++ /dev/null @@ -1,23 +0,0 @@ -# quota - -> Display users' disk space usage and allocated limits. - -- Show disk quotas in human readable units for the current user: - -`quota -s` - -- Verbose output (also display quotas on filesystems where no storage is allocated): - -`quota -v` - -- Quiet output (only display quotas on filesystems where usage is over quota): - -`quota -q` - -- Print quotas for the groups of which the current user is a member: - -`quota -g` - -- Show disk quotas for another user: - -`sudo quota -u {{username}}` diff --git a/pages.cn/common/r.md b/pages.cn/common/r.md deleted file mode 100644 index 8a1896a63..000000000 --- a/pages.cn/common/r.md +++ /dev/null @@ -1,15 +0,0 @@ -# r - -> R language interpreter. - -- Start an R interactive shell (REPL): - -`R` - -- Check R version: - -`R --version` - -- Execute a file: - -`R -f {{file.R}}` diff --git a/pages.cn/common/rabin2.md b/pages.cn/common/rabin2.md deleted file mode 100644 index 4dfe1e048..000000000 --- a/pages.cn/common/rabin2.md +++ /dev/null @@ -1,24 +0,0 @@ -# rabin2 - -> Get information about binary files (ELF, PE, Java CLASS, Mach-O) - symbols, sections, linked libraries, etc. -> Comes bundled with `radare2`. - -- Display general information about a binary (architecture, type, endianness): - -`rabin2 -I {{path/to/binary}}` - -- Display linked libraries: - -`rabin2 -l {{path/to/binary}}` - -- Display symbols imported from libraries: - -`rabin2 -i {{path/to/binary}}` - -- Display strings contained in the binary: - -`rabin2 -z {{path/to/binary}}` - -- Display the output in JSON: - -`rabin2 -j -I {{path/to/binary}}` diff --git a/pages.cn/common/rails.md b/pages.cn/common/rails.md deleted file mode 100644 index 9b21d90f3..000000000 --- a/pages.cn/common/rails.md +++ /dev/null @@ -1,23 +0,0 @@ -# rails - -> A server-side MVC framework written in Ruby. - -- Create a new rails project: - -`rails new "{{project_name}}"` - -- Start local server for current project on port 3000: - -`rails server` - -- Start local server for current project on a specified port: - -`rails server -p "{{port}}"` - -- Open console to interact with application from command line: - -`rails console` - -- Check current version of rails: - -`rails --version` diff --git a/pages.cn/common/rainbowstream.md b/pages.cn/common/rainbowstream.md deleted file mode 100644 index 80ce6c521..000000000 --- a/pages.cn/common/rainbowstream.md +++ /dev/null @@ -1,32 +0,0 @@ -# rainbowstream - -> Terminal-based Twitter client supporting realtime tweetstream, trends, sending, search, favorites and user management. -> Online help with `h`, up and down arrows for history, tab to auto-complete and 2-tab for suggestion. - -- Open rainbowstream: - -`rainbowstream` - -- Show your timeline (optional number of tweets to display, default is 5): - -`home [{{num_of_last_tweets}}]` - -- Show profile of a given user: - -`whois @{{user}}` - -- Tweet the message as-is: - -`t {{message}}` - -- Retweet the tweet with given id (id is beside the time): - -`rt {{tweet_id}}` - -- Favorite the tweet with given id: - -`fav {{tweet_id}}` - -- Perform a search for a given word (with or without hashtag): - -`s {{word}}` diff --git a/pages.cn/common/rbash.md b/pages.cn/common/rbash.md deleted file mode 100644 index b4b1c2fc8..000000000 --- a/pages.cn/common/rbash.md +++ /dev/null @@ -1,20 +0,0 @@ -# rbash - -> Restricted Bash shell. -> Similar to the `bash` shell with some restrictions like changing directories with `cd`, setting/unsetting of PATH, ENV variables and others. - -- Start rbash: - -`rbash` - -- Execute a command: - -`rbash -c "{{command}}"` - -- Run commands from a file: - -`rbash {{file.sh}}` - -- Print the version information of rbash: - -`rbash --version` diff --git a/pages.cn/common/rbenv.md b/pages.cn/common/rbenv.md deleted file mode 100644 index abda05915..000000000 --- a/pages.cn/common/rbenv.md +++ /dev/null @@ -1,31 +0,0 @@ -# rbenv - -> A tool to easily install Ruby versions and manage application environments. - -- Install one or more space-separated versions of Ruby: - -`rbenv install {{version(s)}}` - -- Display a list of installed versions: - -`rbenv versions` - -- Use a specific version of Ruby across the whole system: - -`rbenv global {{version}}` - -- Use a specific version of Ruby for an application/project folder: - -`rbenv local {{version}}` - -- Show the currently selected Ruby version: - -`rbenv version` - -- Uninstall a version of Ruby: - -`rbenv uninstall {{version}}` - -- Display all ruby versions that contain the specified executable: - -`rbenv whence {{executable}}` diff --git a/pages.cn/common/rdfind.md b/pages.cn/common/rdfind.md deleted file mode 100644 index b5ca66f41..000000000 --- a/pages.cn/common/rdfind.md +++ /dev/null @@ -1,19 +0,0 @@ -# rdfind - -> Find files with duplicate content and get rid of them. - -- Identify all duplicates in a given directory and output a summary: - -`rdfind -dryrun true {{path/to/directory}}` - -- Replace all duplicates with hardlinks: - -`rdfind -makehardlinks true {{path/to/directory}}` - -- Replace all duplicates with symlinks/soft links: - -`rdfind -makesymlinks true {{path/to/directory}}` - -- Delete all duplicates and do not ignore empty files: - -`rdfind -deleteduplicates true -ignoreempty false {{path/to/directory}}` diff --git a/pages.cn/common/read.md b/pages.cn/common/read.md deleted file mode 100644 index abd53d421..000000000 --- a/pages.cn/common/read.md +++ /dev/null @@ -1,27 +0,0 @@ -# read - -> BASH builtin for retrieving data from standard input. - -- Store data that you type from the keyboard: - -`read {{variable}}` - -- Store each of the next lines you enter as values of an array: - -`read -a {{array}}` - -- Enable backspace and GNU readline hotkeys when entering input with read: - -`read -e {{variable}}` - -- Specify the number of maximum characters to be read: - -`read -n {{character_count}} {{variable}}` - -- Use a specific character as a delimiter instead of a new line: - -`read -d {{new_delimiter}} {{variable}}` - -- Do not let backslash (\) act as an escape character: - -`read -r {{variable}}` diff --git a/pages.cn/common/readlink.md b/pages.cn/common/readlink.md deleted file mode 100644 index 865e64f77..000000000 --- a/pages.cn/common/readlink.md +++ /dev/null @@ -1,11 +0,0 @@ -# readlink - -> Follow symlinks and get symlink information. - -- Get the actual file to which the symlink points: - -`readlink {{filename}}` - -- Get the absolute path to a file: - -`readlink -f {{filename}}` diff --git a/pages.cn/common/realpath.md b/pages.cn/common/realpath.md deleted file mode 100644 index 1b994877f..000000000 --- a/pages.cn/common/realpath.md +++ /dev/null @@ -1,23 +0,0 @@ -# realpath - -> Display the resolved absolute path for a file or directory. - -- Display the absolute path for a file or directory: - -`realpath {{path/to/file_or_directory}}` - -- Require all path components to exist: - -`realpath --canonicalize-existing {{path/to/file_or_directory}}` - -- Resolve ".." components before symlinks: - -`realpath --logical {{path/to/file_or_directory}}` - -- Disable symlink expansion: - -`realpath --no-symlinks {{path/to/file_or_directory}}` - -- Suppress error messages: - -`realpath --quiet {{path/to/file_or_directory}}` diff --git a/pages.cn/common/redis-cli.md b/pages.cn/common/redis-cli.md deleted file mode 100644 index 2e0c0ad52..000000000 --- a/pages.cn/common/redis-cli.md +++ /dev/null @@ -1,23 +0,0 @@ -# redis-cli - -> Opens a connection to a Redis server. - -- Connect to the local server: - -`redis-cli` - -- Connect to a remote server on the default port (6379): - -`redis-cli -h {{host}}` - -- Connect to a remote server specifying a port number: - -`redis-cli -h {{host}} -p {{port}}` - -- Specify a password: - -`redis-cli -a {{password}}` - -- Execute Redis command: - -`redis-cli {{redis_command}}` diff --git a/pages.cn/common/redshift.md b/pages.cn/common/redshift.md deleted file mode 100644 index f2079a629..000000000 --- a/pages.cn/common/redshift.md +++ /dev/null @@ -1,23 +0,0 @@ -# redshift - -> Adjust the color temperature of your screen according to your surroundings. - -- Turn on Redshift with 5700K temperature during day and 3600K at night: - -`redshift -t {{5700}}:{{3600}}` - -- Turn on Redshift with a manually-specified custom location: - -`redshift -l {{latitude}}:{{longitude}}` - -- Turn on Redshift with 70% screen brightness during day and 40% brightness at night: - -`redshift -b {{0.7}}:{{0.4}}` - -- Turn on Redshift with custom gamma levels (between 0 and 1): - -`redshift -g {{red}}:{{green}}:{{blue}}` - -- Turn on Redshift with a constant unchanging color temperature: - -`redshift -O {{temperature}}` diff --git a/pages.cn/common/rename.md b/pages.cn/common/rename.md deleted file mode 100644 index 041e4ee9e..000000000 --- a/pages.cn/common/rename.md +++ /dev/null @@ -1,23 +0,0 @@ -# rename - -> Renames multiple files. - -- Rename files using a Perl Common Regular Expression (substitute 'foo' with 'bar' wherever found): - -`rename {{'s/foo/bar/'}} {{\*}}` - -- Dry-run - display which renames would occur without performing them: - -`rename -n {{'s/foo/bar/'}} {{\*}}` - -- Force renaming even if the operation would overwrite existing files: - -`rename -f {{'s/foo/bar/'}} {{\*}}` - -- Convert filenames to lower case (use `-f` in case-insensitive filesystems to prevent "already exists" errors): - -`rename 'y/A-Z/a-z/' {{\*}}` - -- Replace whitespace with underscores: - -`rename 's/\s+/_/g' {{\*}}` diff --git a/pages.cn/common/renice.md b/pages.cn/common/renice.md deleted file mode 100644 index 3977bb051..000000000 --- a/pages.cn/common/renice.md +++ /dev/null @@ -1,15 +0,0 @@ -# renice - -> Alters the scheduling priority/nicenesses of one or more running processes. Niceness values range from -20 (most favorable to the process) to 19 (least favorable to the process). - -- Change priority of a running process: - -`renice -n {{niceness_value}} -p {{pid}}` - -- Change priority of all processes owned by a user: - -`renice -n {{niceness_value}} -u {{user}}` - -- Change priority of all processes that belong to a process group: - -`renice -n {{niceness_value}} --pgrp {{process_group}}` diff --git a/pages.cn/common/repren.md b/pages.cn/common/repren.md deleted file mode 100644 index 06a902a4f..000000000 --- a/pages.cn/common/repren.md +++ /dev/null @@ -1,23 +0,0 @@ -# repren - -> Multi-pattern string replacement and file renaming tool. - -- Do a dry-run renaming a folder of pngs with a literal string replacement: - -`repren --dry-run --rename --literal --from '{{find_string}}' --to '{{replacement_string}}' {{*.png}}` - -- Do a dry-run renaming a folder of jpegs with a regular expression: - -`repren --rename --dry-run --from '{{regular_expression}}' --to '{{replacement_string}}' {{*.jpg}} {{*.jpeg}}` - -- Do a find-and-replace on the contents of a folder of csv files: - -`repren --from '{{([0-9]+) example_string}}' --to '{{replacement_string \1}}' {{*.csv}}` - -- Do both a find-and-replace and a rename operation at the same time, using a pattern file: - -`repren --patterns {{path/to/patfile.ext}} --full {{*.txt}}` - -- Do a case-insensitive rename: - -`repren --rename --insensitive --patterns {{path/to/patfile.ext}} *` diff --git a/pages.cn/common/restic.md b/pages.cn/common/restic.md deleted file mode 100644 index 75b42d454..000000000 --- a/pages.cn/common/restic.md +++ /dev/null @@ -1,27 +0,0 @@ -# restic - -> Fast, secure, efficient backup program. - -- Initialize a backup repository in the specified local directory: - -`restic init -r {{path/to/repository}}` - -- Backup folder "my_folder" to the repository: - -`restic -r {{path/to/repository}} backup {{path/to/my_folder}}` - -- Show backup snapshots currently stored in the repository: - -`restic -r {{path/to/repository}} snapshots` - -- Restore a specific backup snapshot to a target directory: - -`restic -r {{path/to/repository}} restore {{snapshot_id}} {{path/to/target}}` - -- Restore a specific path from a specific backup to a target directory: - -`restic -r {{path/to/repository}} --include {{path/to/restore}} --target {{path/to/target}} restore {{snapshot_id}}` - -- Clean up the repository and keep only the most recent snapshot of each unique backup: - -`restic forget --keep-last 1 --prune` diff --git a/pages.cn/common/rev.md b/pages.cn/common/rev.md deleted file mode 100644 index fac7ada71..000000000 --- a/pages.cn/common/rev.md +++ /dev/null @@ -1,11 +0,0 @@ -# rev - -> Reverse a line of text. - -- Reverse the text string "hello": - -`echo "hello" | rev` - -- Reverse an entire file and print to stdout: - -`rev {{file}}` diff --git a/pages.cn/common/rg.md b/pages.cn/common/rg.md deleted file mode 100644 index f713177cb..000000000 --- a/pages.cn/common/rg.md +++ /dev/null @@ -1,31 +0,0 @@ -# ripgrep - -> A fast command-line search tool. - -- Recursively search the current directory for a regex pattern: - -`rg {{pattern}}` - -- Search for pattern including all .gitignored and hidden files: - -`rg -uu {{pattern}}` - -- Search for a pattern only in a certain filetype (e.g., html, css, etc.): - -`rg -t {{filetype}} {{pattern}}` - -- Search for a pattern only in a subset of directories: - -`rg {{pattern}} {{set_of_subdirs}}` - -- Search for a pattern in files matching a glob (e.g., `README.*`): - -`rg {{pattern}} -g {{glob}}` - -- Only list matched files -- useful when piping to other commands: - -`rg --files-with-matches {{pattern}}` - -- Show lines that do not match the given pattern: - -`rg --invert-match {{pattern}}` diff --git a/pages.cn/common/rm.md b/pages.cn/common/rm.md deleted file mode 100644 index 5c4496299..000000000 --- a/pages.cn/common/rm.md +++ /dev/null @@ -1,23 +0,0 @@ -# rm - -> Remove files or directories. - -- Remove files from arbitrary locations: - -`rm {{path/to/file}} {{path/to/another/file}}` - -- Recursively remove a directory and all its subdirectories: - -`rm -r {{path/to/folder}}` - -- Forcibly remove a directory, without prompting for confirmation or showing error messages: - -`rm -rf {{path/to/folder}}` - -- Interactively remove multiple files, with a prompt before every removal: - -`rm -i {{file(s)}}` - -- Remove files in verbose mode, printing a message for each removed file: - -`rm -v {{path/to/folder/*}}` diff --git a/pages.cn/common/rmdir.md b/pages.cn/common/rmdir.md deleted file mode 100644 index eb11ad2eb..000000000 --- a/pages.cn/common/rmdir.md +++ /dev/null @@ -1,11 +0,0 @@ -# rmdir - -> Removes a directory. - -- Remove directory, provided it is empty. Use `rm` to remove not empty directories: - -`rmdir {{path/to/directory}}` - -- Remove directories recursively (useful for nested dirs): - -`rmdir -p {{path/to/directory}}` diff --git a/pages.cn/common/roll.md b/pages.cn/common/roll.md deleted file mode 100644 index 74cbb007f..000000000 --- a/pages.cn/common/roll.md +++ /dev/null @@ -1,27 +0,0 @@ -# roll - -> Rolls a user-defined dice sequence. - -- Roll 3 6-sided dice and sums the results: - -`roll {{3d}}` - -- Roll 1 8-sided die, add 3 and sum the results: - -`roll {{d8 + 3}}` - -- Roll 4 6-sided dice, keep the 3 highest results and sum the results: - -`roll {{4d6h3}}` - -- Roll 2 12-sided dice 2 times and show every roll: - -`roll --verbose {{2{2d12}}}` - -- Roll 2 20-sided dice until the result is bigger than 10: - -`roll "{{2d20>10}}"` - -- Roll 2 5-sided dice 3 times and show the total sum: - -`roll --sum-series {{3{2d5}}}` diff --git a/pages.cn/common/route.md b/pages.cn/common/route.md deleted file mode 100644 index f2f3e928f..000000000 --- a/pages.cn/common/route.md +++ /dev/null @@ -1,15 +0,0 @@ -# route - -> Use route cmd to set the route table . - -- Display the information of route table: - -`route -n` - -- Add route rule: - -`sudo route add -net {{ip_address}} netmask {{netmask_address}} gw {{gw_address}}` - -- Delete route rule: - -`sudo route del -net {{ip_address}} netmask {{netmask_address}} dev {{gw_address}}` diff --git a/pages.cn/common/rsstail.md b/pages.cn/common/rsstail.md deleted file mode 100644 index 6b44563eb..000000000 --- a/pages.cn/common/rsstail.md +++ /dev/null @@ -1,23 +0,0 @@ -# rsstail - -> `tail` for RSS feeds. - -- Show the feed of a given url and wait for new entries appearing at the bottom: - -`rsstail -u {{url}}` - -- Show the feed in reverse chronological order (newer at the bottom): - -`rsstail -r -u {{url}}` - -- Include publication date and link: - -`rsstail -pl -u {{url}}` - -- Set update interval: - -`rsstail -u {{url}} -i {{interval_in_seconds}}` - -- Show feed and exit: - -`rsstail -1 -u {{url}}` diff --git a/pages.cn/common/rsync.md b/pages.cn/common/rsync.md deleted file mode 100644 index 2b35a2782..000000000 --- a/pages.cn/common/rsync.md +++ /dev/null @@ -1,32 +0,0 @@ -# rsync - -> Transfer files either to or from a remote host (not between two remote hosts). -> Can transfer single files, or multiple files matching a pattern. - -- Transfer file from local to remote host: - -`rsync {{path/to/file}} {{remote_host_name}}:{{remote_host_location}}` - -- Transfer file from remote host to local: - -`rsync {{remote_host_name}}:{{remote_file_location}} {{local_file_location}}` - -- Transfer file in archive (to preserve attributes) and compressed (zipped) mode with verbose and human-readable progress: - -`rsync -azvhP {{path/to/file}} {{remote_host_name}}:{{remote_host_location}}` - -- Transfer a directory and all its children from a remote to local: - -`rsync -r {{remote_host_name}}:{{remote_folder_location}} {{local_folder_location}}` - -- Transfer only updated files from remote host: - -`rsync -ru {{remote_host_name}}:{{remote_folder_location}} {{local_folder_location}}` - -- Transfer file over SSH and delete local files that do not exist on remote host: - -`rsync -e ssh --delete {{remote_host_name}}:{{remote_file}} {{local_file}}` - -- Transfer file over SSH and show global progress: - -`rsync -e ssh --info=progress2 {{remote_host_name}}:{{remote_file}} {{local_file}}` diff --git a/pages.cn/common/rtv.md b/pages.cn/common/rtv.md deleted file mode 100644 index 458568ea9..000000000 --- a/pages.cn/common/rtv.md +++ /dev/null @@ -1,28 +0,0 @@ -# rtv - -> Reddit Terminal Viewer. -> Use arrow keys to navigate. Right and Left to view and return from a submission, respectively. - -- Open the front page: - -`/front` - -- Open a subreddit: - -`/r/{{subreddit_name}}` - -- Expand/collapse comments: - -`[space]` - -- Open link: - -`o` - -- Login: - -`u` - -- Open the help screen: - -`?` diff --git a/pages.cn/common/ruby.md b/pages.cn/common/ruby.md deleted file mode 100644 index 7f8389eca..000000000 --- a/pages.cn/common/ruby.md +++ /dev/null @@ -1,23 +0,0 @@ -# ruby - -> Ruby programming language interpreter. - -- Open an Interactive Ruby Shell (REPL): - -`irb` - -- Execute a Ruby script: - -`ruby {{script.rb}}` - -- Execute a single Ruby command in the command line: - -`ruby -e {{command}}` - -- Check for syntax errors on a given Ruby script: - -`ruby -c {{script.rb}}` - -- Show the version of Ruby you are using: - -`ruby -v` diff --git a/pages.cn/common/rustc.md b/pages.cn/common/rustc.md deleted file mode 100644 index 6e7e3ca6f..000000000 --- a/pages.cn/common/rustc.md +++ /dev/null @@ -1,16 +0,0 @@ -# rustc - -> The Rust compiler. -> Processes, compiles and links Rust language source files. - -- Compile a single file: - -`rustc {{file.rs}}` - -- Compile with high optimization: - -`rustc -O {{file.rs}}` - -- Compile with debugging information: - -`rustc -g {{file.rs}}` diff --git a/pages.cn/common/rustfmt.md b/pages.cn/common/rustfmt.md deleted file mode 100644 index 0226eadf7..000000000 --- a/pages.cn/common/rustfmt.md +++ /dev/null @@ -1,15 +0,0 @@ -# rustfmt - -> Tool for formatting Rust source code. - -- Format a file, overwriting the original file in-place: - -`rustfmt {{source.rs}}` - -- Check a file for formatting and display any changes on the console: - -`rustfmt --check {{source.rs}}` - -- Backup any modified files before formatting (the original file is renamed with a `.bk` extension): - -`rustfmt --backup {{source.rs}}` diff --git a/pages.cn/common/rustup.md b/pages.cn/common/rustup.md deleted file mode 100644 index 95a904ce2..000000000 --- a/pages.cn/common/rustup.md +++ /dev/null @@ -1,28 +0,0 @@ -# rustup - -> Rust toolchain installer. -> Install, manage, and update Rust toolchains. - -- Install the nightly toolchain for your system: - -`rustup install nightly` - -- Switch the default toolchain to nightly so that the `cargo` and `rustc` commands will use it: - -`rustup default nightly` - -- Use the nightly toolchain when inside the current project, but leave global settings unchanged: - -`rustup override set nightly` - -- Update all toolchains: - -`rustup update` - -- List installed toolchains: - -`rustup show` - -- Run cargo build with a certain toolchain: - -`rustup run {{toolchain_name}} cargo build` diff --git a/pages.cn/common/rvm.md b/pages.cn/common/rvm.md deleted file mode 100644 index 61b2592b7..000000000 --- a/pages.cn/common/rvm.md +++ /dev/null @@ -1,31 +0,0 @@ -# rvm - -> A tool for easily installing, managing, and working with multiple ruby environments. - -- Install one or more space-separated versions of Ruby: - -`rvm install {{version(s)}}` - -- Display a list of installed versions: - -`rvm list` - -- Use a specific version of Ruby: - -`rvm use {{version}}` - -- Set the default Ruby version: - -`rvm --default use {{version}}` - -- Upgrade a version of Ruby to a new version: - -`rvm upgrade {{current_version}} {{new_version}}` - -- Uninstall a version of Ruby and keep its sources: - -`rvm uninstall {{version}}` - -- Remove a version of Ruby and its sources: - -`rvm remove {{version}}` diff --git a/pages.cn/common/s.md b/pages.cn/common/s.md deleted file mode 100644 index 3dec96794..000000000 --- a/pages.cn/common/s.md +++ /dev/null @@ -1,19 +0,0 @@ -# s - -> Web search from the terminal. - -- Search for a query on Google(default provider): - -`s {{query}}` - -- List all providers: - -`s --list-providers` - -- Search for a query with a given provider: - -`s --provider {{provider}} {{query}}` - -- Use a specified binary to perform the search query: - -`s --binary "{{binary}} {{arguments}}" {{query}}` diff --git a/pages.cn/common/sails.md b/pages.cn/common/sails.md deleted file mode 100644 index 5a7f3d7d3..000000000 --- a/pages.cn/common/sails.md +++ /dev/null @@ -1,23 +0,0 @@ -# sails - -> Sails.js is a realtime enterprise level MVC framework built on top of Node.js. - -- Start Sails: - -`sails lift` - -- Create new Sails project: - -`sails new {{projectName}}` - -- Generate Sails API: - -`sails generate {{name}}` - -- Generate Sails Controller: - -`sails generate controller {{name}}` - -- Generate Sails Model: - -`sails generate model {{name}}` diff --git a/pages.cn/common/salt-call.md b/pages.cn/common/salt-call.md deleted file mode 100644 index 705bf7736..000000000 --- a/pages.cn/common/salt-call.md +++ /dev/null @@ -1,19 +0,0 @@ -# salt-key - -> Invoke salt locally on a salt minion. - -- Perform a highstate on this minion: - -`salt-call state.highstate` - -- Perform a highstate dry-run, compute all changes but don't actually perform them: - -`salt-call state.highstate test=true` - -- Perform a highstate with verbose debugging output: - -`salt-call -l debug state.highstate` - -- List this minion's grains: - -`salt-call grains.items` diff --git a/pages.cn/common/salt-key.md b/pages.cn/common/salt-key.md deleted file mode 100644 index a0352a5cc..000000000 --- a/pages.cn/common/salt-key.md +++ /dev/null @@ -1,20 +0,0 @@ -# salt-key - -> Manages salt minion keys on the salt master. -> Needs to be run on the salt master, likely as root or with sudo. - -- List all accepted, unaccepted and rejected minion keys: - -`salt-key -L` - -- Accept a minion key by name: - -`salt-key -a {{MINION_ID}}` - -- Reject a minion key by name: - -`salt-key -r {{MINION_ID}}` - -- Print fingerprints of all public keys: - -`salt-key -F` diff --git a/pages.cn/common/salt-run.md b/pages.cn/common/salt-run.md deleted file mode 100644 index 73a4b780f..000000000 --- a/pages.cn/common/salt-run.md +++ /dev/null @@ -1,11 +0,0 @@ -# salt-run - -> Frontend for executing salt-runners on minions. - -- Show status of all minions: - -`salt-run manage.status` - -- Show all minions which are disconnected: - -`salt-run manage.up` diff --git a/pages.cn/common/salt.md b/pages.cn/common/salt.md deleted file mode 100644 index 00e31471c..000000000 --- a/pages.cn/common/salt.md +++ /dev/null @@ -1,19 +0,0 @@ -# salt - -> Execute commands and assert state on remote salt minions. - -- List connected minions: - -`salt '*' test.ping` - -- Execute a highstate on all connected minions: - -`salt '*' state.highstate` - -- Upgrade packages using the OS package manager (apt, yum, brew) on a subset of minions: - -`salt '*.domain.com' pkg.upgrade` - -- Execute an arbitrary command on a particular minion: - -`salt '{{minion_id}}' cmd.run "ls "` diff --git a/pages.cn/common/samtools.md b/pages.cn/common/samtools.md deleted file mode 100644 index 3a1773a01..000000000 --- a/pages.cn/common/samtools.md +++ /dev/null @@ -1,36 +0,0 @@ -# samtools - -> Tools for handling high-throughput sequencing (genomics) data. -> Used for reading/writing/editing/indexing/viewing of data in SAM/BAM/CRAM format. - -- Convert a SAM input file to BAM stream and save to file: - -`samtools view -S -b {{input.sam}} > {{output.bam}}` - -- Take input from stdin (-) and print the SAM header and any reads overlapping a specific region to stdout: - -`{{other_command}} | samtools view -h - chromosome:start-end` - -- Sort file and save to BAM (the output format is automatically determined from the output file's extension): - -`samtools sort {{input}} -o {{output.bam}}` - -- Index a sorted BAM file (creates {{sorted_input.bam.bai}}): - -`samtools index {{sorted_input.bam}}` - -- Print alignment statistics about a file: - -`samtools flagstat {{sorted_input}}` - -- Count alignments to each index (chromosome / contig): - -`samtools idxstats {{sorted_indexed_input}}` - -- Merge multiple files: - -`samtools merge {{output}} {{input_1}} [{{input_2}}...]` - -- Split input file according to read groups: - -`samtools split {{merged_input}}` diff --git a/pages.cn/common/sass.md b/pages.cn/common/sass.md deleted file mode 100644 index 3872daacc..000000000 --- a/pages.cn/common/sass.md +++ /dev/null @@ -1,19 +0,0 @@ -# sass - -> Converts SCSS or Sass files to CSS. - -- Convert a SCSS or Sass file to CSS and print out the result: - -`sass {{inputfile.scss|inputfile.sass}}` - -- Convert a SCSS or Sass file to CSS and save the result to a file: - -`sass {{inputfile.scss|inputfile.sass}} {{outputfile.css}}` - -- Watch a SCSS or Sass file for changes and output or update the CSS file with same filename: - -`sass --watch {{inputfile.scss|inputfile.sass}}` - -- Watch a SCSS or Sass file for changes and output or update the CSS file with the given filename: - -`sass --watch {{inputfile.scss|inputfile.sass}}:{{outputfile.css}}` diff --git a/pages.cn/common/sc-im.md b/pages.cn/common/sc-im.md deleted file mode 100644 index 6933c2b05..000000000 --- a/pages.cn/common/sc-im.md +++ /dev/null @@ -1,28 +0,0 @@ -# SC-IM - -> A curses based, vim-like spreadsheet calculator. -> Use hjkl or arrow keys to navigate. - -- Start SC-IM: - -`scim {{file_name}}.csv` - -- Enter a string into the current cell: - -`< or >` - -- Enter a numeric constant into the current cell: - -`=` - -- Edit string in the current cell: - -`E` - -- Edit number in the current cell: - -`e` - -- Center align the current cell: - -`|` diff --git a/pages.cn/common/scala.md b/pages.cn/common/scala.md deleted file mode 100644 index 3fe77649f..000000000 --- a/pages.cn/common/scala.md +++ /dev/null @@ -1,19 +0,0 @@ -# scala - -> Scala application launcher and interactive interpreter. - -- Start a Scala interactive shell (REPL): - -`scala` - -- Execute a Scala script: - -`scala {{script.scala}}` - -- Execute a .jar program: - -`scala {{filename.jar}}` - -- Execute a single Scala command in the command line: - -`scala -e {{command}}` diff --git a/pages.cn/common/scheme.md b/pages.cn/common/scheme.md deleted file mode 100644 index 2d2c2b5ea..000000000 --- a/pages.cn/common/scheme.md +++ /dev/null @@ -1,23 +0,0 @@ -# scheme - -> MIT Scheme language interperter and REPL (interactive shell). - -- Open an interactive shell (REPL): - -`scheme` - -- Run a scheme program (with no REPL output): - -`scheme --quiet < {{script.scm}}` - -- Load a scheme program into the REPL: - -`scheme --load {{script.scm}}` - -- Load scheme expressions into the REPL: - -`scheme --eval {{"(define foo 'x)"}}` - -- Open the REPL in quiet mode: - -`scheme --quiet` diff --git a/pages.cn/common/scp.md b/pages.cn/common/scp.md deleted file mode 100644 index 3c1de2207..000000000 --- a/pages.cn/common/scp.md +++ /dev/null @@ -1,28 +0,0 @@ -# scp - -> Secure copy. -> Copy files between hosts using Secure Copy Protocol over SSH. - -- Copy a local file to a remote host: - -`scp {{path/to/local_file}} {{remote_host}}:{{path/to/remote_file}}` - -- Copy a file from a remote host to a local folder: - -`scp {{remote_host}}:{{path/to/remote_file}} {{path/to/local_dir}}` - -- Recursively copy the contents of a directory from a remote host to a local directory: - -`scp -r {{remote_host}}:{{path/to/remote_dir}} {{path/to/local_dir}}` - -- Copy a file between two remote hosts transferring through the local host: - -`scp -3 {{host1}}:{{path/to/remote_file}} {{host2}}:{{path/to/remote_dir}}` - -- Use a specific username when connecting to the remote host: - -`scp {{path/to/local_file}} {{remote_username}}@{{remote_host}}:{{path/to/remote_dir}}` - -- Use a specific ssh private key for authentication with the remote host: - -`scp -i {{~/.ssh/private_key}} {{local_file}} {{remote_host}}:{{/path/remote_file}}` diff --git a/pages.cn/common/scrapy.md b/pages.cn/common/scrapy.md deleted file mode 100644 index ed22f8c11..000000000 --- a/pages.cn/common/scrapy.md +++ /dev/null @@ -1,31 +0,0 @@ -# scrapy - -> Web-crawling framework. - -- Create a project: - -`scrapy startproject {{project_name}}` - -- Create a spider (in project directory): - -`scrapy genspider {{spider_name}} {{website_domain}}` - -- Edit spider (in project directory): - -`scrapy edit {{spider_name}}` - -- Run spider (in project directory): - -`scrapy crawl {{spider_name}}` - -- Fetch a webpage as scrapy sees it and print source in stdout: - -`scrapy fetch {{url}}` - -- Open a webpage in the default browser as scrapy sees it (disable javascript for extra fidelity): - -`scrapy view {{url}}` - -- Open scrapy shell for url, which allows interaction with the page source in python shell (or ipython if available): - -`scrapy shell {{url}}` diff --git a/pages.cn/common/screen.md b/pages.cn/common/screen.md deleted file mode 100644 index f775ee76b..000000000 --- a/pages.cn/common/screen.md +++ /dev/null @@ -1,31 +0,0 @@ -# screen - -> Hold a session open on a remote server. Manage multiple windows with a single SSH connection. - -- Start a new screen session: - -`screen` - -- Start a new named screen session: - -`screen -S {{session_name}}` - -- Start a new daemon and log the output to screenlog.x: - -`screen -dmLS {{session_name}} {{command}}` - -- Show open screen sessions: - -`screen -ls` - -- Reattach to an open screen: - -`screen -r {{session_name}}` - -- Detach from inside a screen: - -`Ctrl + A, D` - -- Kill a detached screen: - -`screen -X -S {{session_name}} quit` diff --git a/pages.cn/common/screenfetch.md b/pages.cn/common/screenfetch.md deleted file mode 100644 index 38ad88153..000000000 --- a/pages.cn/common/screenfetch.md +++ /dev/null @@ -1,23 +0,0 @@ -# screenfetch - -> Display system information. - -- Start screenfetch: - -`screenfetch` - -- Take a screenshot (requires 'scrot'): - -`screenfetch -s` - -- Specify distribution logo: - -`screenfetch -A '{{distribution_name}}'` - -- Specify distribution logo and text: - -`screenfetch -D '{{distribution_name}}'` - -- Strip all color: - -`screenfetch -N` diff --git a/pages.cn/common/script.md b/pages.cn/common/script.md deleted file mode 100644 index 803e9b84b..000000000 --- a/pages.cn/common/script.md +++ /dev/null @@ -1,23 +0,0 @@ -# script - -> Make a typescript file of a terminal session. - -- Start recording in file named "typescript": - -`script` - -- Stop recording: - -`exit` - -- Start recording in a given file: - -`script {{logfile.log}}` - -- Append to an existing file: - -`script -a {{logfile.log}}` - -- Execute quietly without start and done messages: - -`script -q {{logfile.log}}` diff --git a/pages.cn/common/sdk.md b/pages.cn/common/sdk.md deleted file mode 100644 index de238082b..000000000 --- a/pages.cn/common/sdk.md +++ /dev/null @@ -1,28 +0,0 @@ -# sdk - -> Tool for managing parallel versions of multiple Software Development Kits. -> Supports Java, Groovy, Scala, Kotlin, Gradle, Maven, Vert.x and many others. - -- Install a specific version of Gradle: - -`sdk install {{gradle}} {{gradle_version}}` - -- Switch to a specific version of Gradle: - -`sdk use {{gradle}} {{gradle_version}}` - -- Check current Gradle version: - -`sdk current {{gradle}}` - -- List all Software Development Kits available to install: - -`sdk list` - -- Update Gradle to the latest version: - -`sdk upgrade {{gradle}}` - -- Uninstall a particular version of Gradle: - -`sdk rm {{gradle}} {{gradle_version}}` diff --git a/pages.cn/common/sed.md b/pages.cn/common/sed.md deleted file mode 100644 index 4138cfd63..000000000 --- a/pages.cn/common/sed.md +++ /dev/null @@ -1,35 +0,0 @@ -# sed - -> Edit text in a scriptable manner. - -- Replace the first occurrence of a string in a file, and print the result: - -`sed 's/{{find}}/{{replace}}/' {{filename}}` - -- Replace all occurrences of an extended regular expression in a file: - -`sed -r 's/{{regex}}/{{replace}}/g' {{filename}}` - -- Replace all occurrences of a string in a file, overwriting the file (i.e. in-place): - -`sed -i 's/{{find}}/{{replace}}/g' {{filename}}` - -- Replace only on lines matching the line pattern: - -`sed '/{{line_pattern}}/s/{{find}}/{{replace}}/' {{filename}}` - -- Delete lines matching the line pattern: - -`sed '/{{line_pattern}}/d' {{filename}}` - -- Print only text between n-th line till the next empty line: - -`sed -n '{{line_number}},/^$/p' {{filename}}` - -- Apply multiple find-replace expressions to a file: - -`sed -e 's/{{find}}/{{replace}}/' -e 's/{{find}}/{{replace}}/' {{filename}}` - -- Replace separator / by any other character not used in the find or replace patterns, e.g., #: - -`sed 's#{{find}}#{{replace}}#' {{filename}}` diff --git a/pages.cn/common/sendmail.md b/pages.cn/common/sendmail.md deleted file mode 100644 index 74d2a0b54..000000000 --- a/pages.cn/common/sendmail.md +++ /dev/null @@ -1,15 +0,0 @@ -# sendmail - -> Send email from the command line. - -- Send a message with the content of message.txt to the mail folder of local user `user_name`: - -`sendmail {{user_name}} < {{message.txt}}` - -- Send an email from you@yourdomain.com (assuming the mail server is configured for this) to test@gmail.com containing the message in `message.txt`: - -`sendmail -f {{you@yourdomain.com}} {{test@gmail.com}} < {{message.txt}}` - -- Send an email from you@yourdomain.com (assuming the mail server is configured for this) to test@gmail.com containing the file `file.zip`: - -`sendmail -f {{you@yourdomain.com}} {{test@gmail.com}} < {{file.zip}}` diff --git a/pages.cn/common/seq.md b/pages.cn/common/seq.md deleted file mode 100644 index 74eec36ff..000000000 --- a/pages.cn/common/seq.md +++ /dev/null @@ -1,19 +0,0 @@ -# seq - -> Output a sequence of numbers to stdout. - -- Sequence from 1 to 10: - -`seq 10` - -- Every 3rd number from 5 to 20: - -`seq 5 3 20` - -- Separate the output with a space instead of a newline: - -`seq -s " " 5 3 20` - -- Format output width to a minimum of 4 digits padding with zeros as necessary: - -`seq -f "%04g" 5 3 20` diff --git a/pages.cn/common/serverless.md b/pages.cn/common/serverless.md deleted file mode 100644 index 7d37c8008..000000000 --- a/pages.cn/common/serverless.md +++ /dev/null @@ -1,28 +0,0 @@ -# serverless - -> Toolkit for deploying and operating serverless architectures on AWS, Google Cloud, Azure and IBM OpenWhisk. -> Commands can be run either using the `serverless` command or it's alias, `sls`. - -- Create a serverless project: - -`serverless create` - -- Create a serverless project from a template: - -`serverless create --template {{template_name}}` - -- Deploy to a cloud provider: - -`serverless deploy` - -- Display information about a serverless project: - -`serverless info` - -- Invoke a deployed function: - -`serverless invoke -f {{function_name}}` - -- Follow the logs for a project: - -`serverless logs -t` diff --git a/pages.cn/common/set.md b/pages.cn/common/set.md deleted file mode 100644 index 7246dbf39..000000000 --- a/pages.cn/common/set.md +++ /dev/null @@ -1,19 +0,0 @@ -# set - -> Display, set or unset values of shell attributes and positional parameters. - -- Display the names and values of shell variables: - -`set` - -- Mark variables that are modified or created for export: - -`set -a` - -- Notify of job termination immediately: - -`set -b` - -- Set various options, e.g. enable `vi` style line editing: - -`set -o {{vi}}` diff --git a/pages.cn/common/sftp.md b/pages.cn/common/sftp.md deleted file mode 100644 index f8135ef65..000000000 --- a/pages.cn/common/sftp.md +++ /dev/null @@ -1,33 +0,0 @@ -# sftp - -> Secure File Transfer Program. -> Interactive program to copy files between hosts over SSH. -> For non-interactive file transfers, see `scp` or `rsync`. - -- Connect to a remote server and enter an interactive command mode: - -`sftp {{remote_user}}@{{remote_host}}` - -- Connect using an alternate port: - -`sftp -P {{remote_port}} {{remote_user}}@{{remote_host}}` - -- Transfer remote file to the local system: - -`get {{/path/remote_file}}` - -- Transfer local file to the remote system: - -`put {{/path/local_file}}` - -- Transfer remote folder to the local system recursively (works with `put` too): - -`get -R {{/path/remote_folder}}` - -- Get list of files on local machine: - -`lls` - -- Get list of files on remote machine: - -`ls` diff --git a/pages.cn/common/sh.md b/pages.cn/common/sh.md deleted file mode 100644 index 699823a3c..000000000 --- a/pages.cn/common/sh.md +++ /dev/null @@ -1,20 +0,0 @@ -# sh - -> Bourne shell. -> The standard command language interpreter. - -- Start interactive shell: - -`sh` - -- Execute a command: - -`sh -c {{command}}` - -- Run commands from a file: - -`sh {{file.sh}}` - -- Run commands from STDIN: - -`sh -s` diff --git a/pages.cn/common/sha1sum.md b/pages.cn/common/sha1sum.md deleted file mode 100644 index fbc8aeaa6..000000000 --- a/pages.cn/common/sha1sum.md +++ /dev/null @@ -1,15 +0,0 @@ -# sha1sum - -> Calculate SHA1 cryptographic checksums. - -- Calculate the SHA1 checksum for a file: - -`sha1sum {{filename1}}` - -- Calculate SHA1 checksums for multiple files: - -`sha1sum {{filename1}} {{filename2}}` - -- Read a file of SHA1 sums and verify all files have matching checksums: - -`sha1sum -c {{filename.sha1}}` diff --git a/pages.cn/common/sha224sum.md b/pages.cn/common/sha224sum.md deleted file mode 100644 index e2058e21c..000000000 --- a/pages.cn/common/sha224sum.md +++ /dev/null @@ -1,15 +0,0 @@ -# sha224sum - -> Calculate SHA224 cryptographic checksums. - -- Calculate the SHA224 checksum for a file: - -`sha224sum {{filename1}}` - -- Calculate SHA224 checksums for multiple files: - -`sha224sum {{filename1}} {{filename2}}` - -- Read a file of SHA224 sums and verify all files have matching checksums: - -`sha224sum -c {{filename.sha224}}` diff --git a/pages.cn/common/sha256sum.md b/pages.cn/common/sha256sum.md deleted file mode 100644 index 2311de372..000000000 --- a/pages.cn/common/sha256sum.md +++ /dev/null @@ -1,15 +0,0 @@ -# sha256sum - -> Calculate SHA256 cryptographic checksums. - -- Calculate the SHA256 checksum for a file: - -`sha256sum {{filename1}}` - -- Calculate SHA256 checksums for multiple files: - -`sha256sum {{filename1}} {{filename2}}` - -- Read a file of SHA256 sums and verify all files have matching checksums: - -`sha256sum -c {{filename.sha256}}` diff --git a/pages.cn/common/sha384sum.md b/pages.cn/common/sha384sum.md deleted file mode 100644 index 3dcbaba2e..000000000 --- a/pages.cn/common/sha384sum.md +++ /dev/null @@ -1,15 +0,0 @@ -# sha384sum - -> Calculate SHA384 cryptographic checksums. - -- Calculate the SHA384 checksum for a file: - -`sha384sum {{filename1}}` - -- Calculate SHA384 checksums for multiple files: - -`sha384sum {{filename1}} {{filename2}}` - -- Read a file of SHA384 sums and verify all files have matching checksums: - -`sha384sum -c {{filename.sha384}}` diff --git a/pages.cn/common/sha512sum.md b/pages.cn/common/sha512sum.md deleted file mode 100644 index c3e8efc7f..000000000 --- a/pages.cn/common/sha512sum.md +++ /dev/null @@ -1,15 +0,0 @@ -# sha512sum - -> Calculate SHA512 cryptographic checksums. - -- Calculate the SHA512 checksum for a file: - -`sha512sum {{filename1}}` - -- Calculate SHA512 checksums for multiple files: - -`sha512sum {{filename1}} {{filename2}}` - -- Read a file of SHA512 sums and verify all files have matching checksums: - -`sha512sum -c {{filename.sha512}}` diff --git a/pages.cn/common/shards.md b/pages.cn/common/shards.md deleted file mode 100644 index f6df8a8d8..000000000 --- a/pages.cn/common/shards.md +++ /dev/null @@ -1,23 +0,0 @@ -# shards - -> Dependency management tool for the Crystal language. - -- Create a skeleton shard.yml file: - -`shards init` - -- Install dependencies from a shard.yml file: - -`shards install` - -- Update all dependencies: - -`shards update` - -- List all installed dependencies: - -`shards list` - -- List version of dependency: - -`shards version {{path/to/dependency_folder}}` diff --git a/pages.cn/common/shc.md b/pages.cn/common/shc.md deleted file mode 100644 index 5303d33dd..000000000 --- a/pages.cn/common/shc.md +++ /dev/null @@ -1,19 +0,0 @@ -# shc - -> Generic shell script compiler. - -- Compile a shell script: - -`shc -f {{script}}` - -- Compile a shell script and specify an output binary file: - -`shc -f {{script}} -o {{binary}}` - -- Compile a shell script and set an expiration date for the executable: - -`shc -f {{script}} -e {{dd/mm/yyyy}}` - -- Compile a shell script and set a message to display upon expiration: - -`shc -f {{script}} -e {{dd/mm/yyyy}} -m {{"Please contact your provider"}}` diff --git a/pages.cn/common/shellcheck.md b/pages.cn/common/shellcheck.md deleted file mode 100644 index b2c729daa..000000000 --- a/pages.cn/common/shellcheck.md +++ /dev/null @@ -1,19 +0,0 @@ -# shellcheck - -> Shell script static analysis tool. - -- Check a shell script: - -`shellcheck {{file.sh}}` - -- Override script's shebang: - -`shellcheck --shell {{sh|bash|ksh}} {{file.sh}}` - -- Ignore certain errors: - -`shellcheck --exclude {{SC1009}} {{file.sh}}` - -- Ignore multiple errors: - -`shellcheck --exclude {{SC1009,SC1073}} {{file.sh}}` diff --git a/pages.cn/common/shopt.md b/pages.cn/common/shopt.md deleted file mode 100644 index 5e1d13599..000000000 --- a/pages.cn/common/shopt.md +++ /dev/null @@ -1,24 +0,0 @@ -# shopt - -> Manage Bash shell options: variables (stored in `$BASHOPTS`) that control behavior specific to the Bash shell. -> Generic POSIX shell variables (stored in `$SHELLOPTS`) are managed with the `set` command instead. - -- List of all settable options and whether they are set: - -`shopt` - -- Set an option: - -`shopt -s {{option_name}}` - -- Unset an option: - -`shopt -u {{option_name}}` - -- Print a list of all options and their status formatted as runnable `shopt` commands: - -`shopt -p` - -- Show help for the command: - -`help shopt` diff --git a/pages.cn/common/shred.md b/pages.cn/common/shred.md deleted file mode 100644 index 544a84be2..000000000 --- a/pages.cn/common/shred.md +++ /dev/null @@ -1,19 +0,0 @@ -# shred - -> Overwrite files to securely delete data. - -- Overwrite a file: - -`shred {{file}}` - -- Overwrite a file, leaving zeroes instead of random data: - -`shred --zero {{file}}` - -- Overwrite a file 25 times: - -`shred -n25 {{file}}` - -- Overwrite a file and remove it: - -`shred --remove {{file}}` diff --git a/pages.cn/common/shuf.md b/pages.cn/common/shuf.md deleted file mode 100644 index 5912275e2..000000000 --- a/pages.cn/common/shuf.md +++ /dev/null @@ -1,19 +0,0 @@ -# shuf - -> Generate random permutations. - -- Randomize the order of lines in a file and output the result: - -`shuf {{filename}}` - -- Only output the first 5 entries of the result: - -`shuf -n {{5}} {{filename}}` - -- Write the output to another file: - -`shuf {{filename}} -o {{output_filename}}` - -- Generate random numbers in range: - -`shuf -i {{1-10}}` diff --git a/pages.cn/common/singularity.md b/pages.cn/common/singularity.md deleted file mode 100644 index b5663b4e7..000000000 --- a/pages.cn/common/singularity.md +++ /dev/null @@ -1,27 +0,0 @@ -# singularity - -> Manage Singularity containers and images. - -- Download a remote image: - -`singularity pull --name {{container.simg}} {{shub://vsoch/hello-world}}` - -- Rebuild a remote image using latest Singularity image format: - -`singularity build {{container.simg}} {{docker://godlovedc/lolcow}}` - -- Start a container from an image and get a shell inside of it: - -`singularity shell {{container.simg}}` - -- Start a container from an image and run a command: - -`singularity exec {{container.simg}} {{command}}` - -- Start a container from an image and execute the internal runscript: - -`singularity run {{container.simg}}` - -- Build a singularity image from a recipe file: - -`sudo singularity build {{container.simg}} {{recipe}}` diff --git a/pages.cn/common/skicka.md b/pages.cn/common/skicka.md deleted file mode 100644 index e75d8a6db..000000000 --- a/pages.cn/common/skicka.md +++ /dev/null @@ -1,27 +0,0 @@ -# skicka - -> Manage your Google Drive. - -- Upload a file/folder to Google Drive: - -`skicka upload {{path/to/local}} {{path/to/remote}}` - -- Download a file/folder from Google Drive: - -`skicka download {{path/to/remote}} {{path/to/local}}` - -- List files: - -`skicka ls {{path/to/folder}}` - -- Show amount of space used by children folders: - -`skicka du {{path/to/parent/folder}}` - -- Create a folder: - -`skicka mkdir {{path/to/folder}}` - -- Delete a file: - -`skicka rm {{path/to/file}}` diff --git a/pages.cn/common/sl.md b/pages.cn/common/sl.md deleted file mode 100644 index 50efa461a..000000000 --- a/pages.cn/common/sl.md +++ /dev/null @@ -1,23 +0,0 @@ -# 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` - -- Make the train little: - -`sl -l` - -- Let the user exit (CTRL + C): - -`sl -e` diff --git a/pages.cn/common/slackcat.md b/pages.cn/common/slackcat.md deleted file mode 100644 index 868261ad4..000000000 --- a/pages.cn/common/slackcat.md +++ /dev/null @@ -1,19 +0,0 @@ -# slackcat - -> Utility for passing files and command output to Slack. - -- Post a file to Slack: - -`slackcat --channel {{channel_name}} {{path/to/file}}` - -- Post a file to Slack with a custom filename: - -`slackcat --channel {{channel_name}} --filename={{filename}} {{path/to/file}}` - -- Pipe command output to Slack as a text snippet: - -`{{command}} | slackcat --channel {{channel_name}} --filename={{snippet_name}}` - -- Stream command output to Slack continuously: - -`{{command}} | slackcat --channel {{channel_name}} --stream` diff --git a/pages.cn/common/sleep.md b/pages.cn/common/sleep.md deleted file mode 100644 index 2d0e8475f..000000000 --- a/pages.cn/common/sleep.md +++ /dev/null @@ -1,15 +0,0 @@ -# sleep - -> Delay for a specified amount of time. - -- Delay in seconds: - -`sleep {{seconds}}` - -- Delay in minutes: - -`sleep {{minutes}}m` - -- Delay in hours: - -`sleep {{hours}}h` diff --git a/pages.cn/common/slimrb.md b/pages.cn/common/slimrb.md deleted file mode 100644 index 975cc975b..000000000 --- a/pages.cn/common/slimrb.md +++ /dev/null @@ -1,15 +0,0 @@ -# slimrb - -> Convert Slim files to HTML. - -- Convert a Slim file to HTML: - -`slimrb {{input.slim}} {{output.html}}` - -- Convert a Slim file and output to prettified HTML: - -`slimrb --pretty {{input.slim}} {{output.html}}` - -- Convert a Slim file to ERB: - -`slimrb --erb {{input.slim}} {{output.erb}}` diff --git a/pages.cn/common/smartctl.md b/pages.cn/common/smartctl.md deleted file mode 100644 index 58e672dd3..000000000 --- a/pages.cn/common/smartctl.md +++ /dev/null @@ -1,24 +0,0 @@ -# smartctl - -> View a disk's SMART data and other information. -> See https://en.wikipedia.org/wiki/S.M.A.R.T for more information. - -- View SMART health summary: - -`sudo smartctl --health {{/dev/sda}}` - -- View device information: - -`sudo smartctl --info {{/dev/sda}}` - -- Begin a short self-test: - -`sudo smartctl --test short {{/dev/sda}}` - -- View current/last self-test status and other SMART capabilities: - -`sudo smartctl --capabilities {{/dev/sda}}` - -- View SMART self-test log (if supported): - -`sudo smartctl --log selftest {{/dev/sda}}` diff --git a/pages.cn/common/socat.md b/pages.cn/common/socat.md deleted file mode 100644 index 421b002e5..000000000 --- a/pages.cn/common/socat.md +++ /dev/null @@ -1,15 +0,0 @@ -# socat - -> Multipurpose relay (SOcket CAT). - -- Listen to a port, wait for an incoming connection and transfer data to STDIO: - -`socat - TCP-LISTEN:8080,fork` - -- Create a connection to a host and port, transfer data in STDIO to connected host: - -`socat - TCP4:www.domain.com:80` - -- Forward incoming data of a local port to another host and port: - -`socat TCP-LISTEN:80,fork TCP4:www.domain.com:80` diff --git a/pages.cn/common/sort.md b/pages.cn/common/sort.md deleted file mode 100644 index f20a49c71..000000000 --- a/pages.cn/common/sort.md +++ /dev/null @@ -1,31 +0,0 @@ -# sort - -> Sort lines of text files. - -- Sort a file in ascending order: - -`sort {{filename}}` - -- Sort a file in descending order: - -`sort -r {{filename}}` - -- Sort a file in case-insensitive way: - -`sort --ignore-case {{filename}}` - -- Sort a file using numeric rather than alphabetic order: - -`sort -n {{filename}}` - -- Sort the passwd file by the 3rd field, numerically: - -`sort -t: -k 3n /etc/passwd` - -- Sort a file preserving only unique lines: - -`sort -u {{filename}}` - -- Sort human-readable numbers (in this case the 5th field of `ls -lh`): - -`ls -lh | sort -h -k 5` diff --git a/pages.cn/common/source.md b/pages.cn/common/source.md deleted file mode 100644 index b5cbb04d8..000000000 --- a/pages.cn/common/source.md +++ /dev/null @@ -1,7 +0,0 @@ -# source - -> Execute commands from a file in the current shell. - -- Evaluate contents of a given file: - -`source {{path/to/file}}` diff --git a/pages.cn/common/sox.md b/pages.cn/common/sox.md deleted file mode 100644 index 74b062362..000000000 --- a/pages.cn/common/sox.md +++ /dev/null @@ -1,28 +0,0 @@ -# sox - -> Sound eXchange: play, record and convert audio files. -> Audio formats are identified by the extension. - -- Merge two audio files into one: - -`sox -m {{input_audiofile1}} {{input_audiofile2}} {{output_audiofile}}` - -- Trim an audio file to the specified times: - -`sox {{input_audiofile}} {{output_audiofile}} trim {{start}} {{end}}` - -- Normalize an audio file (adjust volume to the maximum peak level, without clipping): - -`sox --norm {{input_audiofile}} {{output_audiofile}}` - -- Reverse and save an audio file: - -`sox {{input_audiofile}} {{output_audiofile}} reverse` - -- Print statistical data of an audio file: - -`sox {{input_audiofile}} -n stat` - -- Increase the volume of an audio file by 2x: - -`sox -v 2.0 {{input_audiofile}} {{output_audiofile}}` diff --git a/pages.cn/common/spatial.md b/pages.cn/common/spatial.md deleted file mode 100644 index f6b525b9e..000000000 --- a/pages.cn/common/spatial.md +++ /dev/null @@ -1,35 +0,0 @@ -# spatial - -> A set of commands for managing and developing SpatialOS projects. - -- Run this when you use a project for the first time: - -`spatial worker build` - -- Build workers for local deployment on Unity on macOS: - -`spatial worker build --target=development --target=Osx` - -- Build workers for local deployment on Unreal on Windows: - -`spatial worker build --target=local --target=Windows` - -- Deploy locally: - -`spatial local launch {{launch_config}} --snapshot={{snapshot_file}}` - -- Launch a local worker to connect to your local deployment: - -`spatial local worker launch {{worker_type}} {{launch_config}}` - -- Upload an assembly to use for cloud deployments: - -`spatial cloud upload {{assembly_name}}` - -- Launch a cloud deployment: - -`spatial cloud launch {{assembly_name}} {{launch_config}} {{deployment_name}}` - -- Clean worker directories: - -`spatial worker clean` diff --git a/pages.cn/common/speedtest-cli.md b/pages.cn/common/speedtest-cli.md deleted file mode 100644 index dbcc211b0..000000000 --- a/pages.cn/common/speedtest-cli.md +++ /dev/null @@ -1,19 +0,0 @@ -# speedtest-cli - -> Command line interface for testing internet bandwidth using speedtest.net. - -- Run a speed test: - -`speedtest-cli` - -- Run a speed test and generate a shareable result picture: - -`speedtest-cli --share` - -- Print a list of all speedtest.net servers, sorted by distance, to file: - -`speedtest-cli --list > speedtest_servers.txt` - -- Run a speed test to the given speedtest.net server id: - -`speedtest-cli --server {{server_id}}` diff --git a/pages.cn/common/spike.md b/pages.cn/common/spike.md deleted file mode 100644 index 803ee9d63..000000000 --- a/pages.cn/common/spike.md +++ /dev/null @@ -1,19 +0,0 @@ -# spike - -> A fully featured static website generator written in JavaScript. - -- Create a new project using the default template: - -`spike new {{project_name}}` - -- Compile your project, watch for changes, and auto-reload the browser: - -`spike watch` - -- Compile your project once to the "public" folder: - -`spike compile` - -- Remove the output directory: - -`spike clean` diff --git a/pages.cn/common/split.md b/pages.cn/common/split.md deleted file mode 100644 index 85aeff2b9..000000000 --- a/pages.cn/common/split.md +++ /dev/null @@ -1,19 +0,0 @@ -# split - -> Split a file into pieces. - -- Split a file, each split having 10 lines (except the last split): - -`split -l {{10}} {{filename}}` - -- Split a file into 5 files. File is split such that each split has same size (except the last split): - -`split -n {{5}} {{filename}}` - -- Split a file with 512 bytes in each split (except the last split; use 512k for kilobytes and 512m for megabytes): - -`split -b {{512}} {{filename}}` - -- Split a file with at most 512 bytes in each split without breaking lines: - -`split -C {{512}} {{filename}}` diff --git a/pages.cn/common/sqlite3.md b/pages.cn/common/sqlite3.md deleted file mode 100644 index 13ac4dca6..000000000 --- a/pages.cn/common/sqlite3.md +++ /dev/null @@ -1,15 +0,0 @@ -# sqlite3 - -> The command-line interface to SQLite 3, which is a self-contained file-based embedded SQL engine. - -- Start an interactive shell with a new database: - -`sqlite3` - -- Open an interactive shell against an existing database: - -`sqlite3 {{path/to/database.sqlite3}}` - -- Execute an SQL statement against a database and then exit: - -`sqlite3 {{path/to/database.sqlite3}} '{{SELECT * FROM some_table;}}'` diff --git a/pages.cn/common/sqlmap.md b/pages.cn/common/sqlmap.md deleted file mode 100644 index aaaa48952..000000000 --- a/pages.cn/common/sqlmap.md +++ /dev/null @@ -1,23 +0,0 @@ -# sqlmap - -> Detect and exploit SQL injection flaws. - -- Run sqlmap against a single target URL: - -`python sqlmap.py -u {{"http://www.target.com/vuln.php?id=1"}}` - -- Send data in a POST request (`--data` implies POST request): - -`python sqlmap.py -u {{"http://www.target.com/vuln.php" --data={{"id=1"}}` - -- Change the parameter delimiter (& is the default): - -`python sqlmap.py -u {{"http://www.target.com/vuln.php"}} --data={{"query=foobar;id=1"}} --param-del={{";"}}` - -- Select a random `User-Agent` from `./txt/user-agents.txt` and use it: - -`python sqlmap.py -u {{"http://www.target.com/vuln.php"}} --random-agent` - -- Provide user credentials for HTTP protocol authentication: - -`python sqlmap.py -u {{"http://www.target.com/vuln.php"}} --auth-type {{Basic}} --auth-cred {{"testuser:testpass"}}` diff --git a/pages.cn/common/sqsc.md b/pages.cn/common/sqsc.md deleted file mode 100644 index a24d56568..000000000 --- a/pages.cn/common/sqsc.md +++ /dev/null @@ -1,31 +0,0 @@ -# sqsc - -> A command line AWS Simple Queue Service client. - -- List all queues: - -`sqsc lq {{queue_prefix}}` - -- List all messages in a queue: - -`sqsc ls {{queue_name}}` - -- Copy all messages from one queue to another: - -`sqsc cp {{source_queue}} {{destination_queue}}` - -- Move all messages from one queue to another: - -`sqsc mv {{source_queue}} {{destination_queue}}` - -- Describe a queue: - -`sqsc describe {{queue_name}}` - -- Query a queue with SQL syntax: - -`sqsc query "SELECT body FROM {{queue_name}} WHERE body LIKE '%user%'"` - -- Pull all messages from a queue into a local sqlite database in your present working directory: - -`sqsc pull {{queue_name}}` diff --git a/pages.cn/common/srm.md b/pages.cn/common/srm.md deleted file mode 100644 index 532c491ff..000000000 --- a/pages.cn/common/srm.md +++ /dev/null @@ -1,20 +0,0 @@ -# srm - -> Securely remove files or directories. -> Overwrites the existing data one or multiple times. Drop in replacement for rm. - -- Remove a file after a single-pass overwriting with random data: - -`srm -s {{/path/to/file}}` - -- Remove a file after seven passes of overwriting with random data: - -`srm -m {{/path/to/file}}` - -- Recursively remove a directory and its contents overwriting each file with a single-pass of random data: - -`srm -r -s {{/path/to/folder}}` - -- Prompt before every removal: - -`srm -i {{\*}}` diff --git a/pages.cn/common/ssh-copy-id.md b/pages.cn/common/ssh-copy-id.md deleted file mode 100644 index 0e92ac500..000000000 --- a/pages.cn/common/ssh-copy-id.md +++ /dev/null @@ -1,15 +0,0 @@ -# ssh-copy-id - -> Install your public key in a remote machine's authorized_keys. - -- Copy your keys to the remote machine: - -`ssh-copy-id {{username@remote_host}}` - -- 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}}` diff --git a/pages.cn/common/ssh-keygen.md b/pages.cn/common/ssh-keygen.md deleted file mode 100644 index 2b5e311c9..000000000 --- a/pages.cn/common/ssh-keygen.md +++ /dev/null @@ -1,31 +0,0 @@ -# ssh-keygen - -> Generate ssh keys user for authentication, password-less logins, and other things. - -- Generate a key interactively: - -`ssh-keygen` - -- Specify file in which to save the key: - -`ssh-keygen -f ~/.ssh/{{filename}}` - -- Generate an ed25519 key with 100 key derivation function rounds: - -`ssh-keygen -t ed25519 -a 100` - -- Generate an RSA 4096 bit key with your email as a comment: - -`ssh-keygen -t rsa -b 4096 -C "{{email}}"` - -- Retrieve the key fingerprint from a host (useful for confirming the authenticity of the host when first connecting to it via SSH): - -`ssh-keygen -l -F {{remote_host}}` - -- Retrieve the fingerprint of a key in MD5 Hex: - -`ssh-keygen -l -E md5 -f ~/.ssh/{{filename}}` - -- Change the password of a key: - -`ssh-keygen -p -f ~/.ssh/{{filename}}` diff --git a/pages.cn/common/ssh.md b/pages.cn/common/ssh.md deleted file mode 100644 index a69a37cec..000000000 --- a/pages.cn/common/ssh.md +++ /dev/null @@ -1,36 +0,0 @@ -# ssh - -> Secure Shell is a protocol used to securely log onto remote systems. -> It can be used for logging or executing commands on a remote server. - -- Connect to a remote server: - -`ssh {{username}}@{{remote_host}}` - -- Connect to a remote server with a specific identity (private key): - -`ssh -i {{path/to/key_file}} {{username}}@{{remote_host}}` - -- Connect to a remote server using a specific port: - -`ssh {{username}}@{{remote_host}} -p {{2222}}` - -- Run a command on a remote server: - -`ssh {{remote_host}} {{command -with -flags}}` - -- SSH tunneling: Dynamic port forwarding (SOCKS proxy on localhost:9999): - -`ssh -D {{9999}} -C {{username}}@{{remote_host}}` - -- SSH tunneling: Forward a specific port (localhost:9999 to slashdot.org:80) along with disabling pseudo-[t]ty allocation and executio[n] of remote commands: - -`ssh -L {{9999}}:{{slashdot.org}}:{{80}} -N -T {{username}}@{{remote_host}}` - -- SSH jumping: Connect through a jumphost to a remote server (Multiple jump hops may be specified separated by comma characters): - -`ssh -J {{username}}@{{jump_host}} {{username}}@{{remote_host}}` - -- Agent forwarding: Forward the authentication information to the remote machine (see `man ssh_config` for available options): - -`ssh -A {{username}}@{{remote_host}}` diff --git a/pages.cn/common/sshfs.md b/pages.cn/common/sshfs.md deleted file mode 100644 index b999ba8c7..000000000 --- a/pages.cn/common/sshfs.md +++ /dev/null @@ -1,23 +0,0 @@ -# sshfs - -> Filesystem client based on ssh. - -- Mount remote directory: - -`sshfs {{username}}@{{remote_host}}:{{remote_directory}} {{mountpoint}}` - -- Unmount remote directory: - -`umount {{mountpoint}}` - -- Mount remote directory from server with specific port: - -`sshfs {{username}}@{{remote_host}}:{{remote_directory}} -p {{2222}}` - -- Use compression: - -`sshfs {{username}}@{{remote_host}}:{{remote_directory}} -C` - -- Follow symbolic links: - -`sshfs -o follow_symlinks {{username}}@{{remote_host}}:{{remote_directory}} {{mountpoint}}` diff --git a/pages.cn/common/sshpass.md b/pages.cn/common/sshpass.md deleted file mode 100644 index a7de6110b..000000000 --- a/pages.cn/common/sshpass.md +++ /dev/null @@ -1,16 +0,0 @@ -# sshpass - -> An ssh password provider. -> It works by creating a TTY, feeding the password into it, and then redirecting stdin to the ssh session. - -- Connect to a remote server using a password supplied on a file descriptor (in this case, stdin): - -`sshpass -d {{0}} ssh {{user}}@{{hostname}}` - -- Connect to a remote server with the password supplied as an option, and automatically accept unknown ssh keys: - -`sshpass -p {{password}} ssh -o StrictHostKeyChecking=no {{user}}@{{hostname}}` - -- Connect to a remote server using the first line of a file as the password, automatically accept unknown ssh keys, and launch a command: - -`sshpass -f {{file}} ssh -o StrictHostKeyChecking=no {{user}}@{{hostname}} "{{command}}"` diff --git a/pages.cn/common/st-flash.md b/pages.cn/common/st-flash.md deleted file mode 100644 index 957bb8930..000000000 --- a/pages.cn/common/st-flash.md +++ /dev/null @@ -1,15 +0,0 @@ -# st-flash - -> Flash binary files to STM32 ARM Cortex microcontrollers. - -- Read 4096 bytes from the device starting from 0x8000000: - -`st-flash read {{firmware}}.bin {{0x8000000}} {{4096}}` - -- Write firmware to device starting from 0x8000000: - -`st-flash write {{firmware}}.bin {{0x8000000}}` - -- Erase firmware from device: - -`st-flash erase` diff --git a/pages.cn/common/st-info.md b/pages.cn/common/st-info.md deleted file mode 100644 index 3cfe37a40..000000000 --- a/pages.cn/common/st-info.md +++ /dev/null @@ -1,15 +0,0 @@ -# st-info - -> Provides information about connected STLink and STM32 devices. - -- Display amount of program memory available: - -`st-info --flash` - -- Display amount of sram memory available: - -`st-info --sram` - -- Display summarized information of the device: - -`st-info --probe` diff --git a/pages.cn/common/st-util.md b/pages.cn/common/st-util.md deleted file mode 100644 index 4cef470cd..000000000 --- a/pages.cn/common/st-util.md +++ /dev/null @@ -1,15 +0,0 @@ -# st-util - -> Run GDB (GNU Debugger) server to interact with STM32 ARM Cortex microcontoller. - -- Run GDB server on port 4500: - -`st-util -p {{4500}}` - -- Connect to GDB server: - -`(gdb) target extended-remote {{localhost}}:{{4500}}` - -- Write firmware to device: - -`(gdb) load {{firmware.elf}}` diff --git a/pages.cn/common/stack.md b/pages.cn/common/stack.md deleted file mode 100644 index 8134636f9..000000000 --- a/pages.cn/common/stack.md +++ /dev/null @@ -1,31 +0,0 @@ -# stack - -> Tool for managing Haskell projects. - -- Create a new project: - -`stack new {{project_name}}` - -- Install all packages needed by a project: - -`stack install` - -- Compile a project: - -`stack build` - -- Run tests inside a project: - -`stack test` - -- Compile a project and re-compile every time a file changes: - -`stack build --file-watch` - -- Compile a project and execute a command after compilation: - -`stack build --exec "{{command}}"` - -- Run a program and pass an argument to it: - -`stack exec {{program_name}} -- {{argument}}` diff --git a/pages.cn/common/standard.md b/pages.cn/common/standard.md deleted file mode 100644 index 10c2ccd9f..000000000 --- a/pages.cn/common/standard.md +++ /dev/null @@ -1,31 +0,0 @@ -# standard - -> The JavaScript Standard Style tool for linting and fixing JavaScript code. - -- Lint all JavaScript source files in the current directory: - -`standard` - -- Lint specific JavaScript file(s): - -`standard {{path/to/file(s)}}` - -- Apply automatic fixes during linting: - -`standard --fix` - -- Declare any available global variables: - -`standard --global {{variable}}` - -- Use a custom ESLint plugin when linting: - -`standard --plugin {{plugin}}` - -- Use a custom JS parser when linting: - -`standard --parser {{parser}}` - -- Use a custom ESLint environment when linting: - -`standard --env {{environment}}` diff --git a/pages.cn/common/stat.md b/pages.cn/common/stat.md deleted file mode 100644 index 734d28873..000000000 --- a/pages.cn/common/stat.md +++ /dev/null @@ -1,27 +0,0 @@ -# stat - -> Display file and filesystem information. - -- Show file properties such as size, permissions, creation and access dates among others: - -`stat {{file}}` - -- Same as above but in a more concise way: - -`stat -t {{file}}` - -- Show filesystem information: - -`stat -f {{file}}` - -- Show only octal file permissions: - -`stat -c "%a %n" {{file}}` - -- Show owner and group of the file: - -`stat -c "%U %G" {{file}}` - -- Show the size of the file in bytes: - -`stat -c "%s %n" {{file}}` diff --git a/pages.cn/common/stdbuf.md b/pages.cn/common/stdbuf.md deleted file mode 100644 index 33886266a..000000000 --- a/pages.cn/common/stdbuf.md +++ /dev/null @@ -1,15 +0,0 @@ -# stdbuf - -> Run a command with modified buffering operations for its standard streams. - -- Change the standard input buffer size to 512 KiB: - -`stderr --input={{512K}} {{command}}` - -- Change the standard output buffer to line-buffered: - -`stdbuf --output={{L}} {{command}}` - -- Change the standard error buffer to unbuffered: - -`stdbuf --error={{0}} {{command}}` diff --git a/pages.cn/common/stolonctl.md b/pages.cn/common/stolonctl.md deleted file mode 100644 index 24a639e7a..000000000 --- a/pages.cn/common/stolonctl.md +++ /dev/null @@ -1,19 +0,0 @@ -# Stolon - -> A cloud native PostgreSQL manager for PostgreSQL high availability. - -- Get cluster status: - -`stolonctl --cluster-name {{cluster_name}} --store-backend {{store_backend}} --store-endpoints {{store_endpoints}} status` - -- Get cluster data: - -`stolonctl --cluster-name {{cluster_name}} --store-backend {{store_backend}} --store-endpoints {{store_endpoints}} clusterdata` - -- Get cluster specification: - -`stolonctl --cluster-name {{cluster_name}} --store-backend {{store_backend}} --store-endpoints {{store_endpoints}} spec` - -- Update cluster specification with a patch in json format: - -`stolonctl --cluster-name {{cluster_name}} --store-backend {{store_backend}} --store-endpoints {{store_endpoints}} update --patch '{{cluster_spec}}'` diff --git a/pages.cn/common/stow.md b/pages.cn/common/stow.md deleted file mode 100644 index a89e0163e..000000000 --- a/pages.cn/common/stow.md +++ /dev/null @@ -1,24 +0,0 @@ -# stow - -> Symlink manager. -> Often used to manage dotfiles. - -- Symlink all files recursively to a given directory: - -`stow --target={{path/to/target_directory}} {{file1 folder1 file2 folder2}}` - -- Delete symlinks recursively from a given directory: - -`stow --delete --target={{path/to/target_directory}} {{file1 folder1 file2 folder2}}` - -- Simulate to see what the result would be like: - -`stow --simulate --target={{path/to/target_directory}} {{file1 folder1 file2 folder2}}` - -- Delete and resymlink: - -`stow --restow --target={{path/to/target_directory}} {{file1 folder1 file2 folder2}}` - -- Exclude files matching a regular expression: - -`stow --ignore={{regex}} --target={{path/to/target_directory}} {{file1 folder1 file2 folder2}}` diff --git a/pages.cn/common/strings.md b/pages.cn/common/strings.md deleted file mode 100644 index d430d3b97..000000000 --- a/pages.cn/common/strings.md +++ /dev/null @@ -1,19 +0,0 @@ -# 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}}` diff --git a/pages.cn/common/stty.md b/pages.cn/common/stty.md deleted file mode 100644 index 51a85fee3..000000000 --- a/pages.cn/common/stty.md +++ /dev/null @@ -1,23 +0,0 @@ -# stty - -> Set options for a terminal device interface. - -- Display all settings for the current terminal: - -`stty -a` - -- Set the number of rows: - -`stty rows {{rows}}` - -- Set the number of columns: - -`stty cols {{cols}}` - -- Get the actual transfer speed of a device: - -`stty -f {{path/to/device_file}} speed` - -- Reset all modes to reasonable values for the current terminal: - -`stty sane` diff --git a/pages.cn/common/su.md b/pages.cn/common/su.md deleted file mode 100644 index 65f167d39..000000000 --- a/pages.cn/common/su.md +++ /dev/null @@ -1,15 +0,0 @@ -# su - -> Switch shell to another user. - -- Switch to user {{username}} (password required): - -`su {{username}}` - -- Switch to superuser (admin password required): - -`su` - -- Switch to user {{username}} and simulate a full login shell: - -`su - {{username}}` diff --git a/pages.cn/common/subfinder.md b/pages.cn/common/subfinder.md deleted file mode 100644 index 7ed836f41..000000000 --- a/pages.cn/common/subfinder.md +++ /dev/null @@ -1,24 +0,0 @@ -# subfinder - -> A subdomain discovery tool that discovers valid subdomains for websites. -> Designed as a passive framework to be useful for bug bounties and safe for penetration testing. - -- Find subdomains for a specific domain: - -`subfinder -d {{example.com}}` - -- Show only the subdomains found: - -`subfinder --silent -d {{example.com}}` - -- Use bruteforcing to find subdomains: - -`subfinder -d {{example.com}} -b` - -- Remove wildcard subdomains: - -`subfinder -nW -d {{example.com}}` - -- Use a given comma-separated list of resolvers: - -`subfinder -r {{8.8.8.8}},{{1.1.1.1}} -d {{example.com}}` diff --git a/pages.cn/common/subl.md b/pages.cn/common/subl.md deleted file mode 100644 index 765c998be..000000000 --- a/pages.cn/common/subl.md +++ /dev/null @@ -1,19 +0,0 @@ -# subl - -> Sublime Text editor. - -- Open the current directory in Sublime Text: - -`subl {{.}}` - -- Open a file or directory in Sublime Text: - -`subl {{path/to/file_or_folder}}` - -- Open a file or directory in the currently open window: - -`subl -a {{path/to/file}}` - -- Open a file or directory in a new window: - -`subl -n {{path/to/file}}` diff --git a/pages.cn/common/subliminal.md b/pages.cn/common/subliminal.md deleted file mode 100644 index 46f15c281..000000000 --- a/pages.cn/common/subliminal.md +++ /dev/null @@ -1,7 +0,0 @@ -# subliminal - -> Python-based subtitle downloader. - -- Download English subtitles for a video: - -`subliminal download -l {{en}} {{video.ext}}` diff --git a/pages.cn/common/sudo.md b/pages.cn/common/sudo.md deleted file mode 100644 index 8a85014dc..000000000 --- a/pages.cn/common/sudo.md +++ /dev/null @@ -1,23 +0,0 @@ -# sudo - -> Executes a single command as the superuser or another user. - -- Run a command as the superuser: - -`sudo {{less /var/log/syslog}}` - -- Edit a file as the superuser with your default editor: - -`sudo -e {{/etc/fstab}}` - -- Run a command as another user and/or group: - -`sudo -u {{user}} -g {{group}} {{id -a}}` - -- Repeat the last command prefixed with "sudo" (only in bash, zsh, etc.): - -`sudo !!` - -- Launch the default shell with superuser privileges: - -`sudo -i` diff --git a/pages.cn/common/sum.md b/pages.cn/common/sum.md deleted file mode 100644 index 23ee6817a..000000000 --- a/pages.cn/common/sum.md +++ /dev/null @@ -1,12 +0,0 @@ -# sum - -> Compute checksums and the number of blocks for a file. -> A predecessor to the more modern `cksum`. - -- Compute a checksum with BSD-compatible algorithm and 1024-byte blocks: - -`sum {{file}}` - -- Compute a checksum with System V-compatible algorithm and 512-byte blocks: - -`sum --sysv {{file}}` diff --git a/pages.cn/common/supervisorctl.md b/pages.cn/common/supervisorctl.md deleted file mode 100644 index 1eb5a0f3a..000000000 --- a/pages.cn/common/supervisorctl.md +++ /dev/null @@ -1,24 +0,0 @@ -# supervisorctl - -> Supervisor is a client/server system that allows its users to control a number of processes on UNIX-like operating systems. -> Supervisorctl is the command-line client piece of the supervisor which provides a shell-like interface. - -- Start/stop/restart a process: - -`supervisorctl {{start|stop|restart}} {{process_name}}` - -- Start/stop/restart all processes in a group: - -`supervisorctl {{start|stop|restart}} {{group_name}}:*` - -- Show last 100 **bytes** of process stderr: - -`supervisorctl tail -100 {{process_name}} stderr` - -- Keep displaying stdout of a process: - -`supervisorctl tail -f {{process_name}} stdout` - -- Reload process config file to add/remove processes as necessary: - -`supervisorctl update` diff --git a/pages.cn/common/supervisord.md b/pages.cn/common/supervisord.md deleted file mode 100644 index 9a58ddbce..000000000 --- a/pages.cn/common/supervisord.md +++ /dev/null @@ -1,12 +0,0 @@ -# supervisord - -> Supervisor is a client/server system for controlling some processes on UNIX-like operating systems. -> Supervisord is the server part of supervisor; it is primarily managed via a configuration file. - -- Start supervisord with specified configuration file: - -`supervisord -c {{path/to/file}}` - -- Run supervisord in the foreground: - -`supervisord -n` diff --git a/pages.cn/common/surge.md b/pages.cn/common/surge.md deleted file mode 100644 index 832a38347..000000000 --- a/pages.cn/common/surge.md +++ /dev/null @@ -1,19 +0,0 @@ -# surge - -> Simple command line web publishing. - -- Upload a new site to surge.sh: - -`surge {{path/to/my_project}}` - -- Deploy site to custom domain (note that the DNS records must point to the surge.sh subdomain): - -`surge {{path/to/my_project}} {{my_custom_domain.com}}` - -- List your surge projects: - -`surge list` - -- Remove a project: - -`surge teardown {{my_custom_domain.com}}` diff --git a/pages.cn/common/svgcleaner.md b/pages.cn/common/svgcleaner.md deleted file mode 100644 index f741c1f12..000000000 --- a/pages.cn/common/svgcleaner.md +++ /dev/null @@ -1,11 +0,0 @@ -# svgcleaner - -> SVG image optimizing utility. - -- Optimize an SVG image: - -`svgcleaner {{input.svg}} {{output.svg}}` - -- Optimize an SVG image multiple times: - -`svgcleaner --multipass {{input.svg}} {{output.svg}}` diff --git a/pages.cn/common/svgo.md b/pages.cn/common/svgo.md deleted file mode 100644 index 75a920d95..000000000 --- a/pages.cn/common/svgo.md +++ /dev/null @@ -1,36 +0,0 @@ -# svgo - -> SVG Optimizer: a Nodejs-based tool for optimizing Scalable Vector Graphics files. -> It applies a series of transformation rules (plugins), which can be toggled individually. - -- Optimize a file using the default plugins (overwrites the original file): - -`svgo {{test.svg}}` - -- Optimize a file and save the result to another file: - -`svgo {{test.svg}} {{test.min.svg}}` - -- Optimize all SVG files within a folder (overwrites the original files): - -`svgo -f {{path/to/folder/with/svg/files}}` - -- Optimize all SVG files within a folder and save the resulting files to another folder: - -`svgo -f {{path/to/input/folder}} -o {{path/to/output/folder}}` - -- Optimize SVG content passed from another command, and save the result to a file: - -`{{cat test.svg}} | svgo -i - -o {{test.min.svg}}` - -- Optimize a file and print out the result: - -`svgo {{test.svg}} -o -` - -- Optimize a file making sure a given plugin is enabled: - -`svgo --enable={{plugin_name}}` - -- Show available plugins: - -`svgo --show-plugins` diff --git a/pages.cn/common/svn.md b/pages.cn/common/svn.md deleted file mode 100644 index 192cacd3c..000000000 --- a/pages.cn/common/svn.md +++ /dev/null @@ -1,27 +0,0 @@ -# svn - -> Subversion command line client tool. - -- Check out a working copy from a repository: - -`svn co {{url/to/repository}}` - -- Bring changes from the repository into the working copy: - -`svn up` - -- Put files and directories under version control, scheduling them for addition to repository. They will be added in next commit: - -`svn add PATH...` - -- Send changes from your working copy to the repository: - -`svn ci -m {{commit log message}} {{[PATH...]}}` - -- Display changes from the last 10 revisions, showing modified files for each revision: - -`svn log -vl {{10}}` - -- Show detailed help: - -`svn help` diff --git a/pages.cn/common/swagger-codegen.md b/pages.cn/common/swagger-codegen.md deleted file mode 100644 index 851c6d632..000000000 --- a/pages.cn/common/swagger-codegen.md +++ /dev/null @@ -1,19 +0,0 @@ -# swagger-codegen - -> Generate code and documentation for your REST api from a OpenAPI/swagger definition. - -- Generate documentation and code from an OpenAPI/swagger file: - -`swagger-codegen generate -i {{swagger_file}} -l {{language}}` - -- Generate java code using the library retrofit2 and the option useRxJava2: - -`swagger-codegen generate -i {{http://petstore.swagger.io/v2/swagger.json}} -l {{java}} --library {{retrofit2}} -D{{useRxJava2}}={{true}}` - -- List available languages: - -`swagger-codegen langs` - -- Display help options for the generate command: - -`swagger-codegen help {{generate}}` diff --git a/pages.cn/common/swift.md b/pages.cn/common/swift.md deleted file mode 100644 index 6e7a4aa02..000000000 --- a/pages.cn/common/swift.md +++ /dev/null @@ -1,27 +0,0 @@ -# swift - -> Create, run and build Swift projects. - -- Invoke the interactive interpreter (REPL): - -`swift` - -- Execute a program: - -`swift {{file.swift}}` - -- Start a new project with the package manager: - -`swift package init` - -- Generate an Xcode project file: - -`swift package generate-xcodeproj` - -- Update dependencies: - -`swift package update` - -- Compile project for release: - -`swift build -c release` diff --git a/pages.cn/common/sync.md b/pages.cn/common/sync.md deleted file mode 100644 index a5faab24c..000000000 --- a/pages.cn/common/sync.md +++ /dev/null @@ -1,11 +0,0 @@ -# sync - -> Flushes all pending write operations to the appropriate disks. - -- Flush all pending write operations on all disks: - -`sync` - -- Flush all pending write operations on a single file to disk: - -`sync {{path/to/file}}` diff --git a/pages.cn/common/tabula.md b/pages.cn/common/tabula.md deleted file mode 100644 index 58d0bde68..000000000 --- a/pages.cn/common/tabula.md +++ /dev/null @@ -1,27 +0,0 @@ -# tabula - -> Extract tables from PDF files. - -- Extract all tables from a PDF to a CSV file: - -`tabula -o {{file.csv}} {{file.pdf}}` - -- Extract all tables from a PDF to a JSON file: - -`tabula --format JSON -o {{file.json}} {{file.pdf}}` - -- Extract tables from pages 1, 2, 3, and 6 of a PDF: - -`tabula --pages {{1-3,6}} {{file.pdf}}` - -- Extract tables from page 1 of a PDF, guessing which portion of the page to examine: - -`tabula --guess --pages {{1}} {{file.pdf}}` - -- Extract all tables from a PDF, using ruling lines to determine cell boundaries: - -`tabula --spreadsheet {{file.pdf}}` - -- Extract all tables from a PDF, using blank space to determine cell boundaries: - -`tabula --no-spreadsheet {{file.pdf}}` diff --git a/pages.cn/common/tac.md b/pages.cn/common/tac.md deleted file mode 100644 index cbdd9c2b1..000000000 --- a/pages.cn/common/tac.md +++ /dev/null @@ -1,11 +0,0 @@ -# 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}}` diff --git a/pages.cn/common/tail.md b/pages.cn/common/tail.md deleted file mode 100644 index 1c6f82aee..000000000 --- a/pages.cn/common/tail.md +++ /dev/null @@ -1,23 +0,0 @@ -# tail - -> Display the last part of a file. - -- Show last 'num' lines in file: - -`tail -n {{num}} {{file}}` - -- Show all file since line 'num': - -`tail -n +{{num}} {{file}}` - -- Show last 'num' bytes in file: - -`tail -c {{num}} {{file}}` - -- Keep reading file until `Ctrl + C`: - -`tail -f {{file}}` - -- Keep reading file until `Ctrl + C`, even if the file is rotated: - -`tail -F {{file}}` diff --git a/pages.cn/common/tar.md b/pages.cn/common/tar.md deleted file mode 100644 index 9e41fb040..000000000 --- a/pages.cn/common/tar.md +++ /dev/null @@ -1,36 +0,0 @@ -# tar - -> Archiving utility. -> Often combined with a compression method, such as gzip or bzip. - -- Create an archive from files: - -`tar cf {{target.tar}} {{file1 file2 file3}}` - -- Create a gzipped archive: - -`tar czf {{target.tar.gz}} {{file1 file2 file3}}` - -- Extract an archive in a target folder: - -`tar xf {{source.tar}} -C {{folder}}` - -- Extract a gzipped archive in the current directory: - -`tar xzf {{source.tar.gz}}` - -- Extract a bzipped archive in the current directory: - -`tar xjf {{source.tar.bz2}}` - -- Create a compressed archive, using archive suffix to determine the compression program: - -`tar caf {{target.tar.xz}} {{file1 file2 file3}}` - -- List the contents of a tar file: - -`tar tvf {{source.tar}}` - -- Extract files matching a pattern: - -`tar xf {{source.tar}} --wildcards {{"*.html"}}` diff --git a/pages.cn/common/task.md b/pages.cn/common/task.md deleted file mode 100644 index 8f5d5ac99..000000000 --- a/pages.cn/common/task.md +++ /dev/null @@ -1,23 +0,0 @@ -# task - -> TODO list manager. - -- Add new task: - -`task add {{thing_to_do}}` - -- List tasks: - -`task list` - -- Mark task as completed: - -`task {{task_id}} done` - -- Modify task: - -`task {{task_id}} modify {{new_thing_to_do}}` - -- Delete task: - -`task {{task_id}} delete` diff --git a/pages.cn/common/tb.md b/pages.cn/common/tb.md deleted file mode 100644 index 635ee0445..000000000 --- a/pages.cn/common/tb.md +++ /dev/null @@ -1,27 +0,0 @@ -# tb - -> CLI for managing tasks and notes across multiple boards. - -- Add a new task to a board: - -`tb --task {{task description}} @{{board_name}}` - -- Add a new note to a board: - -`tb --note {{note description}} @{{board_name}}` - -- Edit item's priority: - -`tb --priority @{{item_id}} {{priority}}` - -- Check/uncheck item: - -`tb --check {{item_id}}` - -- Archive all checked items: - -`tb --clear` - -- Move item to a board: - -`tb --move @{{item_id}} {{board_name}}` diff --git a/pages.cn/common/tcpdump.md b/pages.cn/common/tcpdump.md deleted file mode 100644 index 5eb6baca2..000000000 --- a/pages.cn/common/tcpdump.md +++ /dev/null @@ -1,35 +0,0 @@ -# tcpdump - -> Dump traffic on a network. - -- List available network interfaces: - -`tcpdump -D` - -- Capture the traffic of a specific interface: - -`tcpdump -i {{eth0}}` - -- Capture all TCP traffic showing contents (ASCII) in console: - -`tcpdump -A tcp` - -- Capture the traffic from or to a host: - -`tcpdump host {{www.example.com}}` - -- Capture the traffic from a specific interface, source, destination and destination port: - -`tcpdump -i {{eth0}} src {{192.168.1.1}} and dst {{192.168.1.2}} and dst port {{80}}` - -- Capture the traffic of a network: - -`tcpdump net {{192.168.1.0/24}}` - -- Capture all traffic except traffic over port 22 and save to a dump file: - -`tcpdump -w {{dumpfile.pcap}} not port {{22}}` - -- Read from a given dump file: - -`tcpdump -r {{dumpfile.pcap}}` diff --git a/pages.cn/common/tee.md b/pages.cn/common/tee.md deleted file mode 100644 index e29eabd21..000000000 --- a/pages.cn/common/tee.md +++ /dev/null @@ -1,19 +0,0 @@ -# tee - -> Read from standard input and write to standard output and files (or commands). - -- Copy standard input to each FILE, and also to standard output: - -`echo "example" | tee {{FILE}}` - -- Append to the given FILEs, do not overwrite: - -`echo "example" | tee -a {{FILE}}` - -- Print standard input to the terminal, and also pipe it into another program for further processing: - -`echo "example" | tee {{/dev/tty}} | {{xargs printf "[%s]"}}` - -- Create a folder called "example", count the number of characters in "example" and write "example" to the terminal: - -`echo "example" | tee >(xargs mkdir) >(wc -c)` diff --git a/pages.cn/common/telnet.md b/pages.cn/common/telnet.md deleted file mode 100644 index ba4ebcddf..000000000 --- a/pages.cn/common/telnet.md +++ /dev/null @@ -1,23 +0,0 @@ -# telnet - -> Connect to a specified port of a host using the telnet protocol. - -- Telnet to the default port of a host: - -`telnet {{host}}` - -- Telnet to a specific port of a host: - -`telnet {{ip_address}} {{port}}` - -- Exit a telnet session: - -`quit` - -- Emit the default escape character combination for terminating the session: - -`Ctrl + ]` - -- Start telnet with "x" as the session termination character: - -`telnet -e {{x}} {{ip_address}} {{port}}` diff --git a/pages.cn/common/terraform.md b/pages.cn/common/terraform.md deleted file mode 100644 index 0736cf62a..000000000 --- a/pages.cn/common/terraform.md +++ /dev/null @@ -1,19 +0,0 @@ -# terraform - -> Create and deploy infrastructure as code to cloud providers. - -- Initialize a new or existing Terraform configuration: - -`terraform init` - -- Generate and show an execution plan: - -`terraform plan` - -- Build or change infrastructure: - -`terraform apply` - -- Destroy Terraform-managed infrastructure: - -`terraform destroy` diff --git a/pages.cn/common/tesseract.md b/pages.cn/common/tesseract.md deleted file mode 100644 index 7e49b3092..000000000 --- a/pages.cn/common/tesseract.md +++ /dev/null @@ -1,23 +0,0 @@ -# tesseract - -> OCR (Optical Character Recognition) engine. - -- Recognize text in an image and save it to `output.txt` (the '.txt' extension is added automatically): - -`tesseract {{image.png}} {{output}}` - -- Specify a custom language (default is English) with an ISO 639-2 code (e.g. deu = Deutsch = German): - -`tesseract -l deu {{image.png}} {{output}}` - -- List the ISO 639-2 codes of available languages: - -`tesseract --list-langs` - -- Specify a custom page segmentation mode (default is 3): - -`tesseract -psm {{0_to_10}} {{image.png}} {{output}}` - -- List page segmentation modes and their descriptions: - -`tesseract --help-psm` diff --git a/pages.cn/common/test.md b/pages.cn/common/test.md deleted file mode 100644 index ade6a44e7..000000000 --- a/pages.cn/common/test.md +++ /dev/null @@ -1,24 +0,0 @@ -# test - -> Evaluate condition. -> If it is true, returns 0 exit status, otherwise returns 1. - -- Test if given variable is equal to given string: - -`test $MY_VAR == '/bin/zsh'` - -- Test if given variable is empty: - -`test -z $GIT_BRANCH` - -- Test if file exists: - -`test -e {{filename}}` - -- Test if directory not exists: - -`test ! -d {{path/to/directory}}` - -- If-else statement: - -`test {{condition}} && echo "true" || echo "false"` diff --git a/pages.cn/common/tig.md b/pages.cn/common/tig.md deleted file mode 100644 index eb4b4df47..000000000 --- a/pages.cn/common/tig.md +++ /dev/null @@ -1,27 +0,0 @@ -# tig - -> A text-mode interface for Git. - -- Show the sequence of commits starting from the current one in reverse chronological order: - -`tig` - -- Show the history of a specific branch: - -`tig {{branch}}` - -- Show the history of specific files or directories: - -`tig {{path1}} {{path2}} ...` - -- Show the difference between two references (such as branches or tags): - -`tig {{base_ref}}..{{compared_ref}}` - -- Display commits from all branches and stashes: - -`tig --all` - -- Start in stash view, displaying all saved stashes: - -`tig stash` diff --git a/pages.cn/common/time.md b/pages.cn/common/time.md deleted file mode 100644 index d4dd058bc..000000000 --- a/pages.cn/common/time.md +++ /dev/null @@ -1,7 +0,0 @@ -# time - -> See how long a command takes. - -- Time "ls": - -`time ls` diff --git a/pages.cn/common/timeout.md b/pages.cn/common/timeout.md deleted file mode 100644 index 642734a18..000000000 --- a/pages.cn/common/timeout.md +++ /dev/null @@ -1,11 +0,0 @@ -# timeout - -> Run a command with a time limit. - -- Run `sleep 10` and kill it, if it's running after 3 seconds: - -`timeout {{3s}} {{sleep 10}}` - -- Specify the signal to be sent to the command after the time limit expires. (By default, TERM is sent): - -`timeout --signal {{INT}} {{5s}} {{sleep 10}}` diff --git a/pages.cn/common/timew.md b/pages.cn/common/timew.md deleted file mode 100644 index c758fd223..000000000 --- a/pages.cn/common/timew.md +++ /dev/null @@ -1,23 +0,0 @@ -# timew - -> A time tracking tool used to measure the duration of activities. - -- Start a new stopwatch, giving a tag name to the activity being tracked: - -`timew start {{activity_tag}}` - -- View running stopwatches: - -`timew` - -- Stop the stopwatch with a given tag name: - -`timew stop {{activity_tag}}` - -- Stop all running stopwatches: - -`timew stop` - -- View tracked items: - -`timew summary` diff --git a/pages.cn/common/tldr.md b/pages.cn/common/tldr.md deleted file mode 100644 index 2c7b1e100..000000000 --- a/pages.cn/common/tldr.md +++ /dev/null @@ -1,7 +0,0 @@ -# tldr - -> Simplified man pages. - -- Get typical usages of a command (hint: this is how you got here!): - -`tldr {{command}}` diff --git a/pages.cn/common/tldrl.md b/pages.cn/common/tldrl.md deleted file mode 100644 index 7bee9a64a..000000000 --- a/pages.cn/common/tldrl.md +++ /dev/null @@ -1,15 +0,0 @@ -# tldrl - -> Lint and format TLDR pages. - -- Lint all pages: - -`tldrl {{pages_directory}}` - -- Format a specific page to stdout: - -`tldrl -f {{page.md}}` - -- Format all pages in place: - -`tldrl -fi {{pages_directory}}` diff --git a/pages.cn/common/tmux.md b/pages.cn/common/tmux.md deleted file mode 100644 index e37518746..000000000 --- a/pages.cn/common/tmux.md +++ /dev/null @@ -1,35 +0,0 @@ -# tmux - -> Multiplex several virtual consoles. - -- Start a new tmux session: - -`tmux` - -- Start a new named tmux session: - -`tmux new -s {{name}}` - -- List sessions: - -`tmux ls` - -- Attach to a session: - -`tmux a` - -- Attach to a named session: - -`tmux a -t {{name}}` - -- Detach from session: - -`Ctrl + B, D` - -- Kill session: - -`tmux kill-session -t {{name}}` - -- Kill session when attached: - -`Ctrl + B, x (then hit 'y' for yes)` diff --git a/pages.cn/common/tokei.md b/pages.cn/common/tokei.md deleted file mode 100644 index 2090b2d86..000000000 --- a/pages.cn/common/tokei.md +++ /dev/null @@ -1,19 +0,0 @@ -# tokei - -> A program that prints out statistics about code. - -- Get a report on the code in a folder and all subfolders: - -`tokei {{path/to/folder}}` - -- Get a report for a folder excluding `.min.js` files: - -`tokei {{path/to/folder}} -e {{*.min.js}}` - -- Print out statistics for individual files in a folder: - -`tokei {{path/to/folder}} --files` - -- Get a report for all files of type Rust and Markdown: - -`tokei {{path/to/folder}} -t={{Rust}},{{Markdown}}` diff --git a/pages.cn/common/touch.md b/pages.cn/common/touch.md deleted file mode 100644 index 87efa390c..000000000 --- a/pages.cn/common/touch.md +++ /dev/null @@ -1,15 +0,0 @@ -# touch - -> 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: - -`touch {{filename}}` - -- Set the times on a file to a specific date and time: - -`touch -t {{YYYYMMDDHHMM.SS}} {{filename}}` - -- Use the times from a file to set the times on a second file: - -`touch -r {{filename}} {{filename2}}` diff --git a/pages.cn/common/tox.md b/pages.cn/common/tox.md deleted file mode 100644 index 7794df9ea..000000000 --- a/pages.cn/common/tox.md +++ /dev/null @@ -1,24 +0,0 @@ -# tox - -> Automate Python testing across multiple Python versions. -> Use tox.ini to configure environments and test command. - -- Run tests on all test environments: - -`tox` - -- Create a tox.ini configuration: - -`tox-quickstart` - -- List the available environments: - -`tox --listenvs-all` - -- Run tests on a specific environment (e.g. python 3.6): - -`tox -e {{py36}}` - -- Force the virtual environment to be recreated: - -`tox --recreate -e {{py27}}` diff --git a/pages.cn/common/tpp.md b/pages.cn/common/tpp.md deleted file mode 100644 index 45b12bf09..000000000 --- a/pages.cn/common/tpp.md +++ /dev/null @@ -1,11 +0,0 @@ -# tpp - -> Command-Line based presentation tool. - -- View a presentation: - -`tpp {{filename}}` - -- Output a presentation: - -`tpp -t {{type}} -o {{outputname}} {{filename}}` diff --git a/pages.cn/common/tput.md b/pages.cn/common/tput.md deleted file mode 100644 index f1f9279b2..000000000 --- a/pages.cn/common/tput.md +++ /dev/null @@ -1,27 +0,0 @@ -# tput - -> View and modify terminal settings and capabilities. - -- Move the cursor to a screen location: - -`tput cup {{y_coordinate}} {{x_coordinate}}` - -- Set foreground (af) or background (ab) color: - -`tput {{setaf|setab}} {{ansi_color_code}}` - -- Show number of columns, lines, or colors: - -`tput {{cols|lines|colors}}` - -- Ring the terminal bell: - -`tput bel` - -- Reset all terminal attributes: - -`tput sgr0` - -- Enable / Disable word wrap: - -`tput {{smam|rmam}}` diff --git a/pages.cn/common/tr.md b/pages.cn/common/tr.md deleted file mode 100644 index 024d128ce..000000000 --- a/pages.cn/common/tr.md +++ /dev/null @@ -1,27 +0,0 @@ -# tr - -> Translate characters - run replacements based on single characters and character sets. - -- Replace all occurrences of a character in a file, and print the result: - -`tr {{find_characters}} {{replace_characters}} < {{filename}}` - -- Map each character of the first set to the corresponding character of the second set: - -`tr 'abcd' 'jkmn' < {{filename}}` - -- Delete all occurrences of the specified set of characters from the input: - -`tr -d '{{input_characters}}'` - -- Compress a series of identical characters to a single character: - -`tr -s '{{input_characters}}'` - -- Translate the contents of the file to upper-case and print result: - -`tr "[:lower:]" "[:upper:]" < {{filename}}` - -- Strip out non-printable characters from the file and print result: - -`tr -cd "[:print:]" < {{filename}}` diff --git a/pages.cn/common/traceroute.md b/pages.cn/common/traceroute.md deleted file mode 100644 index fc57488f5..000000000 --- a/pages.cn/common/traceroute.md +++ /dev/null @@ -1,23 +0,0 @@ -# traceroute - -> Print the route packets trace to network host. - -- Traceroute to a host: - -`traceroute {{host}}` - -- Disable IP address and host name mapping: - -`traceroute -n {{host}}` - -- Specify wait time for response: - -`traceroute -w {{0.5}} {{host}}` - -- Specify number of queries per hop: - -`traceroute -q {{5}} {{host}}` - -- Specify size in bytes of probing packet: - -`traceroute {{host}} {{42}}` diff --git a/pages.cn/common/traefik.md b/pages.cn/common/traefik.md deleted file mode 100644 index 3ea707de0..000000000 --- a/pages.cn/common/traefik.md +++ /dev/null @@ -1,19 +0,0 @@ -# traefik - -> A HTTP reverse proxy and load balancer. - -- Start server with default config: - -`traefik` - -- Start server with a custom config file: - -`traefik --c {{config_file}}.toml` - -- Start server with cluster mode enabled: - -`traefik --cluster` - -- Start server with web UI enabled: - -`traefik --web` diff --git a/pages.cn/common/trans.md b/pages.cn/common/trans.md deleted file mode 100644 index 244273cc5..000000000 --- a/pages.cn/common/trans.md +++ /dev/null @@ -1,23 +0,0 @@ -# trans - -> Translate Shell is a command-line translator. - -- Translate a word (language is detected automatically): - -`trans "{{word_or_sentence_to_translate}}"` - -- Get a brief translation: - -`trans --brief "{{word_or_sentence_to_translate}}"` - -- Translate a word into french: - -`trans :{{fr}} {{word}}` - -- Translate a word from German to English: - -`trans {{de}}:{{en}} {{Schmetterling}}` - -- Behave like a dictionary to get the meaning of a word: - -`trans -d {{word}}` diff --git a/pages.cn/common/transcode.md b/pages.cn/common/transcode.md deleted file mode 100644 index 63a83a5f2..000000000 --- a/pages.cn/common/transcode.md +++ /dev/null @@ -1,15 +0,0 @@ -# transcode - -> Transcode video and audio codecs, and convert between media formats. - -- Create stabilisation file to be able to remove camera shakes: - -`transcode -J stabilize -i {{input_file}}` - -- Remove camera shakes after creating stabilisation file, transform video using xvid: - -`transcode -J transform -i {{input_file}} -y xvid -o {{output_file}}` - -- Resize the video to 640x480 pixels and convert to MPEG4 codec using xvid: - -`transcode -Z 640x480 -i {{input_file}} -y xvid -o {{output_file}}` diff --git a/pages.cn/common/trash-cli.md b/pages.cn/common/trash-cli.md deleted file mode 100644 index 611ead3ff..000000000 --- a/pages.cn/common/trash-cli.md +++ /dev/null @@ -1,23 +0,0 @@ -# trash-cli - -> A command line interface to the trashcan APIs. - -- Trash files and directories: - -`trash-put {{file_name}}` - -- Empty the trashcan: - -`trash-empty` - -- List trashed files: - -`trash-list` - -- Restore a trashed file by choosing a number from the list that results from this command: - -`trash-restore` - -- Remove individual files from the trashcan: - -`trash-rm {{file_name}}` diff --git a/pages.cn/common/true.md b/pages.cn/common/true.md deleted file mode 100644 index cb25e15fc..000000000 --- a/pages.cn/common/true.md +++ /dev/null @@ -1,8 +0,0 @@ -# true - -> Returns a successful exit status code of 0. -> Use this with the || operator to make a command always exit with 0. - -- Return a successful exit code: - -`true` diff --git a/pages.cn/common/truncate.md b/pages.cn/common/truncate.md deleted file mode 100644 index 6112b574a..000000000 --- a/pages.cn/common/truncate.md +++ /dev/null @@ -1,15 +0,0 @@ -# truncate - -> Shrink or extend the size of a file to the specified size. - -- Set a size of 10 GB to an exsting file, or create a new file with the specified size: - -`truncate -s {{10G}} {{filename}}` - -- Extend the file size by 50M, fill with holes (which reads as zero bytes): - -`truncate -s +{{50M}} {{filename}}` - -- Shrink the file by 2GiB, by removing data from the end of file: - -`truncate -s -{{2G}} {{filename}` diff --git a/pages.cn/common/tslint.md b/pages.cn/common/tslint.md deleted file mode 100644 index dc838bd88..000000000 --- a/pages.cn/common/tslint.md +++ /dev/null @@ -1,19 +0,0 @@ -# tslint - -> A pluggable linting utility for TypeScript. - -- Create tslint config: - -`tslint --init` - -- Lint on a given set of files: - -`tslint {{filename}}.js {{filename1}}.js` - -- Fix lint issues: - -`tslint --fix` - -- Lint with the config file in the project root: - -`tslint --project {{path/to/project_root}}` diff --git a/pages.cn/common/tsort.md b/pages.cn/common/tsort.md deleted file mode 100644 index a8fafc6ed..000000000 --- a/pages.cn/common/tsort.md +++ /dev/null @@ -1,8 +0,0 @@ -# tsort - -> Perform a topological sort. -> A common use is to show the dependency order of nodes in a directed acyclic graph. - -- Perform a topological sort consistent with a partial sort per line of input separated by blanks: - -`tsort {{file}}` diff --git a/pages.cn/common/tty.md b/pages.cn/common/tty.md deleted file mode 100644 index 7ec909dbc..000000000 --- a/pages.cn/common/tty.md +++ /dev/null @@ -1,7 +0,0 @@ -# tty - -> Returns terminal name. - -- Print the file name of this terminal: - -`tty` diff --git a/pages.cn/common/ufraw-batch.md b/pages.cn/common/ufraw-batch.md deleted file mode 100644 index cfa20658a..000000000 --- a/pages.cn/common/ufraw-batch.md +++ /dev/null @@ -1,19 +0,0 @@ -# ufraw-batch - -> Convert RAW files from cameras into standard image files. - -- Simply convert RAW files to jpg: - -`ufraw-batch --out-type=jpg {{input_file(s)}}` - -- Simply convert RAW files to png: - -`ufraw-batch --out-type=png {{input_file(s)}}` - -- Extract the preview image from the raw file: - -`ufraw-batch --embedded-image {{input_file(s)}}` - -- Save the file with size up to the given maximums MAX1 and MAX2: - -`ufraw-batch --size=MAX1,MAX2 {{input_file(s)}}` diff --git a/pages.cn/common/umount.md b/pages.cn/common/umount.md deleted file mode 100644 index 710cc650f..000000000 --- a/pages.cn/common/umount.md +++ /dev/null @@ -1,16 +0,0 @@ -# umount - -> Unlink a filesystem from its mount point, making it no longer accessible. -> A filesystem cannot be unmounted when it is busy. - -- Unmount a filesystem, by passing the path to the source it is mounted from: - -`umount {{path/to/device_file}}` - -- Unmount a filesystem, by passing the path to the target where it is mounted: - -`umount {{path/to/mounted_directory}}` - -- Unmount all mounted filesystems (except the `proc` filesystem): - -`umount -a` diff --git a/pages.cn/common/uname.md b/pages.cn/common/uname.md deleted file mode 100644 index 1bc3143be..000000000 --- a/pages.cn/common/uname.md +++ /dev/null @@ -1,20 +0,0 @@ -# uname - -> Print details about the current machine and the operating system running on it. -> Note: for additional information about the operating system, try the `lsb_release` command. - -- Print hardware-related information: machine and processor: - -`uname -mp` - -- Print software-related information: operating system, release number, and version: - -`uname -srv` - -- Print the nodename (hostname) of the system: - -`uname -n` - -- Print all available system information (hardware, software, nodename): - -`uname -a` diff --git a/pages.cn/common/unar.md b/pages.cn/common/unar.md deleted file mode 100644 index e5cfcf2e7..000000000 --- a/pages.cn/common/unar.md +++ /dev/null @@ -1,23 +0,0 @@ -# unar - -> Extract contents from archive files. - -- Extract an archive to the current directory: - -`unar {{archive}}` - -- Extract an archive to the specified directory: - -`unar -o {{path/to/directory}} {{archive}}` - -- Force overwrite if files to be unpacked already exist: - -`unar -f {{archive}}` - -- Force rename if files to be unpacked already exist: - -`unar -r {{archive}}` - -- Force skip if files to be unpacked already exist: - -`unar -s {{archive}}` diff --git a/pages.cn/common/unexpand.md b/pages.cn/common/unexpand.md deleted file mode 100644 index be29d3973..000000000 --- a/pages.cn/common/unexpand.md +++ /dev/null @@ -1,23 +0,0 @@ -# unexpand - -> Convert spaces to tabs. - -- Convert blanks in each file to tabs, writing to standard output: - -`unexpand {{file}}` - -- Convert blanks to tabs, reading from standard output: - -`unexpand` - -- Convert all blanks, instead of just initial blanks: - -`unexpand -a {{file}}` - -- Convert only leading sequences of blanks (overrides -a): - -`unexpand --first-only {{file}}` - -- Have tabs a certain number of characters apart, not 8 (enables -a): - -`unexpand -t {{number}} {{file}}` diff --git a/pages.cn/common/uniq.md b/pages.cn/common/uniq.md deleted file mode 100644 index d39c0b267..000000000 --- a/pages.cn/common/uniq.md +++ /dev/null @@ -1,24 +0,0 @@ -# uniq - -> Output the unique lines from the given input or file. -> Since it does not detect repeated lines unless they are adjacent, we need to sort them first. - -- Display each line once: - -`sort {{file}} | uniq` - -- Display only unique lines: - -`sort {{file}} | uniq -u` - -- Display only duplicate lines: - -`sort {{file}} | uniq -d` - -- Display number of occurrences of each line along with that line: - -`sort {{file}} | uniq -c` - -- Display number of occurrences of each line, sorted by the most frequent: - -`sort {{file}} | uniq -c | sort -nr` diff --git a/pages.cn/common/unlink.md b/pages.cn/common/unlink.md deleted file mode 100644 index c5f796bd2..000000000 --- a/pages.cn/common/unlink.md +++ /dev/null @@ -1,8 +0,0 @@ -# unlink - -> Remove a link to a file from the filesystem. -> The file contents is lost if the link is the last one to the file. - -- Remove the specified file if it is the last link: - -`unlink {{path/to/file}}` diff --git a/pages.cn/common/unrar.md b/pages.cn/common/unrar.md deleted file mode 100644 index 30fbce9ec..000000000 --- a/pages.cn/common/unrar.md +++ /dev/null @@ -1,19 +0,0 @@ -# unrar - -> Extract RAR archives. - -- 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}}` - -- List files inside the archive file without decompressing it: - -`unrar l {{compressed.rar}}` diff --git a/pages.cn/common/unzip.md b/pages.cn/common/unzip.md deleted file mode 100644 index d3ac12e1d..000000000 --- a/pages.cn/common/unzip.md +++ /dev/null @@ -1,23 +0,0 @@ -# unzip - -> Extract compressed files in a ZIP archive. - -- Extract zip file(s) (for multiple files, separate file paths by spaces): - -`unzip {{file(s)}}` - -- Extract zip files(s) to given path: - -`unzip {{compressed_file(s)}} -d {{/path/to/put/extracted_file(s)}}` - -- List the contents of a zip file without extracting: - -`unzip -l {{file.zip}}` - -- Extract the contents of the file(s) to stdout alongside the extracted file names: - -`unzip -c {{file.zip}}` - -- Extract a zip file created in windows, containing files with non-ascii (chinese) filenames: - -`unzip -O {{gbk}} {{file.zip}}` diff --git a/pages.cn/common/uptime.md b/pages.cn/common/uptime.md deleted file mode 100644 index 3c956d01d..000000000 --- a/pages.cn/common/uptime.md +++ /dev/null @@ -1,19 +0,0 @@ -# uptime - -> Tell how long the system has been running and other information. - -- Print current time, uptime, number of logged-in users and other information: - -`uptime` - -- Show only the amount of time the system has been booted for: - -`uptime --pretty` - -- Print the date and time the system booted up at: - -`uptime --since` - -- Show version information: - -`uptime --version` diff --git a/pages.cn/common/upx.md b/pages.cn/common/upx.md deleted file mode 100644 index 826d255c7..000000000 --- a/pages.cn/common/upx.md +++ /dev/null @@ -1,15 +0,0 @@ -# upx - -> Compress or decompress executables. - -- Compress executable: - -`upx {{file}}` - -- Decompress executable: - -`upx -d {{file}}` - -- Detailed help: - -`upx --help` diff --git a/pages.cn/common/users.md b/pages.cn/common/users.md deleted file mode 100644 index 7adc2886f..000000000 --- a/pages.cn/common/users.md +++ /dev/null @@ -1,11 +0,0 @@ -# users - -> Display a list of logged in users. - -- Display a list of logged in users: - -`users` - -- Display a list of logged in users according to a specific file: - -`users {{/var/log/wmtp}}` diff --git a/pages.cn/common/vagrant.md b/pages.cn/common/vagrant.md deleted file mode 100644 index bca3d5fb1..000000000 --- a/pages.cn/common/vagrant.md +++ /dev/null @@ -1,23 +0,0 @@ -# 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` diff --git a/pages.cn/common/valgrind.md b/pages.cn/common/valgrind.md deleted file mode 100644 index 6cc7c554a..000000000 --- a/pages.cn/common/valgrind.md +++ /dev/null @@ -1,20 +0,0 @@ -# valgrind - -> Wrapper for a set of expert tools for profiling, optimizing and debugging programs. -> Commonly used tools include `memcheck`, `cachegrind`, `callgrind`, `massif`, `helgrind`, and `drd`. - -- Use the (default) Memcheck tool to show a diagnostic of memory usage by `program`: - -`valgrind {{program}}` - -- Use Memcheck to report all possible memory leaks of `program` in full detail: - -`valgrind --leak-check=full --show-leak-kinds=all {{program}}` - -- Use the Cachegrind tool to profile and log CPU cache operations of `program`: - -`valgrind --tool=cachegrind {{program}}` - -- Use the Massif tool to profile and log heap memory and stack usage of `program`: - -`valgrind --tool=massif --stacks=yes {{program}}` diff --git a/pages.cn/common/vault.md b/pages.cn/common/vault.md deleted file mode 100644 index 7202bfc66..000000000 --- a/pages.cn/common/vault.md +++ /dev/null @@ -1,27 +0,0 @@ -# vault - -> A CLI to interact with HashiCorp Vault. - -- Connect to a Vault server and initialize a new encrypted data store: - -`vault init` - -- Unseal (unlock) the vault, by providing one of the key shares needed to access the encrypted data store: - -`vault unseal {{key-share-x}}` - -- Authenticate the CLI client against the Vault server, using an authentication token: - -`vault auth {{authentication_token}}` - -- Store a new secret in the vault, using the generic back-end called "secret": - -`vault write secret/{{hello}} value={{world}}` - -- Read a value from the vault, using the generic back-end called "secret": - -`vault read secret/{{hello}}` - -- Seal (lock) the Vault server, by removing the encryption key of the data store from memory: - -`vault seal` diff --git a/pages.cn/common/vcsh.md b/pages.cn/common/vcsh.md deleted file mode 100644 index ca83d3e81..000000000 --- a/pages.cn/common/vcsh.md +++ /dev/null @@ -1,27 +0,0 @@ -# vcsh - -> Version Control System for the home directory using git repositories. - -- Initialize an (empty) repository: - -`vcsh init {{repository_name}}` - -- Clone a repository into a custom directory name: - -`vcsh clone {{git_url}} {{repository_name}}` - -- List all managed repositories: - -`vcsh list` - -- Execute a git command on a managed repository: - -`vcsh {{repository_name}} {{git_command}}` - -- Push/pull all managed repositories to/from remotes: - -`vcsh {{push|pull}}` - -- Write a custom .gitignore file for a managed repository: - -`vcsh write-gitignore {{repository_name}}` diff --git a/pages.cn/common/vegeta.md b/pages.cn/common/vegeta.md deleted file mode 100644 index a4322cd52..000000000 --- a/pages.cn/common/vegeta.md +++ /dev/null @@ -1,28 +0,0 @@ -# vegeta - -> Vegeta is both a command line utility and a library for HTTP load testing. -> See also `ab`. - -- Launch an attack lasting 30 seconds: - -`echo "{{GET https://example.com}}" | vegeta attack -duration={{30s}}` - -- Launch an attack on a server with a self-signed https certificate: - -`echo "{{GET https://example.com}}" | vegeta attack -insecure -duration={{30s}}` - -- Launch an attack with a rate of 10 requests per second: - -`echo "{{GET https://example.com}}" | vegeta attack -duration={{30s}} -rate={{10}}` - -- Launch an attack and display for a report: - -`echo "{{GET https://example.com}}" | vegeta attack -duration={{30s}} | vegeta report` - -- Launch an attack and plot the results on a graph (latency against time): - -`echo "{{GET https://example.com}}" | vegeta attack -duration={{30s}} | vegeta plot > {{path/to/results.html}}` - -- Launch an attack against multiple URLs from a file: - -`vegeta attack -duration={{30s}} -targets=requests.txt | vegeta report` diff --git a/pages.cn/common/view.md b/pages.cn/common/view.md deleted file mode 100644 index c3e846300..000000000 --- a/pages.cn/common/view.md +++ /dev/null @@ -1,8 +0,0 @@ -# view - -> A read-only version of `vim`. -> This is equivalent to `vim -R`. - -- Open a file: - -`view {{file}}` diff --git a/pages.cn/common/vim.md b/pages.cn/common/vim.md deleted file mode 100644 index 68a7afb42..000000000 --- a/pages.cn/common/vim.md +++ /dev/null @@ -1,36 +0,0 @@ -# vim - -> Vi IMproved, a programmer's text editor, provides several modes for different kinds of text manipulation. -> Pressing `i` enters edit mode. `` goes back to normal mode, which doesn't allow regular text insertion. - -- Open a file: - -`vim {{file}}` - -- Enter text editing mode (insert mode): - -`i` - -- Copy ("yank") or cut ("delete") the current line (paste it with `P`): - -`{{yy|dd}}` - -- Undo the last operation: - -`u` - -- Search for a pattern in the file (press `n`/`N` to go to next/previous match): - -`/{{search_pattern}}` - -- Perform a regex substitution in the whole file: - -`:%s/{{pattern}}/{{replacement}}/g` - -- Save (write) the file, and quit: - -`:wq` - -- Quit without saving: - -`:q!` diff --git a/pages.cn/common/vimdiff.md b/pages.cn/common/vimdiff.md deleted file mode 100644 index 096be297e..000000000 --- a/pages.cn/common/vimdiff.md +++ /dev/null @@ -1,16 +0,0 @@ -# vimdiff - -> Open up to four files in vim and show the differences between them. -> See `vim` documentation for working with files and navigating within a window. - -- Open two files and show the differences (up to four files can be compared): - -`vimdiff {{file1}} {{file2}}` - -- Open two files using a horizontal window split instead of the default vertical split: - -`vimdiff -o {{file1}} {{file2}}` - -- Move the cursor to the window on the left|right|up|down: - -`Ctrl + w {{h|l|k|j}}` diff --git a/pages.cn/common/vimtutor.md b/pages.cn/common/vimtutor.md deleted file mode 100644 index e00e6d425..000000000 --- a/pages.cn/common/vimtutor.md +++ /dev/null @@ -1,11 +0,0 @@ -# vimtutor - -> Vim tutor, teaching the basic vim commands. - -- Launch the vim tutor using the given language (en, fr, de, ...): - -`vimtutor {{language}}` - -- Exit the tutor: - -` :q ` diff --git a/pages.cn/common/virtualenv.md b/pages.cn/common/virtualenv.md deleted file mode 100644 index 7804ae6fc..000000000 --- a/pages.cn/common/virtualenv.md +++ /dev/null @@ -1,19 +0,0 @@ -# virtualenv - -> Create virtual isolated Python environments. - -- Create a new environment: - -`virtualenv {{path/to/venv}}` - -- Customize the prompt prefix: - -`virtualenv --prompt={{prompt_prefix}} {{path/to/venv}}` - -- Start (select) the environment: - -`source {{path/to/venv}}/bin/activate` - -- Stop the environment: - -`deactivate` diff --git a/pages.cn/common/visudo.md b/pages.cn/common/visudo.md deleted file mode 100644 index 724b8436f..000000000 --- a/pages.cn/common/visudo.md +++ /dev/null @@ -1,11 +0,0 @@ -# visudo - -> Safely edit the sudoers file. - -- Edit sudoers file: - -`sudo visudo` - -- Check sudoers file for errors: - -`sudo visudo -c` diff --git a/pages.cn/common/vsce.md b/pages.cn/common/vsce.md deleted file mode 100644 index 726ebcffa..000000000 --- a/pages.cn/common/vsce.md +++ /dev/null @@ -1,23 +0,0 @@ -# vsce - -> Extension manager for Visual Studio Code. - -- List all the extensions created by a publisher: - -`vsce list {{publisher}}` - -- Publish an extension as major, minor or patch version: - -`vsce publish {{major|minor|patch}}` - -- Unpublish an extension: - -`vsce unpublish {{extension_id}}` - -- Package the current working directory as .vsix file: - -`vsce package` - -- Show the metadata associated with an extension: - -`vsce show {{extension_id}}` diff --git a/pages.cn/common/vue.md b/pages.cn/common/vue.md deleted file mode 100644 index d96829bef..000000000 --- a/pages.cn/common/vue.md +++ /dev/null @@ -1,16 +0,0 @@ -# vue-cli - -> Simple CLI for scaffolding Vue.js projects. -> Official templates include: webpack, webpack-simple, browserify, browserify-simple, simple. - -- Create a new vue project: - -`vue init {{template}} {{project_name}}` - -- Create a new project with a local template: - -`vue init {{path/to/template_folder}} {{project_name}}` - -- Create project using template on GitHub: - -`vue init {{username}}/{{repo}} {{project_name}}` diff --git a/pages.cn/common/w.md b/pages.cn/common/w.md deleted file mode 100644 index 606db59b8..000000000 --- a/pages.cn/common/w.md +++ /dev/null @@ -1,12 +0,0 @@ -# w - -> Show who is logged on and what they are doing. -> Print user login, TTY, remote host, login time, idle time, current process. - -- Show logged-in users info: - -`w` - -- Show logged-in users info without a header: - -`w -h` diff --git a/pages.cn/common/w3m.md b/pages.cn/common/w3m.md deleted file mode 100644 index 63cb22cac..000000000 --- a/pages.cn/common/w3m.md +++ /dev/null @@ -1,11 +0,0 @@ -# w3m - -> A text-based web browser. - -- Open an URL: - -`w3m {{http://example.com}}` - -- Quit w3m: - -`'q' then 'y'` diff --git a/pages.cn/common/wait.md b/pages.cn/common/wait.md deleted file mode 100644 index 672f2d528..000000000 --- a/pages.cn/common/wait.md +++ /dev/null @@ -1,11 +0,0 @@ -# wait - -> Wait for a process to complete before proceeding. - -- Wait for a process to finish given its process ID (PID) and return its exit status: - -`wait {{pid}}` - -- Wait for all processes known to the invoking shell to finish: - -`wait` diff --git a/pages.cn/common/waitress-serve.md b/pages.cn/common/waitress-serve.md deleted file mode 100644 index 8eebc41fb..000000000 --- a/pages.cn/common/waitress-serve.md +++ /dev/null @@ -1,27 +0,0 @@ -# waitress-serve - -> Pure Python WSGI HTTP Server. - -- Run a Python web app: - -`waitress-serve {{import.path:wsgi_func}}` - -- Listen on port 8080 on localhost: - -`waitress-serve --listen={{localhost}}:{{8080}} {{import.path:wsgi_func}}` - -- Start waitress on a Unix socket: - -`waitress-serve --unix-socket={{path/to/socket}} {{import.path:wsgi_func}}` - -- Use 4 threads to process requests: - -`waitress-serve --threads={{4}} {{import.path:wsgifunc}}` - -- Call a factory method that returns a WSGI object: - -`waitress-serve --call {{import.path.wsgi_factory}}` - -- Set the URL scheme to https: - -`waitress-serve --url-scheme={{https}} {{import.path:wsgi_func}}` diff --git a/pages.cn/common/wasm-objdump.md b/pages.cn/common/wasm-objdump.md deleted file mode 100644 index 1741660b4..000000000 --- a/pages.cn/common/wasm-objdump.md +++ /dev/null @@ -1,19 +0,0 @@ -# wasm-objdump - -> Display information from WebAssembly binaries. - -- Display the section headers of a given binary: - -`wasm-objdump -h {{file.wasm}}` - -- Display the entire disassembled output of a given binary: - -`wasm-objdump -d {{file.wasm}}` - -- Display the details of each section: - -`wasm-objdump --details {{file.wasm}}` - -- Display the details of a given section: - -`wasm-objdump --section '{{import}}' --details {{file.wasm}}` diff --git a/pages.cn/common/wasm-opt.md b/pages.cn/common/wasm-opt.md deleted file mode 100644 index f5d9036b2..000000000 --- a/pages.cn/common/wasm-opt.md +++ /dev/null @@ -1,19 +0,0 @@ -# wasm-opt - -> Optimize WebAssembly binary files. - -- Apply default optimizations and write to a given file: - -`wasm-opt -O {{input.wasm}} -o {{output.wasm}}` - -- Apply all optimizations and write to a given file (takes more time, but generates optimal code): - -`wasm-opt -O4 {{input.wasm}} -o {{output.wasm}}` - -- Optimize a file for size: - -`wasm-opt -Oz {{input.wasm}} -o {{output.wasm}}` - -- Print the textual representation of the binary to console: - -`wasm-opt {{input.wasm}} --print` diff --git a/pages.cn/common/wasm2c.md b/pages.cn/common/wasm2c.md deleted file mode 100644 index c40ba907e..000000000 --- a/pages.cn/common/wasm2c.md +++ /dev/null @@ -1,11 +0,0 @@ -# wasm2c - -> Convert a file from the WebAssembly binary format to a C source file and header. - -- Convert a file to a C source file and header and display it to the console: - -`wasm2c {{file.wasm}}` - -- Write the output to a given file (file.h gets additionally generated): - -`wasm2c {{file.wasm}} -o {{file.c}}` diff --git a/pages.cn/common/wasm2wat.md b/pages.cn/common/wasm2wat.md deleted file mode 100644 index 230d5554a..000000000 --- a/pages.cn/common/wasm2wat.md +++ /dev/null @@ -1,11 +0,0 @@ -# wasm2wat - -> Convert a file from the WebAssembly binary format to the text format. - -- Convert a file to the text format and display it to the console: - -`wasm2wat {{file.wasm}}` - -- Write the output to a given file: - -`wasm2wat {{file.wasm}} -o {{file.wat}}` diff --git a/pages.cn/common/wat2wasm.md b/pages.cn/common/wat2wasm.md deleted file mode 100644 index fcbec72ed..000000000 --- a/pages.cn/common/wat2wasm.md +++ /dev/null @@ -1,15 +0,0 @@ -# wat2wasm - -> Convert a file from the WebAssembly text format to the binary format. - -- Parse and check a file for errors: - -`wat2wasm {{file.wat}}` - -- Write the output binary to a given file: - -`wat2wasm {{file.wat}} -o {{file.wasm}}` - -- Display simplified representation of every byte: - -`wat2wasm -v {{file.wat}}` diff --git a/pages.cn/common/watch.md b/pages.cn/common/watch.md deleted file mode 100644 index 457d45be4..000000000 --- a/pages.cn/common/watch.md +++ /dev/null @@ -1,15 +0,0 @@ -# watch - -> Execute a program periodically, showing output fullscreen. - -- Repeatedly run a command and show the result: - -`watch {{command}}` - -- Re-run a command every 60 seconds: - -`watch -n {{60}} {{command}}` - -- Monitor the contents of a directory, highlighting differences as they appear: - -`watch -d {{ls -l}}` diff --git a/pages.cn/common/wc.md b/pages.cn/common/wc.md deleted file mode 100644 index 81a0ccb1b..000000000 --- a/pages.cn/common/wc.md +++ /dev/null @@ -1,19 +0,0 @@ -# wc - -> Count words, bytes, or lines. - -- Count lines in file: - -`wc -l {{file}}` - -- Count words in file: - -`wc -w {{file}}` - -- Count characters (bytes) in file: - -`wc -c {{file}}` - -- Count characters in file (taking multi-byte character sets into account): - -`wc -m {{file}}` diff --git a/pages.cn/common/weasyprint.md b/pages.cn/common/weasyprint.md deleted file mode 100644 index 7e1115b3b..000000000 --- a/pages.cn/common/weasyprint.md +++ /dev/null @@ -1,23 +0,0 @@ -# weasyprint - -> Render HTML to PDF or PNG. - -- Render a HTML file to PDF: - -`weasyprint {{path/to/input.html}} {{path/to/output}}.pdf` - -- Render a HTML file to PNG, including an additional user stylesheet: - -`weasyprint {{path/to/input.html}} {{path/to/output}}.png --stylesheet {{path/to/stylesheet.css}}` - -- Output additional debugging information when rendering: - -`weasyprint {{path/to/input.html}} {{path/to/output}}.pdf --verbose` - -- Specify a custom resolution when outputting to PNG: - -`weasyprint {{path/to/input.html}} {{path/to/output}}.png --resolution {{300}}` - -- Specify a base url for relative urls in the input HTML file: - -`weasyprint {{path/to/input.html}} {{path/to/output}}.png --base-url {{url_or_filename}}` diff --git a/pages.cn/common/webpack.md b/pages.cn/common/webpack.md deleted file mode 100644 index af536272d..000000000 --- a/pages.cn/common/webpack.md +++ /dev/null @@ -1,19 +0,0 @@ -# webpack - -> Bundle a web project's js files and other assets into a single output file. - -- Create a single output file from an entry point file: - -`webpack {{app.js}} {{bundle.js}}` - -- Load css files too from the js file (this uses the css loader for .css files): - -`webpack {{app.js}} {{bundle.js}} --module-bind 'css=css'` - -- Pass a config file (with eg. the entry script and the output filename) and show compilation progress: - -`webpack --config {{webpack.config.js}} --progress` - -- Automatically recompile on changes to project files: - -`webpack --watch {{app.js}} {{bundle.js}}` diff --git a/pages.cn/common/wget.md b/pages.cn/common/wget.md deleted file mode 100644 index a4dda8b0d..000000000 --- a/pages.cn/common/wget.md +++ /dev/null @@ -1,36 +0,0 @@ -# wget - -> Download files from the Web. -> Supports HTTP, HTTPS, and FTP. - -- Download the contents of an URL to a file (named "foo" in this case): - -`wget {{https://example.com/foo}}` - -- Download the contents of an URL to a file (named "bar" in this case): - -`wget -O {{bar}} {{https://example.com/foo}}` - -- Download a single web page and all its resources (scripts, stylesheets, images, etc.): - -`wget --page-requisites --convert-links {{https://example.com/somepage.html}}` - -- Download a full website, with 3-second intervals between requests: - -`wget --mirror --page-requisites --convert-links --wait=3 {{https://example.com}}` - -- Download all listed files within a directory and its sub-directories (does not download embedded page elements): - -`wget --mirror --no-parent {{https://example.com/somepath/}}` - -- Download the contents of an URL via authenticated FTP: - -`wget --ftp-user={{username}} --ftp-password={{password}} {{ftp://example.com}}` - -- Continue an incomplete download: - -`wget -c {{https://example.com}}` - -- Enable quiet mode to suppress output: - -`wget -q {{https://example.com}}` diff --git a/pages.cn/common/where.md b/pages.cn/common/where.md deleted file mode 100644 index 61f6128a4..000000000 --- a/pages.cn/common/where.md +++ /dev/null @@ -1,8 +0,0 @@ -# where - -> Reports all known instances of a command. -> It could be an executable in the PATH environment variable, an alias, or a shell builtin. - -- Find all instances of a command: - -`where {{command}}` diff --git a/pages.cn/common/which.md b/pages.cn/common/which.md deleted file mode 100644 index 36d39414d..000000000 --- a/pages.cn/common/which.md +++ /dev/null @@ -1,11 +0,0 @@ -# which - -> Locate a program in the user's path. - -- Search the PATH environment variable and display the location of any matching executables: - -`which {{executable}}` - -- If there are multiple executables which match, display all: - -`which -a {{executable}}` diff --git a/pages.cn/common/while.md b/pages.cn/common/while.md deleted file mode 100644 index 066290c91..000000000 --- a/pages.cn/common/while.md +++ /dev/null @@ -1,11 +0,0 @@ -# while - -> Simple shell loop. - -- Read stdin and perform an action on every line: - -`while read line; do echo "$line"; done` - -- Execute a command forever once every second: - -`while :; do {{command}}; sleep 1; done` diff --git a/pages.cn/common/who.md b/pages.cn/common/who.md deleted file mode 100644 index 24b6ceee0..000000000 --- a/pages.cn/common/who.md +++ /dev/null @@ -1,19 +0,0 @@ -# who - -> Display who is logged in and related data (processes, boot time). - -- Display the username, line, and time of all currently logged-in sessions: - -`who` - -- Display information only for the current terminal session: - -`who am i` - -- Display all available information: - -`who -a` - -- Display all available information with table headers: - -`who -a -H` diff --git a/pages.cn/common/whoami.md b/pages.cn/common/whoami.md deleted file mode 100644 index 137fd8fed..000000000 --- a/pages.cn/common/whoami.md +++ /dev/null @@ -1,11 +0,0 @@ -# whoami - -> Print the username associated with the current effective user ID. - -- Display currently logged username: - -`whoami` - -- Display the username after a change in the user ID: - -`sudo whoami` diff --git a/pages.cn/common/wordgrinder.md b/pages.cn/common/wordgrinder.md deleted file mode 100644 index 2c60ef393..000000000 --- a/pages.cn/common/wordgrinder.md +++ /dev/null @@ -1,15 +0,0 @@ -# wordgrinder - -> Command-line word processor. - -- Start wordgrinder (loads a blank document by default): - -`wordgrinder` - -- Open a given file: - -`wordgrinder {{filename}}` - -- Show the menu: - -`Alt + M` diff --git a/pages.cn/common/wpa_supplicant.md b/pages.cn/common/wpa_supplicant.md deleted file mode 100644 index 7757bb7a5..000000000 --- a/pages.cn/common/wpa_supplicant.md +++ /dev/null @@ -1,11 +0,0 @@ -# wpa_supplicant - -> Manage protected wireless networks. - -- Join a protected wireless network: - -`wpa_supplicant -i {{interface}} -c {{path/to/wpa_supplicant_conf.conf}}` - -- Join a protected wireless network and run it in a daemon: - -`wpa_supplicant -B -i {{interface}} -c {{path/to/wpa_supplicant_conf.conf}}` diff --git a/pages.cn/common/wuzz.md b/pages.cn/common/wuzz.md deleted file mode 100644 index ca28a4448..000000000 --- a/pages.cn/common/wuzz.md +++ /dev/null @@ -1,23 +0,0 @@ -# wuzz - -> Tool to interactively inspect HTTP requests and responses. - -- Start wuzz: - -`wuzz` - -- Display help information: - -`F1` - -- Send an HTTP request: - -`Ctrl + R` - -- Switch to the next view: - -`Ctrl + J, Tab` - -- Switch to the previous view: - -`Ctrl + K, Shift + Tab` diff --git a/pages.cn/common/x_x.md b/pages.cn/common/x_x.md deleted file mode 100644 index ad99cd84f..000000000 --- a/pages.cn/common/x_x.md +++ /dev/null @@ -1,15 +0,0 @@ -# x_x - -> View Excel and CSV files from the command-line. - -- View an XLSX or CSV file: - -`x_x {{file.xlsx|file.csv}}` - -- View an XLSX or CSV file, using the first row as table headers: - -`x_x -h {{0}} {{file.xlsx|file.csv}}` - -- View a CSV file with unconventional delimiters: - -`x_x --delimiter={{';'}} --quotechar={{'|'}} {{file.csv}}` diff --git a/pages.cn/common/xargs.md b/pages.cn/common/xargs.md deleted file mode 100644 index d3a1f8466..000000000 --- a/pages.cn/common/xargs.md +++ /dev/null @@ -1,16 +0,0 @@ -# xargs - -> Execute a command with piped arguments coming from another command, a file, etc. -> The input is treated as a single block of text and split into separate arguments on spaces, tabs, newlines and end-of-file. - -- Main usage pattern: - -`{{arguments_source}} | xargs {{command}}` - -- Delete all files with a `.backup` extension. `-print0` on find uses a null character to split the files, and `-0` changes the delimiter to the null character (useful if there's whitespace in filenames): - -`find . -name {{'*.backup'}} -print0 | xargs -0 rm -v` - -- Execute the command once for each input line, replacing any occurrences of the placeholder (here marked as `_`) with the input line: - -`{{arguments_source}} | xargs -I _ {{command}} _ {{optional_extra_arguments}}` diff --git a/pages.cn/common/xcv.md b/pages.cn/common/xcv.md deleted file mode 100644 index ba7fcab4a..000000000 --- a/pages.cn/common/xcv.md +++ /dev/null @@ -1,19 +0,0 @@ -# xcv - -> Cut, copy, and paste in the command-line. - -- Cut a file: - -`xcv x {{input_file}}` - -- Copy a file: - -`xcv c {{input_file}}` - -- Paste a file: - -`xcv v {{output_file}}` - -- List files available for pasting: - -`xcv l` diff --git a/pages.cn/common/xmllint.md b/pages.cn/common/xmllint.md deleted file mode 100644 index 8dbb2767a..000000000 --- a/pages.cn/common/xmllint.md +++ /dev/null @@ -1,27 +0,0 @@ -# xmllint - -> XML parser and linter that supports XPath, a syntax for navigating XML trees. - -- Return all nodes (tags) named "foo": - -`xmllint --xpath "//{{foo}}" {{source_file.xml}}` - -- Return the contents of the first node named "foo" as a string: - -`xmllint --xpath "string(//{{foo}})" {{source_file.xml}}` - -- Return the href attribute of the second anchor element in an html file: - -`xmllint --html --xpath "string(//a[2]/@href)" webpage.xhtml` - -- Return human-readable (indented) XML from file: - -`xmllint --format {{source_file.xml}}` - -- Check that a XML file meets the requirements of its DOCTYPE declaration: - -`xmllint --valid {{source_file.xml}}` - -- Validate XML against DTD schema hosted online: - -`xmllint --dtdvalid {{URL}} {{source_file.xml}}` diff --git a/pages.cn/common/xo.md b/pages.cn/common/xo.md deleted file mode 100644 index cfc931100..000000000 --- a/pages.cn/common/xo.md +++ /dev/null @@ -1,23 +0,0 @@ -# xo - -> A pluggable zero configuration linting utility for JavaScript. - -- Lint files in "src": - -`xo` - -- Lint on a gives set of files: - -`xo {{filename}}.js {{filename1}}.js` - -- Fix lint issues: - -`xo --fix` - -- Lint with spaces as indentation instead of tabs: - -`xo --space` - -- Lint with prettier code style: - -`xo --prettier` diff --git a/pages.cn/common/xsv.md b/pages.cn/common/xsv.md deleted file mode 100644 index 115d88de1..000000000 --- a/pages.cn/common/xsv.md +++ /dev/null @@ -1,27 +0,0 @@ -# xsv - -> A fast CSV command line toolkit written in Rust. - -- Inspect the headers of a file: - -`xsv headers {{path/to/file.csv}}` - -- Count the number of entries: - -`xsv count {{path/to/file.csv}}` - -- Get an overview of the shape of entries: - -`xsv stats {{path/to/file.csv}} | xsv table` - -- Select a few columns: - -`xsv select {{column_a,column_b}} {{path/to/file.csv}}` - -- Show 10 random entries: - -`xsv sample {{10}} {{path/to/file.csv}}` - -- Join a column from one file to another: - -`xsv join --no-case {{column_a}} {{path/to/file/a.csv}} {{column_b}} {{path/to/file/b.csv}} | xsv table` diff --git a/pages.cn/common/xxd.md b/pages.cn/common/xxd.md deleted file mode 100644 index 4b6b81f43..000000000 --- a/pages.cn/common/xxd.md +++ /dev/null @@ -1,27 +0,0 @@ -# xxd - -> Create a hexadecimal representation (hexdump) from a binary file, or vice-versa. - -- Generate a hexdump from a binary file and display the output: - -`xxd {{input_file}}` - -- Generate a hexdump from a binary file and save it as a text file: - -`xxd {{input_file}} {{output_file}}` - -- Display the output with 10 columns of one octet (byte) each: - -`xxd -c {{10}} {{input_file}}` - -- Display output only upto a length of 32 bytes: - -`xxd -l {{32}} {{input_file}}` - -- Display the output in plain mode, without any gaps between the columns: - -`xxd -p {{input_file}}` - -- Revert a plaintext hexdump back into binary, and save it as a binary file: - -`xxd -r -p {{input_file}} {{output_file}}` diff --git a/pages.cn/common/xz.md b/pages.cn/common/xz.md deleted file mode 100644 index 7ab564e06..000000000 --- a/pages.cn/common/xz.md +++ /dev/null @@ -1,27 +0,0 @@ -# xz - -> Compress or decompress .xz and .lzma files. - -- Compress a file: - -`xz {{file}}` - -- Decompress a file: - -`xz -d {{file.xz}}` - -- Decompress a file and write to stdout: - -`xz -dc {{file.xz}}` - -- Compress a file, but don't delete the original: - -`xz -k {{file}}` - -- Compress a file using the fastest compression: - -`xz -0 {{file}}` - -- Compress a file using the best compression: - -`xz -9 {{file}}` diff --git a/pages.cn/common/yarn.md b/pages.cn/common/yarn.md deleted file mode 100644 index 3852b7f1c..000000000 --- a/pages.cn/common/yarn.md +++ /dev/null @@ -1,27 +0,0 @@ -# yarn - -> JavaScript and Node.js package manager alternative. - -- Install a module globally: - -`yarn global add {{module_name}}` - -- Install all dependencies referenced in the `package.json` file (the `install` is optional): - -`yarn install` - -- Install a module and save it as a dependency to the `package.json` file (add `--dev` to save as a dev dependency): - -`yarn add {{module_name}}@{{version}}` - -- Uninstall a module and remove it from the `package.json` file: - -`yarn remove {{module_name}}` - -- Interactively create a `package.json` file: - -`yarn init` - -- Identify whether a module is a dependency and list other modules that depend upon it: - -`yarn why {{module_name}}` diff --git a/pages.cn/common/yes.md b/pages.cn/common/yes.md deleted file mode 100644 index 4533c980e..000000000 --- a/pages.cn/common/yes.md +++ /dev/null @@ -1,11 +0,0 @@ -# yes - -> Output something repeatedly. - -- Repeatedly output "message": - -`yes {{message}}` - -- Repeatedly output "y": - -`yes` diff --git a/pages.cn/common/yesod.md b/pages.cn/common/yesod.md deleted file mode 100644 index b3cb5fc22..000000000 --- a/pages.cn/common/yesod.md +++ /dev/null @@ -1,24 +0,0 @@ -# yesod - -> Helper tool for Yesod, a Haskell-based web framework. -> All Yesod commands are invoked through the `stack` project manager. - -- Create a new scaffolded site, with sqlite as backend, in the "my-project" directory: - -`stack new {{my-project}} {{yesod-sqlite}}` - -- Install the Yesod CLI tool within a Yesod scaffolded site: - -`stack build yesod-bin cabal-install --install-ghc` - -- Start development server: - -`stack exec -- yesod devel` - -- Touch files with altered Template Haskell dependencies: - -`stack exec -- yesod touch` - -- Deploy application using Keter (Yesod's deployment manager): - -`stack exec -- yesod keter` diff --git a/pages.cn/common/youtube-dl.md b/pages.cn/common/youtube-dl.md deleted file mode 100644 index 3983f56ec..000000000 --- a/pages.cn/common/youtube-dl.md +++ /dev/null @@ -1,23 +0,0 @@ -# youtube-dl - -> Download videos from YouTube and other websites. - -- Download a video or playlist: - -`youtube-dl {{https://www.youtube.com/watch?v=oHg5SJYRHA0}}` - -- Download the audio from a video and convert it to an MP3: - -`youtube-dl -x --audio-format {{mp3}} {{url}}` - -- Download video(s) as MP4 files with custom filenames: - -`youtube-dl --format {{mp4}} --output {{"%(title) by %(uploader) on %(upload_date) in %(playlist).%(ext)"}} {{url}}` - -- Download a video and save its description, metadata, annotations, subtitles, and thumbnail: - -`youtube-dl --write-description --write-info-json --write-annotations --write-sub --write-thumbnail {{url}}` - -- From a playlist, download all "Let's Play" videos that aren't marked "NSFW" or age-restricted for 7 year-olds: - -`youtube-dl --match-title {{"let's play"}} --age-limit {{7}} --reject-title {{"nsfw"}} {{playlist_url}}` diff --git a/pages.cn/common/z.md b/pages.cn/common/z.md deleted file mode 100644 index fa85f7319..000000000 --- a/pages.cn/common/z.md +++ /dev/null @@ -1,27 +0,0 @@ -# z - -> Tracks the most used directories and enables quickly navigating to them using string or regex patterns. - -- Go to a directory that contains "foo" in the name: - -`z {{foo}}` - -- Go to a directory that contains "foo" and then "bar": - -`z {{foo}} {{bar}}` - -- Go to the highest-ranked directory matching "foo": - -`z -r {{foo}}` - -- Go to the most recently accessed directory matching "foo": - -`z -t {{foo}}` - -- List all directories in `z`'s database matching "foo": - -`z -l {{foo}}` - -- Remove the current directory from `z`'s database: - -`z -x .` diff --git a/pages.cn/common/zbarimg.md b/pages.cn/common/zbarimg.md deleted file mode 100644 index 0b247c997..000000000 --- a/pages.cn/common/zbarimg.md +++ /dev/null @@ -1,7 +0,0 @@ -# zbarimg - -> Scan and decode bar codes from image file(s). - -- Process an image file: - -`zbarimg {{image_file}}` diff --git a/pages.cn/common/zcat.md b/pages.cn/common/zcat.md deleted file mode 100644 index 14a0ab1cb..000000000 --- a/pages.cn/common/zcat.md +++ /dev/null @@ -1,7 +0,0 @@ -# zcat - -> Print data from gzip compressed files. - -- Print the uncompressed contents of a gzipped file to the standard output: - -`zcat {{file.txt.gz}}` diff --git a/pages.cn/common/zdb.md b/pages.cn/common/zdb.md deleted file mode 100644 index a1726c836..000000000 --- a/pages.cn/common/zdb.md +++ /dev/null @@ -1,15 +0,0 @@ -# zdb - -> ZFS debugger. - -- Show detailed configuration of all mounted ZFS zpools: - -`zdb` - -- Show detailed configuration for a specific ZFS pool: - -`zdb -C {{poolname}}` - -- Show statistics about number, size and deduplication of blocks: - -`zdb -b {{poolname}}` diff --git a/pages.cn/common/zfs.md b/pages.cn/common/zfs.md deleted file mode 100644 index a38734340..000000000 --- a/pages.cn/common/zfs.md +++ /dev/null @@ -1,27 +0,0 @@ -# zfs - -> Manage ZFS filesystems. - -- List all available zfs filesystems: - -`zfs list` - -- Create a new ZFS filesystem: - -`zfs create {{pool_name/filesystem_name}}` - -- Delete a ZFS filesystem: - -`zfs destroy {{pool_name/filesystem_name}}` - -- Create a Snapshot of a ZFS filesystem: - -`zfs snapshot {{pool_name/filesystem_name}}@{{snapshot_name}}` - -- Enable compression on a filesystem: - -`zfs set compression=on {{pool_name/filesystem_name}}` - -- Change mountpoint for a filesystem: - -`zfs set mountpoint={{/my/mount/path}} {{pool_name/filesystem_name}}` diff --git a/pages.cn/common/zip.md b/pages.cn/common/zip.md deleted file mode 100644 index e4d6c6ff0..000000000 --- a/pages.cn/common/zip.md +++ /dev/null @@ -1,35 +0,0 @@ -# zip - -> Package and compress (archive) files into zip file. - -- Package and compress a directory and its contents, [r]ecursively: - -`zip -r {{compressed.zip}} {{/path/to/dir}}` - -- E[x]clude unwanted files from being added to the compressed archive: - -`zip -r {{compressed.zip}} {{path/to/dir}} -x {{path/to/exclude}}` - -- Archive a directory and its contents with the highest level [9] of compression: - -`zip -r -{{9}} {{compressed.zip}} {{/path/to/dir}}` - -- Package and compress multiple directories and files: - -`zip -r {{compressed.zip}} {{/path/to/dir1 /path/to/dir2 /path/to/file}}` - -- Create an encrypted archive (user will be prompted for a password): - -`zip -e -r {{compressed.zip}} {{path/to/dir}}` - -- Add files to an existing zip file: - -`zip {{compressed.zip}} {{path/to/file}}` - -- Delete files from an existing zip file: - -`zip -d {{compressed.zip}} "{{foo/*.tmp}}"` - -- Archive a directory and its contents to a multi-part [s]plit zip file (e.g. 3GB parts): - -`zip -r -s {{3g}} {{compressed.zip}} {{path/to/dir}}` diff --git a/pages.cn/common/zless.md b/pages.cn/common/zless.md deleted file mode 100644 index 19188479e..000000000 --- a/pages.cn/common/zless.md +++ /dev/null @@ -1,7 +0,0 @@ -# zless - -> View compressed files. - -- Page through a compressed archive with `less`: - -`zless {{file.txt.gz}}` diff --git a/pages.cn/common/zopflipng.md b/pages.cn/common/zopflipng.md deleted file mode 100644 index c4510a41f..000000000 --- a/pages.cn/common/zopflipng.md +++ /dev/null @@ -1,11 +0,0 @@ -# zopflipng - -> PNG image compression utility. - -- Optimize a PNG image: - -`zopflipng {{input.png}} {{output.png}}` - -- Optimize several PNG images and save with given prefix: - -`zopflipng --prefix={{prefix}} {{image1.png}} {{image2.png}} {{image3.png}}` diff --git a/pages.cn/common/zpool.md b/pages.cn/common/zpool.md deleted file mode 100644 index edeecc2ff..000000000 --- a/pages.cn/common/zpool.md +++ /dev/null @@ -1,31 +0,0 @@ -# zpool - -> Manage ZFS pools. - -- Show the configuration and status of all ZFS zpools: - -`zpool status` - -- Check a ZFS pool for errors (verifies the checksum of EVERY block). Very CPU and disk intensive: - -`zpool scrub {{pool_name}}` - -- List zpools available for import: - -`zpool import` - -- Import a zpool: - -`zpool import {{pool_name}}` - -- Export a zpool (unmount all filesystems): - -`zpool export {{pool_name}}` - -- Show the history of all pool operations: - -`zpool history {{pool_name}}` - -- Create a mirrored pool: - -`zpool create {{pool_name}} mirror {{disk1}} {{disk2}} mirror {{disk3}} {{disk4}}` diff --git a/pages.cn/common/zsh.md b/pages.cn/common/zsh.md deleted file mode 100644 index aeaee72e8..000000000 --- a/pages.cn/common/zsh.md +++ /dev/null @@ -1,20 +0,0 @@ -# zsh - -> Z SHell. -> `bash` and `sh`-compatible command line interpreter. - -- Start interactive command line interpreter: - -`zsh` - -- Execute command passed as parameter: - -`zsh -c {{command}}` - -- Run commands from file (script): - -`zsh {{file}}` - -- Run commands from file and print them as they are executed: - -`zsh -x {{file}}` diff --git a/pages.cn/common/zstd.md b/pages.cn/common/zstd.md deleted file mode 100644 index f6bffaa7d..000000000 --- a/pages.cn/common/zstd.md +++ /dev/null @@ -1,23 +0,0 @@ -# zstd - -> Compress or decompress files with Zstandard compression. - -- Compress a file into a new file with the .zst suffix: - -`zstd {{file}}` - -- Decompress a file: - -`zstd -d {{file}}.zst` - -- Decompress to stdout: - -`zstd -dc {{file}}.zst` - -- Compress a file, while specifing the compression level. 0 = Worst, 19 = Best (Default level is 3): - -`zstd -{{level}} {{file}}` - -- Use more memory (both when compressing and decompressing) to achieve a higher compression ratio: - -`zstd --ultra -{{level}} {{file}}` diff --git a/pages.cn/linux/alpine.md b/pages.cn/linux/alpine.md index baf1b6ac5..fb53b7e4d 100644 --- a/pages.cn/linux/alpine.md +++ b/pages.cn/linux/alpine.md @@ -1,16 +1,16 @@ # alpine -> An email client and Usenet newsgroup program with a pico/nano-inspired interface. -> Supports most modern email services through IMAP. +> 一个电子邮件客户端和usenet新闻组程序,具有pico/nano风格的界面 +> 通过IMAP支持大多数现代电子邮件服务 -- Open alpine normally: +- 正常打开alpine: `alpine` -- Open alpine directly to the message composition screen to send an email to a given email address: +- 直接打开写信息界面,并指定了电子邮件发送地址 `alpine {{email@example.net}}` -- Quit alpine: +- 退出alpine: -`'q' then 'y'` +`'q' 然后 'y'` diff --git a/pages.cn/linux/apache2ctl.md b/pages.cn/linux/apache2ctl.md deleted file mode 100644 index 98aebbb30..000000000 --- a/pages.cn/linux/apache2ctl.md +++ /dev/null @@ -1,24 +0,0 @@ -# apache2ctl - -> The CLI tool to administrate HTTP web server Apache. -> This commmand comes with Debian based OSes, for RHEL based ones see `httpd`. - -- Start the Apache daemon. Throw a message if it is already running: - -`sudo apache2ctl start` - -- Stop the Apache daemon: - -`sudo apache2ctl stop` - -- Restart the Apache daemon: - -`sudo apache2ctl restart` - -- Test syntax of the configuration file: - -`sudo apache2ctl -t` - -- List loaded modules: - -`sudo apache2ctl -M` diff --git a/pages.cn/linux/apk.md b/pages.cn/linux/apk.md deleted file mode 100644 index b2f9324bc..000000000 --- a/pages.cn/linux/apk.md +++ /dev/null @@ -1,27 +0,0 @@ -# apk - -> Alpine Linux package management tool. - -- Update repository indexes from all remote repositories: - -`apk update` - -- Install a new package: - -`apk add {{package}}` - -- Remove a package: - -`apk del {{package}}` - -- Repair package or upgrade it without modifying main dependencies: - -`apk fix {{package}}` - -- Search package via keyword: - -`apk search {{keyword}}` - -- Get info about a specific package: - -`apk info {{package}}` diff --git a/pages.cn/linux/apt-cache.md b/pages.cn/linux/apt-cache.md deleted file mode 100644 index 2f4d3c6be..000000000 --- a/pages.cn/linux/apt-cache.md +++ /dev/null @@ -1,23 +0,0 @@ -# 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}}` - -- Show dependencies for a package: - -`apt-cache depends {{package}}` - -- Show packages that depend on a particular package: - -`apt-cache rdepends {{package}}` diff --git a/pages.cn/linux/apt-file.md b/pages.cn/linux/apt-file.md deleted file mode 100644 index 0fc9cbe32..000000000 --- a/pages.cn/linux/apt-file.md +++ /dev/null @@ -1,15 +0,0 @@ -# apt-file - -> Search for files in apt packages, including ones not yet installed. - -- Update the metadata database: - -`sudo apt update` - -- Search for packages that contain the specified file or path: - -`apt-file search {{part/of/filename}}` - -- List the contents of a specific package: - -`apt-file list {{package_name}}` diff --git a/pages.cn/linux/apt-get.md b/pages.cn/linux/apt-get.md deleted file mode 100644 index c56c27c55..000000000 --- a/pages.cn/linux/apt-get.md +++ /dev/null @@ -1,28 +0,0 @@ -# apt-get - -> Debian and Ubuntu package management utility. -> Search for packages using `apt-cache`. - -- Update the list of available packages and versions (it's recommended to run this before other `apt-get` commands): - -`apt-get update` - -- Install a package, or update it to the latest available version: - -`apt-get install {{package}}` - -- Remove a package: - -`apt-get remove {{package}}` - -- Upgrade all installed packages to their newest available versions: - -`apt-get upgrade` - -- Remove all packages that are no longer needed: - -`apt-get autoremove` - -- Upgrade installed packages (like `upgrade`), but remove obsolete packages and install additional packages to meet new dependencies: - -`apt-get dist-upgrade` diff --git a/pages.cn/linux/apt-key.md b/pages.cn/linux/apt-key.md deleted file mode 100644 index 13f7feb8a..000000000 --- a/pages.cn/linux/apt-key.md +++ /dev/null @@ -1,23 +0,0 @@ -# apt-key - -> Key management utility for the APT Package Manager on Debian and Ubuntu. - -- List trusted keys: - -`apt-key list` - -- Add a key to the trusted keystore: - -`apt-key add {{public_key_file.asc}}` - -- Delete a key from the trusted keystore: - -`apt-key del {{key_id}}` - -- Add a remote key to the trusted keystore: - -`wget -qO - {{https://host.tld/filename.key}} | apt-key add -` - -- Add a key from keyserver with only key id: - -`apt-key adv --keyserver {{pgp.mit.edu}} --recv {{KEYID}}` diff --git a/pages.cn/linux/apt-mark.md b/pages.cn/linux/apt-mark.md deleted file mode 100644 index 296d56f08..000000000 --- a/pages.cn/linux/apt-mark.md +++ /dev/null @@ -1,23 +0,0 @@ -# apt-mark - -> Utility to change the status of installed packages. - -- Mark a package as automatically installed: - -`sudo apt-mark auto {{package_name}}` - -- Hold a package at its current version and prevent updates to it: - -`sudo apt-mark hold {{package_name}}` - -- Allow a package to be updated again: - -`sudo apt-mark unhold {{package_name}}` - -- Show manually installed packages: - -`apt-mark showmanual` - -- Show held packages that aren't being updated: - -`apt-mark showhold` diff --git a/pages.cn/linux/apt.md b/pages.cn/linux/apt.md deleted file mode 100644 index 17c92aadd..000000000 --- a/pages.cn/linux/apt.md +++ /dev/null @@ -1,27 +0,0 @@ -# apt - -> Package management utility for Debian based distributions. - -- Update the list of available packages and versions (it's recommended to run this before other `apt` commands): - -`sudo apt update` - -- Search for a given package: - -`apt search {{package}}` - -- Show information for a package: - -`apt show {{package}}` - -- Install a package, or update it to the latest available version: - -`sudo apt install {{package}}` - -- Remove a package (using `purge` instead also removes its configuration files): - -`sudo apt remove {{package}}` - -- Upgrade all installed packages to their newest available versions: - -`sudo apt upgrade` diff --git a/pages.cn/linux/aptitude.md b/pages.cn/linux/aptitude.md deleted file mode 100644 index 8c8f8c53c..000000000 --- a/pages.cn/linux/aptitude.md +++ /dev/null @@ -1,27 +0,0 @@ -# aptitude - -> Debian and Ubuntu package management utility. - -- Synchronize list of packages and versions available. This should be run first, before running subsequent aptitude commands: - -`aptitude update` - -- Install a new package and its dependencies: - -`aptitude install {{package}}` - -- Search for a package: - -`aptitude search {{package}}` - -- Remove a package and all packages depending on it: - -`aptitude remove {{package}}` - -- Upgrade installed packages to newest available versions: - -`aptitude upgrade` - -- Upgrade installed packages (like `aptitude upgrade`) including removing obsolete packages and installing additional packages to meet new package dependencies: - -`aptitude full-upgrade` diff --git a/pages.cn/linux/arch.md b/pages.cn/linux/arch.md deleted file mode 100644 index 4aa9c3f07..000000000 --- a/pages.cn/linux/arch.md +++ /dev/null @@ -1,8 +0,0 @@ -# arch - -> Display the name of the system architecture. -> See also `uname`. - -- Display the system's architecture: - -`arch` diff --git a/pages.cn/linux/archey.md b/pages.cn/linux/archey.md deleted file mode 100644 index 297fcc661..000000000 --- a/pages.cn/linux/archey.md +++ /dev/null @@ -1,7 +0,0 @@ -# archey - -> Simple tool for stylishly displaying system information. - -- Show system information: - -`archey` diff --git a/pages.cn/linux/arp-scan.md b/pages.cn/linux/arp-scan.md deleted file mode 100644 index 6458744eb..000000000 --- a/pages.cn/linux/arp-scan.md +++ /dev/null @@ -1,19 +0,0 @@ -# arp-scan - -> Send ARP packets to hosts (specified as IP addresses or hostnames) to scan the local network. - -- Scan the current local network: - -`arp-scan --localnet` - -- Scan an IP network with a custom bitmask: - -`arp-scan {{192.168.1.1}}/{{24}}` - -- Scan an IP network within a custom range: - -`arp-scan {{127.0.0.0}}-{{127.0.0.31}}` - -- Scan an IP network with a custom net mask: - -`arp-scan {{10.0.0.0}}:{{255.255.255.0}}` diff --git a/pages.cn/linux/as.md b/pages.cn/linux/as.md deleted file mode 100644 index 683f797c2..000000000 --- a/pages.cn/linux/as.md +++ /dev/null @@ -1,20 +0,0 @@ -# as - -> Portable GNU assembler. -> Primarily intended to assemble output from `gcc` to be used by `ld`. - -- Assemble a file, writing the output to a.out: - -`as {{file.s}}` - -- Assemble the output to a given file: - -`as {{file.s}} -o {{out.o}}` - -- Generate output faster by skipping whitespace and comment preprocessing. (Should only be used for trusted compilers): - -`as -f {{file.s}}` - -- Include a given path to the list of directories to search for files specified in .include directives: - -`as -I {{path/to/directory}} {{file.s}}` diff --git a/pages.cn/linux/aspell.md b/pages.cn/linux/aspell.md deleted file mode 100644 index 1f91f9032..000000000 --- a/pages.cn/linux/aspell.md +++ /dev/null @@ -1,23 +0,0 @@ -# aspell - -> Interactive spell checker. - -- Spell check a single file: - -`aspell check {{path/to/file}}` - -- List mispelled words from standard input: - -`cat {{file}} | aspell list` - -- Show available dictionary languages: - -`aspell dicts` - -- Run aspell with different language (takes two letter ISO 639 language code): - -`aspell --lang={{cs}}` - -- List mispelled words from standard input and ignore words from personal word list: - -`cat {{file}} | aspell --personal={{personal-word-list.pws}} {{list}}` diff --git a/pages.cn/linux/at.md b/pages.cn/linux/at.md deleted file mode 100644 index fc72d5d3b..000000000 --- a/pages.cn/linux/at.md +++ /dev/null @@ -1,15 +0,0 @@ -# at - -> Executes commands at a specified time. - -- Open an `at` prompt to create a new set of scheduled commands, press `Ctrl + D` to save and exit: - -`at {{hh:mm:ss}}` - -- Execute the commands and email the result using a local mailing program such as sendmail: - -`at {{hh:mm:ss}} -m` - -- Execute a script at the given time: - -`at {{hh:mm:ss}} -f {{path/to/file}}` diff --git a/pages.cn/linux/authconfig.md b/pages.cn/linux/authconfig.md deleted file mode 100644 index 90ff08060..000000000 --- a/pages.cn/linux/authconfig.md +++ /dev/null @@ -1,35 +0,0 @@ -# authconfig - -> A CLI interface for configuring system authentication resources. - -- Display the current configuration (or dry run): - -`authconfig --test` - -- Configure the server to use a different password hashing algorithm: - -`authconfig --update --passalgo={{algorithm}}` - -- Enable LDAP authentication: - -`authconfig --update --enableldapauth` - -- Disable LDAP authentication: - -`authconfig --update --disableldapauth` - -- Enable Network Information Service (NIS): - -`authconfig --update --enablenis` - -- Enable Kerberos: - -`authconfig --update --enablekrb5` - -- Enable Winbind (Active Directory) authentication: - -`authconfig --update --enablewinbindauth` - -- Enable local authorization: - -`authconfig --update --enablelocauthorize` diff --git a/pages.cn/linux/autorandr.md b/pages.cn/linux/autorandr.md deleted file mode 100644 index 106fca3dd..000000000 --- a/pages.cn/linux/autorandr.md +++ /dev/null @@ -1,19 +0,0 @@ -# autorandr - -> Automatically change screen layout. - -- Save the current screen layout: - -`autorandr -s {{profile_name}}` - -- Show the saved profiles: - -`autorandr` - -- Change the profile: - -`autorandr -l {{profile_name}}` - -- Set the default profile: - -`autorandr -d {{profile_name}}` diff --git a/pages.cn/linux/beep.md b/pages.cn/linux/beep.md deleted file mode 100644 index bb3127b4f..000000000 --- a/pages.cn/linux/beep.md +++ /dev/null @@ -1,23 +0,0 @@ -# beep - -> A utility to beep the PC speaker. - -- Play a beep: - -`beep` - -- Play a beep that repeats: - -`beep -r {{repetitions}}` - -- Play a beep at a specified frequency (Hz) and duration (milliseconds): - -`beep -f {{frequency}} -l {{duration}}` - -- Play each new frequency and duration as a distinct beep: - -`beep -f {{frequency}} -l {{duration}} -n -f {{frequency}} -l {{duration}}` - -- Play the C major scale: - -`beep -f 262 -n -f 294 -n -f 330 -n -f 349 -n -f 392 -n -f 440 -n -f 494 -n -f 523` diff --git a/pages.cn/linux/bmon.md b/pages.cn/linux/bmon.md deleted file mode 100644 index 6a5dd53b9..000000000 --- a/pages.cn/linux/bmon.md +++ /dev/null @@ -1,19 +0,0 @@ -# bmon - -> Monitor bandwidth and capture network related statistics. - -- Display the list of all the interfaces: - -`bmon -a` - -- Display data transfer rates in bits per second: - -`bmon -b` - -- Set policy to define which network interface(s) is/are displayed: - -`bmon -p {{interface_1,interface_2,interface_3}}` - -- Set interval (in seconds) in which rate per counter is calculated: - -`bmon -R {{2.0}}` diff --git a/pages.cn/linux/brew.md b/pages.cn/linux/brew.md deleted file mode 100644 index fc6a4d912..000000000 --- a/pages.cn/linux/brew.md +++ /dev/null @@ -1,35 +0,0 @@ -# brew - -> The Homebrew package manager for Linux. - -- Search for available formulas: - -`brew search {{text}}` - -- Install the latest stable version of a formula (use `--devel` for development versions): - -`brew install {{formula}}` - -- List all installed formulae: - -`brew list` - -- Update an installed formula (if no formula name is given, all installed formulae are updated): - -`brew upgrade {{formula}}` - -- Fetch the newest version of Linuxbrew and all formulae from GitHub: - -`brew update` - -- Show formulae that have a more recent version available: - -`brew outdated` - -- Display information about a formula (version, installation path, dependencies, etc.): - -`brew info {{formula}}` - -- Check your Linuxbrew installation for potential problems: - -`brew doctor` diff --git a/pages.cn/linux/bzip2.md b/pages.cn/linux/bzip2.md deleted file mode 100644 index a172cc563..000000000 --- a/pages.cn/linux/bzip2.md +++ /dev/null @@ -1,15 +0,0 @@ -# bzip2 - -> A block-sorting file compressor. - -- Compress file: - -`bzip2 {{path/to/file_to_compress}}` - -- Decompress file: - -`bzip2 -d {{path/to/compressed_file.bz2}}` - -- Decompress to console: - -`bzip2 -dc {{path/to/compressed_file.bz2}}` diff --git a/pages.cn/linux/cal.md b/pages.cn/linux/cal.md deleted file mode 100644 index eb4cafffd..000000000 --- a/pages.cn/linux/cal.md +++ /dev/null @@ -1,23 +0,0 @@ -# cal - -> Prints calendar information, with the current day highlighted. - -- Display a calendar for the current month: - -`cal` - -- Display previous, current and next month: - -`cal --three` - -- Use monday as the first day of the week: - -`cal --monday` - -- Display a calendar for a specific year (4 digits): - -`cal {{year}}` - -- Display a calendar for a specific month and year: - -`cal {{month}} {{year}}` diff --git a/pages.cn/linux/calc.md b/pages.cn/linux/calc.md deleted file mode 100644 index e16afd303..000000000 --- a/pages.cn/linux/calc.md +++ /dev/null @@ -1,11 +0,0 @@ -# calc - -> An interactive arbitrary-precision calculator on the terminal. - -- Start calc in interactive mode: - -`calc` - -- Perform a calculation in non-interactive mode: - -`calc -p '{{85 * (36 / 4)}}'` diff --git a/pages.cn/linux/certbot.md b/pages.cn/linux/certbot.md deleted file mode 100644 index 833176223..000000000 --- a/pages.cn/linux/certbot.md +++ /dev/null @@ -1,28 +0,0 @@ -# certbot - -> The Let's Encrypt Agent for automatically obtaining and renewing TLS certificates. -> Successor to `letsencrypt`. - -- Obtain a new certificate via webroot authorization, but do not install it automatically: - -`sudo certbot certonly --webroot --webroot-path {{path/to/webroot}} --domain {{subdomain.example.com}}` - -- Obtain a new certificate via nginx authorization, installing the new certificate automatically: - -`sudo certbot --nginx --domain {{subdomain.example.com}}` - -- Obtain a new certificate via apache authorization, installing the new certificate automatically: - -`sudo certbot --apache --domain {{subdomain.example.com}}` - -- Renew all Let's Encrypt certificates that expire in 30 days or less (don't forget to restart any servers that use them afterwards): - -`sudo certbot renew` - -- Simulate the obtaining of a new certificate, but don't actually save any new certificates to disk: - -`sudo certbot --webroot --webroot-path {{path/to/webroot}} --domain {{subdomain.example.com}} --dry-run` - -- Obtain an untrusted test certificate instead: - -`sudo certbot --webroot --webroot-path {{path/to/webroot}} --domain {{subdomain.example.com}} --test-cert` diff --git a/pages.cn/linux/chage.md b/pages.cn/linux/chage.md deleted file mode 100644 index a05f725ac..000000000 --- a/pages.cn/linux/chage.md +++ /dev/null @@ -1,23 +0,0 @@ -# chage - -> Change user account and password expiry information. - -- List password information for the user: - -`chage -l {{user_name}}` - -- Enable password expiration in 10 days: - -`sudo chage -M {{10}} {{user_name}}` - -- Disable password expiration: - -`sudo chage -M -1 {{user_name}}` - -- Set account expiration date: - -`sudo chage -E {{YYYY-MM-DD}}` - -- Force user to change password on next log in: - -`sudo chage -d 0` diff --git a/pages.cn/linux/chattr.md b/pages.cn/linux/chattr.md deleted file mode 100644 index 694b50bb0..000000000 --- a/pages.cn/linux/chattr.md +++ /dev/null @@ -1,15 +0,0 @@ -# chattr - -> Change attributes of files or folders. - -- Make a file or folder immutable to changes and deletion, even by superuser: - -`chattr +i {{path}}` - -- Make a file or folder mutable: - -`chattr -i {{path}}` - -- Recursively make an entire folder and contents immutable: - -`chattr -R +i {{folder}}` diff --git a/pages.cn/linux/chkconfig.md b/pages.cn/linux/chkconfig.md deleted file mode 100644 index 8ce18f285..000000000 --- a/pages.cn/linux/chkconfig.md +++ /dev/null @@ -1,27 +0,0 @@ -# chkconfig - -> Manage the runlevel of services on CentOS 6. - -- List services with runlevel: - -`chkconfig --list` - -- Show a service's runlevel: - -`chkconfig --list {{ntpd}}` - -- Enable service at boot: - -`chkconfig {{sshd}} on` - -- Enable service at boot for runlevels 2, 3, 4, and 5: - -`chkconfig --level {{2345}} {{sshd}} on` - -- Disable service at boot: - -`chkconfig {{ntpd}} off` - -- Disable service at boot for runlevel 3: - -`chkconfig --level {{3}} {{ntpd}} off` diff --git a/pages.cn/linux/cmus.md b/pages.cn/linux/cmus.md deleted file mode 100644 index c7d9fb22e..000000000 --- a/pages.cn/linux/cmus.md +++ /dev/null @@ -1,24 +0,0 @@ -# cmus - -> Commandline Music Player. -> Use arrow keys to navigate, `` to select, and numbers 1-8 switch between different views. - -- Open cmus from specified directory: - -`cmus {{path/to/directory}}` - -- Add file/directory to library: - -`:add {{path/to/file_or_directory}}` - -- Pause/unpause current song: - -`c` - -- Toggle shuffle mode on/off: - -`s` - -- Quit cmus: - -`q` diff --git a/pages.cn/linux/command.md b/pages.cn/linux/command.md deleted file mode 100644 index 1cd7922d9..000000000 --- a/pages.cn/linux/command.md +++ /dev/null @@ -1,7 +0,0 @@ -# command - -> Command forces the shell to execute the program and ignore any functions, builtins and aliases with the same name. - -- Execute the ls program literally, even if an ls alias exists: - -`command {{ls}}` diff --git a/pages.cn/linux/compgen.md b/pages.cn/linux/compgen.md deleted file mode 100644 index 15e350519..000000000 --- a/pages.cn/linux/compgen.md +++ /dev/null @@ -1,23 +0,0 @@ -# compgen - -> A built-in command for auto-completion in bash, which is called on pressing TAB key twice. - -- List all commands that you could run: - -`compgen -c` - -- List all aliases: - -`compgen -a` - -- List all functions that you could run: - -`compgen -A function` - -- Show shell reserved key words: - -`compgen -k` - -- See all available commands/aliases starting with 'ls': - -`compgen -ac {{ls}}` diff --git a/pages.cn/linux/compose.md b/pages.cn/linux/compose.md deleted file mode 100644 index 84e02d54c..000000000 --- a/pages.cn/linux/compose.md +++ /dev/null @@ -1,12 +0,0 @@ -# compose - -> An alias to a `run-mailcap`'s action compose. -> Originally `run-mailcap` is used to mime-type/file. - -- Compose action can be used to compose any existing file or new on default mailcap edit tool: - -`compose {{filename}}` - -- With `run-mailcap`: - -`run-mailcap --action=compose {{filename}}` diff --git a/pages.cn/linux/conky.md b/pages.cn/linux/conky.md deleted file mode 100644 index d767be510..000000000 --- a/pages.cn/linux/conky.md +++ /dev/null @@ -1,27 +0,0 @@ -# conky - -> Light-weight system monitor for X. - -- Launch with default, built-in config: - -`conky` - -- Create a new default config: - -`conky -C > ~/.conkyrc` - -- Launch conky with a given config file: - -`conky -c {{path/to/config}}` - -- Start in the background (daemonize): - -`conky -d` - -- Align conky on the desktop: - -`conky -a {{{top,bottom,middle}_{left,right,middle}}}` - -- Pause for 5 seconds at startup before launching: - -`conky -p {{5}}` diff --git a/pages.cn/linux/cpufreq-aperf.md b/pages.cn/linux/cpufreq-aperf.md deleted file mode 100644 index f18f3e3c3..000000000 --- a/pages.cn/linux/cpufreq-aperf.md +++ /dev/null @@ -1,20 +0,0 @@ -# cpufreq-aperf - -> Calculate the average CPU frequency over a time period. -> Requires root privileges. - -- Start calculating, defaulting to all CPU cores and 1 second refresh interval: - -`sudo cpufreq-aperf` - -- Start calculating for CPU 1 only: - -`sudo cpufreq-aperf -c {{1}}` - -- Start calculating with a 3 seconds refresh interval for all CPU cores: - -`sudo cpufreq-aperf -i {{3}}` - -- Calculate only once: - -`sudo cpufreq-aperf -o` diff --git a/pages.cn/linux/cpufreq-info.md b/pages.cn/linux/cpufreq-info.md deleted file mode 100644 index af14d1a67..000000000 --- a/pages.cn/linux/cpufreq-info.md +++ /dev/null @@ -1,31 +0,0 @@ -# cpufreq-info - -> A tool to show CPU frequency information. - -- Show CPU frequency information for all CPUs: - -`cpufreq-info` - -- Show CPU frequency information for the specified CPU: - -`cpufreq-info -c {{cpu_number}}` - -- Show the allowed minimum and maximum CPU frequency: - -`cpufreq-info -l` - -- Show the current minimum and maximum CPU frequency and policy in table format: - -`cpufreq-info -o` - -- Show available CPU frequency policies: - -`cpufreq-info -g` - -- Show current CPU work frequency in a human-readable format, according to the cpufreq kernel module: - -`cpufreq-info -f -m` - -- Show current CPU work frequency in a human-readable format, by reading it from hardware (only available to root): - -`sudo cpufreq-info -w -m` diff --git a/pages.cn/linux/cpufreq-set.md b/pages.cn/linux/cpufreq-set.md deleted file mode 100644 index 57e973857..000000000 --- a/pages.cn/linux/cpufreq-set.md +++ /dev/null @@ -1,20 +0,0 @@ -# cpufreq-set - -> A tool to modify CPU frequency settings. -> The frequency value should range between the output of command `cpufreq-info -l`. - -- Set the CPU frequency policy of CPU 1 to "userspace": - -`sudo cpufreq-set -c {{1}} -g {{userspace}}` - -- Set the current minimum CPU frequency of CPU 1: - -`sudo cpufreq-set -c {{1}} --min {{min_frequency}}` - -- Set the current maximum CPU frequency of CPU 1: - -`sudo cpufreq-set -c {{1}} --max {{max_frequency}}` - -- Set the current work frequency of CPU 1: - -`sudo cpufreq-set -c {{1}} -f {{work_frequency}}` diff --git a/pages.cn/linux/cpuid.md b/pages.cn/linux/cpuid.md deleted file mode 100644 index 24d7c7273..000000000 --- a/pages.cn/linux/cpuid.md +++ /dev/null @@ -1,15 +0,0 @@ -# cpuid - -> Display detailed information about all CPUs. - -- Display information for all CPUs: - -`cpuid` - -- Display information only for the current CPU: - -`cpuid -1` - -- Display raw hex information with no decoding: - -`cpuid -r` diff --git a/pages.cn/linux/cryptsetup.md b/pages.cn/linux/cryptsetup.md deleted file mode 100644 index 5e458fd6b..000000000 --- a/pages.cn/linux/cryptsetup.md +++ /dev/null @@ -1,19 +0,0 @@ -# cryptsetup - -> Manage plain dm-crypt and LUKS (Linux Unified Key Setup) encrypted volumes. - -- Initialize a LUKS volume (overwrites all data on the partition): - -`cryptsetup luksFormat {{/dev/sda1}}` - -- Open a LUKS volume and create a decrypted mapping at /dev/mapper/{{target}}: - -`cryptsetup luksOpen {{/dev/sda1}} {{target}}` - -- Remove an existing mapping: - -`cryptsetup luksClose {{target}}` - -- Change the LUKS volume's passphrase: - -`cryptsetup luksChangeKey {{/dev/sda1}}` diff --git a/pages.cn/linux/csplit.md b/pages.cn/linux/csplit.md deleted file mode 100644 index be52a5912..000000000 --- a/pages.cn/linux/csplit.md +++ /dev/null @@ -1,24 +0,0 @@ -# csplit - -> Split a file into pieces. -> This generates files named "xx00", "xx01", and so on. - -- Split a file at lines 5 and 23: - -`csplit {{file}} {{5}} {{23}}` - -- Split a file every 5 lines (this will fail if the total number of lines is not divisible by 5): - -`csplit {{file}} {{5}} {*}` - -- Split a file every 5 lines, ignoring exact-division error: - -`csplit -k {{file}} {{5}} {*}` - -- Split a file at line 5 and use a custom prefix for the output files: - -`csplit {{file}} {{5}} -f {{prefix}}` - -- Split a file at a line matching a regular expression: - -`csplit {{file}} /{{regex}}/` diff --git a/pages.cn/linux/dash.md b/pages.cn/linux/dash.md deleted file mode 100644 index 2a85bb057..000000000 --- a/pages.cn/linux/dash.md +++ /dev/null @@ -1,20 +0,0 @@ -# dash - -> Debian Almquist Shell. -> Modern POSIX-compliant implementation of `sh` (isn't Bash compatible). - -- Start interactive shell: - -`dash` - -- Execute a command: - -`dash -c "{{command}}"` - -- Run commands from a file: - -`dash {{file.sh}}` - -- Run commands from a file, logging all commands executed to the terminal: - -`dash -x {{file.sh}}` diff --git a/pages.cn/linux/datamash.md b/pages.cn/linux/datamash.md deleted file mode 100644 index 35fe08e3e..000000000 --- a/pages.cn/linux/datamash.md +++ /dev/null @@ -1,19 +0,0 @@ -# datamash - -> Tool to perform basic numeric, textual and statistical operations on input textual data files. - -- Get max, min, mean and median of a single column of numbers: - -`seq 3 | datamash max 1 min 1 mean 1 median 1` - -- Get the mean of a single column of float numbers (floats must use "," and not "."): - -`echo -e '1.0\n2.5\n3.1\n4.3\n5.6\n5.7' | tr '.' ',' | datamash mean 1` - -- Get the mean of a single column of numbers with a given decimal precision: - -`echo -e '1\n2\n3\n4\n5\n5' | datamash -R {{number_of_decimals_wanted}} mean 1` - -- Get the mean of a single column of numbers ignoring "Na" and "NaN" (literal) strings: - -`echo -e '1\n2\nNa\n3\nNaN' | datamash --narm mean 1` diff --git a/pages.cn/linux/dbus-daemon.md b/pages.cn/linux/dbus-daemon.md deleted file mode 100644 index d8aee28db..000000000 --- a/pages.cn/linux/dbus-daemon.md +++ /dev/null @@ -1,27 +0,0 @@ -# dbus-daemon - -> The D-Bus message daemon, allowing multiple programs to exchange messages. - -- Run the daemon with a configuration file: - -`dbus-daemon --config-file {{path/to/file}}` - -- Run the daemon with the standard per-login-session message bus configuration: - -`dbus-daemon --session` - -- Run the daemon with the standard systemwide message bus configuration: - -`dbus-daemon --system` - -- Set the address to listen on and override the configuration value for it: - -`dbus-daemon --address {{address}}` - -- Output the process id to stdout: - -`dbus-daemon --print-pid` - -- Force the message bus to write to the system log for messages: - -`dbus-daemon --syslog` diff --git a/pages.cn/linux/diff3.md b/pages.cn/linux/diff3.md deleted file mode 100644 index 4f01f7d4f..000000000 --- a/pages.cn/linux/diff3.md +++ /dev/null @@ -1,11 +0,0 @@ -# diff3 - -> Compare three files line by line. - -- Compare files: - -`diff3 {{file1}} {{file2}} {{file3}}` - -- Show all changes, outlining conflicts: - -`diff3 --show-all {{file1}} {{file2}} {{file3}}` diff --git a/pages.cn/linux/disown.md b/pages.cn/linux/disown.md deleted file mode 100644 index 37e8d5165..000000000 --- a/pages.cn/linux/disown.md +++ /dev/null @@ -1,16 +0,0 @@ -# disown - -> Allow sub-processes to live beyond the shell that they are attached to. -> See also the `jobs` command. - -- Disown the current job: - -`disown` - -- Disown a specific job: - -`disown %{{job_number}}` - -- Disown all jobs: - -`disown -a` diff --git a/pages.cn/linux/dmesg.md b/pages.cn/linux/dmesg.md deleted file mode 100644 index 777214951..000000000 --- a/pages.cn/linux/dmesg.md +++ /dev/null @@ -1,23 +0,0 @@ -# dmesg - -> Write the kernel messages to standard output. - -- Show kernel messages: - -`dmesg` - -- Show kernel error messages: - -`dmesg --level err` - -- Show kernel messages and keep reading new ones, similar to `tail -f` (available in kernels 3.5.0 and newer): - -`dmesg -w` - -- Show how much physical memory is available on this system: - -`dmesg | grep -i memory` - -- Show kernel messages 1 page at a time: - -`dmesg | less` diff --git a/pages.cn/linux/dmidecode.md b/pages.cn/linux/dmidecode.md deleted file mode 100644 index f23ce42bb..000000000 --- a/pages.cn/linux/dmidecode.md +++ /dev/null @@ -1,28 +0,0 @@ -# dmidecode - -> Display the DMI (alternatively known as SMBIOS) table contents in a human-readable format. -> Requires root privileges. - -- Show all DMI table contents: - -`sudo dmidecode` - -- Show the BIOS version: - -`sudo dmidecode -s bios-version` - -- Show the system's serial number: - -`sudo dmidecode -s system-serial-number` - -- Show BIOS information: - -`sudo dmidecode -t bios` - -- Show CPU information: - -`sudo dmidecode -t processor` - -- Show memory information: - -`sudo dmidecode -t memory` diff --git a/pages.cn/linux/dnf.md b/pages.cn/linux/dnf.md deleted file mode 100644 index 8dc7f4946..000000000 --- a/pages.cn/linux/dnf.md +++ /dev/null @@ -1,19 +0,0 @@ -# dnf - -> Package management utility for RHEL, Fedora, and CentOS (replaces yum). - -- Install a new package: - -`sudo dnf install {{package}}` - -- Install a new package and assume yes to all questions: - -`sudo dnf -y install {{package}}` - -- Remove a package: - -`sudo dnf remove {{package}}` - -- Upgrade installed packages to newest available versions: - -`sudo dnf upgrade` diff --git a/pages.cn/linux/dpkg-query.md b/pages.cn/linux/dpkg-query.md deleted file mode 100644 index b6069ad9a..000000000 --- a/pages.cn/linux/dpkg-query.md +++ /dev/null @@ -1,19 +0,0 @@ -# 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}}` diff --git a/pages.cn/linux/dpkg.md b/pages.cn/linux/dpkg.md deleted file mode 100644 index c0821a6b5..000000000 --- a/pages.cn/linux/dpkg.md +++ /dev/null @@ -1,27 +0,0 @@ -# dpkg - -> Debian package manager. - -- Install a package: - -`dpkg -i {{path/to/file.deb}}` - -- Remove a package: - -`dpkg -r {{package_name}}` - -- List installed packages: - -`dpkg -l {{pattern}}` - -- List package contents: - -`dpkg -L {{package_name}}` - -- List contents of a local package file: - -`dpkg -c {{path/to/file.deb}}` - -- Find out which package owns a file: - -`dpkg -S {{file_name}}` diff --git a/pages.cn/linux/ebuild.md b/pages.cn/linux/ebuild.md deleted file mode 100644 index 6ee5a3345..000000000 --- a/pages.cn/linux/ebuild.md +++ /dev/null @@ -1,35 +0,0 @@ -# ebuild - -> A low level interface to the Gentoo Portage system. - -- Create or update the package manifest: - -`ebuild {{path/to/file.ebuild}} manifest` - -- Clean the temporary build directories for the build file: - -`ebuild {{path/to/file.ebuild}} clean` - -- Fetch sources if they do not exist: - -`ebuild {{path/to/file.ebuild}} fetch` - -- Extract the sources to a temporary build directory: - -`ebuild {{path/to/file.ebuild}} unpack` - -- Compile the extracted sources: - -`ebuild {{path/to/file.ebuild}} compile` - -- Install the package to a temporary install directory: - -`ebuild {{path/to/file.ebuild}} install` - -- Install the temporary files to the live filesystem: - -`ebuild {{path/to/file.ebuild}} qmerge` - -- Fetch, unpack, compile, install and qmerge the specified ebuild file: - -`ebuild {{path/to/file.ebuild}} merge` diff --git a/pages.cn/linux/edit.md b/pages.cn/linux/edit.md deleted file mode 100644 index 2b6204677..000000000 --- a/pages.cn/linux/edit.md +++ /dev/null @@ -1,12 +0,0 @@ -# edit - -> An alias to a `run-mailcap`'s action edit. -> Originally `run-mailcap` is used to process/edit mime-type/file. - -- Edit action can be used to view any file on default mailcap explorer: - -`edit {{filename}}` - -- With `run-mailcap`: - -`run-mailcap --action=edit {{filename}}` diff --git a/pages.cn/linux/edquota.md b/pages.cn/linux/edquota.md deleted file mode 100644 index 4a60d9b9a..000000000 --- a/pages.cn/linux/edquota.md +++ /dev/null @@ -1,28 +0,0 @@ -# edquota - -> Edit quotas for a user or group. By default it operates on all file systems with quotas. -> Quota information is stored permanently in the `quota.user` and `quota.group` files in the root of the filesystem. - -- Edit quota of the current user: - -`edquota --user $(whoami)` - -- Edit quota of a specific user: - -`sudo edquota --user {{username}}` - -- Edit quota for a group: - -`sudo edquota --group {{group}}` - -- Restrict operations to a given filesystem (by default edquota operates on all filesystems with quotas): - -`sudo edquota --file-system {{filesystem}}` - -- Edit the default grace period: - -`sudo edquota -t` - -- Duplicate a quota to other users: - -`sudo edquota -p {{reference_user}} {{destination_user1}} {{destination_user2}}` diff --git a/pages.cn/linux/eject.md b/pages.cn/linux/eject.md deleted file mode 100644 index 11bf9ae55..000000000 --- a/pages.cn/linux/eject.md +++ /dev/null @@ -1,31 +0,0 @@ -# eject - -> Eject cds, floppy disks and tape drives. - -- Display the default device: - -`eject -d` - -- Eject the default device: - -`eject` - -- Eject a specific device (the default order is cd-rom, scsi, floppy and tape): - -`eject {{/dev/cdrom}}` - -- Toggle whether a device's tray is open or closed: - -`eject -T {{/dev/cdrom}}` - -- Eject a cd drive: - -`eject -r {{/dev/cdrom}}` - -- Eject a floppy drive: - -`eject -f {{/mnt/floppy}}` - -- Eject a tape drive: - -`eject -q {{/mnt/tape}}` diff --git a/pages.cn/linux/emerge.md b/pages.cn/linux/emerge.md deleted file mode 100644 index 3eee53fd3..000000000 --- a/pages.cn/linux/emerge.md +++ /dev/null @@ -1,31 +0,0 @@ -# emerge - -> Gentoo Linux package manager utility. - -- Synchronize all packages: - -`emerge --sync` - -- Update all packages, including dependencies: - -`emerge -uDNav @world` - -- Resume a failed updated, skipping the failing package: - -`emerge --resume --skipfirst` - -- Install a new package, with confirmation: - -`emerge -av {{package_name}}` - -- Remove a package, with confirmation: - -`emerge -Cav {{package_name}}` - -- Remove orphaned packages (that were installed only as dependencies): - -`emerge -avc` - -- Search the package database for a keyword: - -`emerge -S {{keyword}}` diff --git a/pages.cn/linux/entr.md b/pages.cn/linux/entr.md deleted file mode 100644 index d4699c5de..000000000 --- a/pages.cn/linux/entr.md +++ /dev/null @@ -1,19 +0,0 @@ -# entr - -> Run arbitrary commands when files change. - -- Rebuild with `make` if any files in any subfolders change: - -`{{ag -l}} | entr {{make}}` - -- Rebuild and test with `make` if any `.c` source files in the current directory change: - -`{{ls *.c}} | entr {{'make && make test'}}` - -- Send a `SIGTERM` to any previously spawned ruby subprocesses before executing `ruby main.rb`: - -`{{ls *.rb}} | entr -r {{ruby main.rb}}` - -- Run a command with the changed file (`/_`) as an argument: - -`{{ls *.sql}} | entr {{psql -f}} /_` diff --git a/pages.cn/linux/envsubst.md b/pages.cn/linux/envsubst.md deleted file mode 100644 index 9c3ada809..000000000 --- a/pages.cn/linux/envsubst.md +++ /dev/null @@ -1,20 +0,0 @@ -# envsubst - -> Substitutes shell format strings with environment variables in text. -> Strings to be replaced should be in either `${var}` or `$var` format. - -- Replace environment variables in stdin and output to stdout: - -`echo '{{$HOME}}' | envsubst` - -- Replace environment variables in an input file and output to stdout: - -`envsubst < {{path/to/input}}` - -- Replace environment variables in an input file and output to a file: - -`envsubst < {{path/to/input}} > {{path/to/output}}` - -- Replace environment variables in input from a space-separated list: - -`envsubst {{variables}} < {{path/to/input}}` diff --git a/pages.cn/linux/equery.md b/pages.cn/linux/equery.md deleted file mode 100644 index d785f1975..000000000 --- a/pages.cn/linux/equery.md +++ /dev/null @@ -1,23 +0,0 @@ -# equery - -> View information about Portage packages. - -- List all installed packages: - -`equery list '*'` - -- Search for installed packages in the Portage tree and in overlays: - -`equery list -po {{package_name}}` - -- List all packages that depend on a given package: - -`equery depends {{package_name}}` - -- List all packages that a given package depends on: - -`equery depgraph {{package_name}}` - -- List all files installed by a package: - -`equery files --tree {{package_name}}` diff --git a/pages.cn/linux/eval.md b/pages.cn/linux/eval.md deleted file mode 100644 index ee1135a91..000000000 --- a/pages.cn/linux/eval.md +++ /dev/null @@ -1,11 +0,0 @@ -# eval - -> Execute arguments as a single command in the current shell and return its result. - -- Call `echo` with the "foo" argument: - -`eval "{{echo foo}}"` - -- Set a variable in the current shell: - -`eval "{{foo=bar}}"` diff --git a/pages.cn/linux/export.md b/pages.cn/linux/export.md deleted file mode 100644 index 06ebceb93..000000000 --- a/pages.cn/linux/export.md +++ /dev/null @@ -1,19 +0,0 @@ -# export - -> Command to mark shell variables in the current environment to be exported with any newly forked child processes. - -- Set a new environment variable: - -`export {{VARIABLE}}={{value}}` - -- Remove an environment variable: - -`export -n {{VARIABLE}}` - -- Mark a shell function for export: - -`export -f {{FUNCTION_NAME}}` - -- Append something to the PATH variable: - -`export PATH=$PATH:{{path/to/append}}` diff --git a/pages.cn/linux/eyeD3.md b/pages.cn/linux/eyeD3.md deleted file mode 100644 index 90c3ecbd8..000000000 --- a/pages.cn/linux/eyeD3.md +++ /dev/null @@ -1,19 +0,0 @@ -# eyeD3 - -> Read and manipulate metadata of MP3 files. - -- View information about an MP3 file: - -`eyeD3 {{filename.mp3}}` - -- Set the title of an MP3 file: - -`eyeD3 --title {{"A Title"}} {{filename.mp3}}` - -- Set the album of all the MP3 files in a directory: - -`eyeD3 --album {{"Album Name"}} {{*.mp3}}` - -- Set the front cover art for an MP3 file: - -`eyeD3 --add-image {{front_cover.jpeg}}:FRONT_COVER: {{filename.mp3}}` diff --git a/pages.cn/linux/f5fpc.md b/pages.cn/linux/f5fpc.md deleted file mode 100644 index a9d32c878..000000000 --- a/pages.cn/linux/f5fpc.md +++ /dev/null @@ -1,23 +0,0 @@ -# f5fpc - -> A proprietry commercial SSL VPN client by BIG-IP Edge. - -- Open a new VPN connection: - -`sudo f5fpc --start` - -- Open a new VPN connection to a specific host: - -`sudo f5fpc --start --host {{host.example.com}}` - -- Specify a username (user will be prompted for a password): - -`sudo f5fpc --start --host {{host.example.com}} --username {{user}}` - -- Show the current VPN status: - -`sudo f5fpc --info` - -- Shutdown the VPN connection: - -`sudo f5fpc --stop` diff --git a/pages.cn/linux/fallocate.md b/pages.cn/linux/fallocate.md deleted file mode 100644 index bce5d975b..000000000 --- a/pages.cn/linux/fallocate.md +++ /dev/null @@ -1,16 +0,0 @@ -# fallocate - -> Reserve or deallocate disk space to files. -> The utility allocates space without zeroing. - -- Reserve a file taking up 700MB of disk space: - -`fallocate --length {{700M}} {{path/to/file}}` - -- Shrink an already allocated file by 200MB: - -`fallocate --collapse-range --length {{200M}} {{path/to/file}}` - -- Shrink 20MB of space after 100MB in a file: - -`fallocate --collapse-range --offset {{100M}} --length {{20M}} {{path/to/file}}` diff --git a/pages.cn/linux/fatlabel.md b/pages.cn/linux/fatlabel.md deleted file mode 100644 index 9a742ce4d..000000000 --- a/pages.cn/linux/fatlabel.md +++ /dev/null @@ -1,11 +0,0 @@ -# fatlabel - -> Sets or gets the label of a FAT32 partition. - -- Get the label of a FAT32 partition: - -`fatlabel {{/dev/sda1}}` - -- Set the label of a FAT32 partition: - -`fatlabel {{/dev/sdc3}} "{{new_label}}"` diff --git a/pages.cn/linux/fc-list.md b/pages.cn/linux/fc-list.md deleted file mode 100644 index c3dc233fa..000000000 --- a/pages.cn/linux/fc-list.md +++ /dev/null @@ -1,7 +0,0 @@ -# fc-list - -> List available fonts installed on the system. - -- Return a list of installed fonts with given name: - -`fc-list | grep '{{DejaVu Serif}}'` diff --git a/pages.cn/linux/fc-match.md b/pages.cn/linux/fc-match.md deleted file mode 100644 index 9af18eefb..000000000 --- a/pages.cn/linux/fc-match.md +++ /dev/null @@ -1,7 +0,0 @@ -# fc-match - -> Match available fonts. - -- Return a sorted list of best matching fonts: - -`fc-match -s '{{DejaVu Serif}}'` diff --git a/pages.cn/linux/fc-pattern.md b/pages.cn/linux/fc-pattern.md deleted file mode 100644 index 3ca45e60d..000000000 --- a/pages.cn/linux/fc-pattern.md +++ /dev/null @@ -1,7 +0,0 @@ -# fc-pattern - -> Shows information about a font matching a pattern. - -- Display default information about a font: - -`fc-pattern -d '{{DejaVu Serif}}'` diff --git a/pages.cn/linux/fc.md b/pages.cn/linux/fc.md deleted file mode 100644 index 7e6c46410..000000000 --- a/pages.cn/linux/fc.md +++ /dev/null @@ -1,15 +0,0 @@ -# fc - -> Open the most recent command and edit it. - -- Open in the default system editor: - -`fc` - -- Specify an editor to open with: - -`fc -e {{'emacs'}}` - -- List recent commands from history: - -`fc -l` diff --git a/pages.cn/linux/fdisk.md b/pages.cn/linux/fdisk.md deleted file mode 100644 index 8404641ec..000000000 --- a/pages.cn/linux/fdisk.md +++ /dev/null @@ -1,11 +0,0 @@ -# fdisk - -> A program for managing partition tables and partitions on a hard disk. - -- List partitions: - -`fdisk -l` - -- Start the partition manipulator: - -`fdisk {{/dev/sda}}` diff --git a/pages.cn/linux/feh.md b/pages.cn/linux/feh.md deleted file mode 100644 index 3d3464c91..000000000 --- a/pages.cn/linux/feh.md +++ /dev/null @@ -1,27 +0,0 @@ -# feh - -> Lightweight image viewing utility. - -- View images locally or using a URL: - -`feh {{path/to/images}}` - -- View images recursively: - -`feh --recursive {{path/to/images}}` - -- View images without window borders: - -`feh --borderless {{path/to/images}}` - -- Exit after the last image: - -`feh --cycle-once {{path/to/images}}` - -- Set the slideshow cycle delay: - -`feh --slideshow-delay {{seconds}} {{path/to/images}}` - -- Set your wallpaper (centered, filled, maximized, scaled or tiled): - -`feh --bg-{{center|fill|max|scale|tile}} {{path/to/image}}` diff --git a/pages.cn/linux/figlet.md b/pages.cn/linux/figlet.md deleted file mode 100644 index 50d39f07c..000000000 --- a/pages.cn/linux/figlet.md +++ /dev/null @@ -1,19 +0,0 @@ -# figlet - -> Generate ASCII banners from user input. - -- Generate by directly inputting text: - -`figlet {{input_text}}` - -- Use a custom font file: - -`figlet {{input_text}} -f {{font_file_name}}` - -- Pipe command output through figlet: - -`{{command}} | figlet` - -- Show available figlet fonts: - -`showfigfonts {{optional_string_to_display}}` diff --git a/pages.cn/linux/file.md b/pages.cn/linux/file.md deleted file mode 100644 index 785cee746..000000000 --- a/pages.cn/linux/file.md +++ /dev/null @@ -1,23 +0,0 @@ -# file - -> Determine file type. - -- Give a description of the type of the specified file. Works fine for files with no file extension: - -`file {{filename}}` - -- Look inside a zipped file and determine the file type(s) inside: - -`file -z {{foo.zip}}` - -- Allow file to work with special or device files: - -`file -s {{filename}}` - -- Don't stop at first file type match; keep going until the end of the file: - -`file -k {{filename}}` - -- Determine the mime encoding type of a file: - -`file -i {{filename}}` diff --git a/pages.cn/linux/findmnt.md b/pages.cn/linux/findmnt.md deleted file mode 100644 index f3d7c3eb0..000000000 --- a/pages.cn/linux/findmnt.md +++ /dev/null @@ -1,23 +0,0 @@ -# findmnt - -> Find your filesystem. - -- List all mounted filesystems: - -`findmnt` - -- Search for a device: - -`findmnt {{/dev/sdb1}}` - -- Search for a mountpoint: - -`findmnt {{/}}` - -- Find filesystems in specific type: - -`findmnt -t {{ext4}}` - -- Find filesystems with specific label: - -`findmnt LABEL={{BigStorage}}` diff --git a/pages.cn/linux/firejail.md b/pages.cn/linux/firejail.md deleted file mode 100644 index 4d98dd035..000000000 --- a/pages.cn/linux/firejail.md +++ /dev/null @@ -1,27 +0,0 @@ -# firejail - -> Securely sandboxes processes to containers using built-in Linux capabilities. - -- Integrate firejail with your desktop environment: - -`sudo firecfg` - -- Open a restricted Mozilla Firefox: - -`firejail {{firefox}}` - -- Start a restricted Apache server on a known interface and address: - -`firejail --net={{eth0}} --ip={{192.168.1.244}} {{/etc/init.d/apache2}} {{start}}` - -- List running sandboxes: - -`firejail --list` - -- List network activity from running sandboxes: - -`firejail --netstats` - -- Shutdown a running sandbox: - -`firejail --shutdown={{7777}}` diff --git a/pages.cn/linux/firewall-cmd.md b/pages.cn/linux/firewall-cmd.md deleted file mode 100644 index beee7996c..000000000 --- a/pages.cn/linux/firewall-cmd.md +++ /dev/null @@ -1,23 +0,0 @@ -# firewall-cmd - -> The firewalld command line client. - -- View the available firewall zones: - -`firewall-cmd --get-active-zones` - -- View the rules which are currently applied: - -`firewall-cmd --list-all` - -- Permanently open the port for a service in the specified zone (like port `443` when in the `public` zone): - -`firewall-cmd --permanent --zone={{public}} --add-service={{https}}` - -- Permanently close the port for a service in the specified zone (like port `80` when in the `public` zone): - -`firewall-cmd --permanent --zone={{public}} --remove-service={{http}}` - -- Reload firewalld to force rule changes to take effect: - -`firewall-cmd --reload` diff --git a/pages.cn/linux/flatpak.md b/pages.cn/linux/flatpak.md deleted file mode 100644 index 0be436188..000000000 --- a/pages.cn/linux/flatpak.md +++ /dev/null @@ -1,27 +0,0 @@ -# flatpak - -> Build, install and run flatpak applications and runtimes. - -- Run an installed application: - -`flatpak run {{name}}` - -- Install an application from a remote source: - -`flatpak install {{remote}} {{name}}` - -- List all installed applications and runtimes: - -`flatpak list` - -- Update all installed applications and runtimes: - -`flatpak update` - -- Add a remote source: - -`flatpak remote-add --if-not-exists {{remote_name}} {{remote_url}}` - -- List all configured remote sources: - -`flatpak remote-list` diff --git a/pages.cn/linux/foreman.md b/pages.cn/linux/foreman.md deleted file mode 100644 index 67c4e35ce..000000000 --- a/pages.cn/linux/foreman.md +++ /dev/null @@ -1,27 +0,0 @@ -# foreman - -> Manage Procfile-based applications. - -- Start an application with the Procfile in the current directory: - -`foreman start` - -- Start an application with a specified Procfile: - -`foreman start -f {{Procfile}}` - -- Start a specific application: - -`foreman start {{process}}` - -- Validate Procfile format: - -`foreman check` - -- Run one-off commands with the process's environment: - -`foreman run {{command}}` - -- Start all processes except the one named "worker": - -`foreman start -m all=1,{{worker}}=0` diff --git a/pages.cn/linux/free.md b/pages.cn/linux/free.md deleted file mode 100644 index 405326a66..000000000 --- a/pages.cn/linux/free.md +++ /dev/null @@ -1,19 +0,0 @@ -# free - -> Display amount of free and used memory in the system. - -- Display system memory: - -`free` - -- Display memory in Bytes/KB/MB/GB: - -`free -{{b|k|m|g}}` - -- Display memory in human readable units: - -`free -h` - -- Refresh the output every 2 seconds: - -`free -s {{2}}` diff --git a/pages.cn/linux/fsck.md b/pages.cn/linux/fsck.md deleted file mode 100644 index 6a8fdfd70..000000000 --- a/pages.cn/linux/fsck.md +++ /dev/null @@ -1,15 +0,0 @@ -# fsck - -> Check the integrity of a filesystem or repair it. The filesystem should be unmounted at the time the command is run. - -- Check filesystem /dev/sda, reporting any damaged blocks: - -`fsck {{/dev/sda}}` - -- Check filesystem /dev/sda, reporting any damaged blocks and interactively letting the user choose to repair each one: - -`fsck -r {{/dev/sda}}` - -- Check filesystem /dev/sda, reporting any damaged blocks and automatically repairing them: - -`fsck -a {{/dev/sda}}` diff --git a/pages.cn/linux/fuser.md b/pages.cn/linux/fuser.md deleted file mode 100644 index 015c25b82..000000000 --- a/pages.cn/linux/fuser.md +++ /dev/null @@ -1,8 +0,0 @@ -# fuser - -> Display process IDs currently using files or sockets. -> Require admin privileges. - -- Identify process using a TCP socket: - -`fuser -n tcp {{port}}` diff --git a/pages.cn/linux/genkernel.md b/pages.cn/linux/genkernel.md deleted file mode 100644 index a988de52b..000000000 --- a/pages.cn/linux/genkernel.md +++ /dev/null @@ -1,23 +0,0 @@ -# genkernel - -> Gentoo Linux utility to compile and install kernels. - -- Automatically compile and install a generic kernel: - -`sudo genkernel all` - -- Build and install the bzImage|initramfs|kernel|ramdisk only: - -`sudo genkernel {{bzImage|initramfs|kernel|ramdisk}}` - -- Apply changes to the kernel configuration before compiling and installing: - -`sudo genkernel --menuconfig all` - -- Generate a kernel with a custom name: - -`sudo genkernel --kernname={{custom_name}} all` - -- Use a kernel source outside of the default directory /usr/src/linux: - -`sudo genkernel --kerneldir={{path/to/directory}} all` diff --git a/pages.cn/linux/getent.md b/pages.cn/linux/getent.md deleted file mode 100644 index f187ebdbc..000000000 --- a/pages.cn/linux/getent.md +++ /dev/null @@ -1,23 +0,0 @@ -# getent - -> Get entries from Name Service Switch libraries. - -- Get list of all groups: - -`getent group` - -- See the members of a group: - -`getent group {{group_name}}` - -- Get list of all services: - -`getent services` - -- Find a username by UID: - -`getent passwd 1000` - -- Perform a reverse DNS lookup: - -`getent hosts {{host}}` diff --git a/pages.cn/linux/getfacl.md b/pages.cn/linux/getfacl.md deleted file mode 100644 index da962d8df..000000000 --- a/pages.cn/linux/getfacl.md +++ /dev/null @@ -1,15 +0,0 @@ -# getfacl - -> Get file access control lists. - -- Display the file access control list: - -`getfacl {{path/to/file_or_folder}}` - -- Display the file access control list with numeric user and group IDs: - -`getfacl -n {{path/to/file_or_folder}}` - -- Display the file access control list with tabular output format: - -`getfacl -t {{path/to/file_or_folder}}` diff --git a/pages.cn/linux/gnome-terminal.md b/pages.cn/linux/gnome-terminal.md deleted file mode 100644 index cd9ccae43..000000000 --- a/pages.cn/linux/gnome-terminal.md +++ /dev/null @@ -1,19 +0,0 @@ -# gnome-terminal - -> The GNOME Terminal emulator. - -- Open a new GNOME terminal window: - -`gnome-terminal` - -- Run a specific command in a new terminal window: - -`gnome-terminal -- {{command}}` - -- Open a new tab in the last opened window instead: - -`gnome-terminal --tab` - -- Set the title of the new tab: - -`gnome-terminal --tab --title "{{title}}"` diff --git a/pages.cn/linux/gpasswd.md b/pages.cn/linux/gpasswd.md deleted file mode 100644 index 524aac4ab..000000000 --- a/pages.cn/linux/gpasswd.md +++ /dev/null @@ -1,23 +0,0 @@ -# gpasswd - -> Administer "/etc/group" and "/etc/gshadow". - -- Define group administrators: - -`sudo gpasswd -A {{user1,user2}} {{group}}` - -- Set the list of group members: - -`sudo gpasswd -M {{user1,user2}} {{group}}` - -- Create a password for the named group: - -`gpasswd {{group}}` - -- Add a user to the named group: - -`gpasswd -a {{user}} {{group}}` - -- Remove a user from the named group: - -`gpasswd -d {{user}} {{group}}` diff --git a/pages.cn/linux/groupadd.md b/pages.cn/linux/groupadd.md deleted file mode 100644 index 54508ed41..000000000 --- a/pages.cn/linux/groupadd.md +++ /dev/null @@ -1,11 +0,0 @@ -# groupadd - -> Add user groups to the system. - -- Create a new Linux group: - -`groupadd {{group_name}}` - -- Create new group with a specific groupid: - -`groupadd {{group_name}} -g {{group_id}}` diff --git a/pages.cn/linux/groupdel.md b/pages.cn/linux/groupdel.md deleted file mode 100644 index aa11909f7..000000000 --- a/pages.cn/linux/groupdel.md +++ /dev/null @@ -1,7 +0,0 @@ -# groupdel - -> Delete existing user groups from the system. - -- Delete an existing group: - -`groupdel {{group_name}}` diff --git a/pages.cn/linux/groupmod.md b/pages.cn/linux/groupmod.md deleted file mode 100644 index 7cb85b536..000000000 --- a/pages.cn/linux/groupmod.md +++ /dev/null @@ -1,11 +0,0 @@ -# groupmod - -> Modify existing user groups in the system. - -- Change the group name: - -`groupmod -n {{new_group_name}} {{old_group_name}}` - -- Change the group id: - -`groupmod -g {{new_group_id}} {{old_group_name}}` diff --git a/pages.cn/linux/gs.md b/pages.cn/linux/gs.md deleted file mode 100644 index ed5d9de94..000000000 --- a/pages.cn/linux/gs.md +++ /dev/null @@ -1,27 +0,0 @@ -# gs - -> GhostScript is a PDF and PostScript interpreter. - -- To view a file: - -`gs -dQUIET -dBATCH {{file.pdf}}` - -- Reduce PDF file size to 150 dpi images for reading on a ebook device: - -`gs -dNOPAUSE -dQUIET -dBATCH -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook -sOutputFile={{output.pdf}} {{input.pdf}}` - -- Convert PDF file (pages 1 through 3) to an image with 150 dpi resolution: - -`gs -dQUIET -dBATCH -dNOPAUSE -sDEVICE=jpeg -r150 -dFirstPage={{1}} -dLastPage={{3}} -sOutputFile={{output_%d.jpg}} {{input.pdf}}` - -- Extract pages from a PDF file: - -`gs -dQUIET -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile={{output.pdf}} {{input.pdf}}` - -- Merge PDF files: - -`gs -dQUIET -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile={{output.pdf}} {{input1.pdf}} {{input2.pdf}}` - -- Convert from PostScript file to PDF file: - -`gs -dQUIET -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile={{output.pdf}} {{input.ps}}` diff --git a/pages.cn/linux/guix-package.md b/pages.cn/linux/guix-package.md deleted file mode 100644 index a3b054480..000000000 --- a/pages.cn/linux/guix-package.md +++ /dev/null @@ -1,27 +0,0 @@ -# guix package - -> Install, upgrade and remove Guix packages, or rollback to previous configurations. - -- Install a new package: - -`guix package -i {{package_name}}` - -- Remove a package: - -`guix package -r {{package_name}}` - -- Search the package database for a regular expression: - -`guix package -s "{{search_pattern}}"` - -- List installed packages: - -`guix package -I` - -- List generations: - -`guix package -l` - -- Roll back to the previous generation: - -`guix package --roll-back` diff --git a/pages.cn/linux/gunicorn.md b/pages.cn/linux/gunicorn.md deleted file mode 100644 index eaeaa68d8..000000000 --- a/pages.cn/linux/gunicorn.md +++ /dev/null @@ -1,27 +0,0 @@ -# gunicorn - -> Python WSGI HTTP Server. - -- Run Python web app: - -`gunicorn {{import.path:app_object}}` - -- Listen on port 8080 on localhost: - -`gunicorn --bind {{localhost}}:{{8080}} {{import.path:app_object}}` - -- Turn on live reload: - -`gunicorn --reload {{import.path:app_object}}` - -- Use 4 worker processes for handling requests: - -`gunicorn --workers {{4}} {{import.path:app_object}}` - -- Use 4 worker threads for handling requests: - -`gunicorn --threads {{4}} {{import.path:app_object}}` - -- Run app over HTTPS: - -`gunicorn --certfile {{cert.pem}} --keyfile {{key.pem}} {{import.path:app_object}}` diff --git a/pages.cn/linux/halt.md b/pages.cn/linux/halt.md deleted file mode 100644 index 2a2f93f1a..000000000 --- a/pages.cn/linux/halt.md +++ /dev/null @@ -1,11 +0,0 @@ -# halt - -> Power off or reboot the machine. - -- Power the machine off: - -`halt` - -- Reboot the machine: - -`halt --reboot` diff --git a/pages.cn/linux/hardinfo.md b/pages.cn/linux/hardinfo.md deleted file mode 100644 index 57deb9973..000000000 --- a/pages.cn/linux/hardinfo.md +++ /dev/null @@ -1,15 +0,0 @@ -# hardinfo - -> Show hardware information in GUI window. - -- Start hardinfo: - -`hardinfo` - -- Print report to standard output: - -`hardinfo -r` - -- Save report to HTML file: - -`hardinfo -r -f html > hardinfo.html` diff --git a/pages.cn/linux/hexdump.md b/pages.cn/linux/hexdump.md deleted file mode 100644 index b0463261c..000000000 --- a/pages.cn/linux/hexdump.md +++ /dev/null @@ -1,15 +0,0 @@ -# hexdump - -> An ASCII, decimal, hexadecimal, octal dump. - -- Print the hexadecimal representation of a file: - -`hexdump {{file}}` - -- Display the input offset in hexadecimal and its ASCII representation in two columns: - -`hexdump -C {{file}}` - -- Display the hexadecimal representation of a file, but interpret only n bytes of the input: - -`hexdump -C -n{{number_of_bytes}} {{file}}` diff --git a/pages.cn/linux/hostname.md b/pages.cn/linux/hostname.md deleted file mode 100644 index b336937a2..000000000 --- a/pages.cn/linux/hostname.md +++ /dev/null @@ -1,23 +0,0 @@ -# hostname - -> Show or set the system's host name. - -- Show current host name: - -`hostname` - -- Show the network address of the host name: - -`hostname -i` - -- Show all network addresses of the host: - -`hostname -I` - -- Show the FQDN (Fully Qualified Domain Name): - -`hostname --fqdn` - -- Set current host name: - -`hostname {{new_hostname}}` diff --git a/pages.cn/linux/hostnamectl.md b/pages.cn/linux/hostnamectl.md deleted file mode 100644 index de77a762e..000000000 --- a/pages.cn/linux/hostnamectl.md +++ /dev/null @@ -1,11 +0,0 @@ -# hostnamectl - -> Get or set the hostname of the computer. - -- Get the hostname of the computer: - -`hostnamectl` - -- Set the hostname of the computer: - -`sudo hostnamectl set-hostname "{{some_hostname}}"` diff --git a/pages.cn/linux/htop.md b/pages.cn/linux/htop.md deleted file mode 100644 index 7f9514ac4..000000000 --- a/pages.cn/linux/htop.md +++ /dev/null @@ -1,15 +0,0 @@ -# htop - -> Display dynamic real-time information about running processes. An enhanced version of `top`. - -- Start htop: - -`htop` - -- Start htop displaying only processes owned by given user: - -`htop -u {{user_name}}` - -- Get help about interactive commands: - -`?` diff --git a/pages.cn/linux/http-prompt.md b/pages.cn/linux/http-prompt.md deleted file mode 100644 index d08a1b0d0..000000000 --- a/pages.cn/linux/http-prompt.md +++ /dev/null @@ -1,15 +0,0 @@ -# http-prompt - -> An interactive command-line HTTP client featuring autocomplete and syntax highlighting. - -- Launch a session targeting the default url of http://localhost:8000 or the previous session: - -`http-prompt` - -- Launch a session with a given url: - -`http-prompt {{http://example.com}}` - -- Launch a session with some initial options: - -`http-prompt {{localhost:8000/api}} --auth {{username:password}}` diff --git a/pages.cn/linux/httpie.md b/pages.cn/linux/httpie.md deleted file mode 100644 index e5791c8cd..000000000 --- a/pages.cn/linux/httpie.md +++ /dev/null @@ -1,31 +0,0 @@ -# httpie - -> A user friendly command line HTTP tool. - -- Send a GET request (default method with no request data): - -`http {{https://example.com}}` - -- Send a POST request (default method with request data): - -`http {{https://example.com}} {{hello=World}}` - -- Send a POST request with redirected input: - -`http {{https://example.com}} < {{file.json}}` - -- Send a PUT request with a given json body: - -`http PUT {{https://example.com/todos/7}} {{hello=world}}` - -- Send a DELETE request with a given request header: - -`http DELETE {{https://example.com/todos/7}} {{API-Key:foo}}` - -- Show the whole HTTP exchange (both request and response): - -`http -v {{https://example.com}}` - -- Download a file: - -`http --download {{https://example.com}}` diff --git a/pages.cn/linux/hwclock.md b/pages.cn/linux/hwclock.md deleted file mode 100644 index 4bfec0ad8..000000000 --- a/pages.cn/linux/hwclock.md +++ /dev/null @@ -1,15 +0,0 @@ -# hwclock - -> Used for reading or changing the hardware clock. Usually requires root. - -- Display the current time as reported by the hardware clock: - -`hwclock` - -- Write the current software clock time to the hardware clock (sometimes used during system setup): - -`hwclock --systohc` - -- Write the current hardware clock time to the software clock: - -`hwclock --hctosys` diff --git a/pages.cn/linux/i7z.md b/pages.cn/linux/i7z.md deleted file mode 100644 index f7ce938f4..000000000 --- a/pages.cn/linux/i7z.md +++ /dev/null @@ -1,7 +0,0 @@ -# i7z - -> An Intel CPU (only i3, i5 and i7) realtime reporting tool. - -- Start i7z (needs to be run in super user mode): - -`sudo i7z` diff --git a/pages.cn/linux/ifdown.md b/pages.cn/linux/ifdown.md deleted file mode 100644 index b4e8a1f76..000000000 --- a/pages.cn/linux/ifdown.md +++ /dev/null @@ -1,11 +0,0 @@ -# ifdown - -> Disable network interfaces. - -- Disable interface eth0: - -`ifdown {{eth0}}` - -- Disable all interfaces which are enabled: - -`ifdown -a` diff --git a/pages.cn/linux/ifup.md b/pages.cn/linux/ifup.md deleted file mode 100644 index 198c4de34..000000000 --- a/pages.cn/linux/ifup.md +++ /dev/null @@ -1,11 +0,0 @@ -# ifup - -> Tool used to enable network interfaces. - -- Enable interface eth0: - -`ifup {{eth0}}` - -- Enable all the interfaces defined with "auto" in /etc/network/interfaces: - -`ifup -a` diff --git a/pages.cn/linux/imgp.md b/pages.cn/linux/imgp.md deleted file mode 100644 index 028dd4b45..000000000 --- a/pages.cn/linux/imgp.md +++ /dev/null @@ -1,15 +0,0 @@ -# imgp - -> Command line image resizer and rotator for JPEG and PNG images. - -- Convert single images and/or whole directories containing valid image formats: - -`imgp -x {{1366x1000}} {{path/to/dir}} {{path/to/file}}` - -- Scale an image by 75% and overwrite the source image to a target resolution: - -`imgp -x {{75}} -w {{path/to/file}}` - -- Rotate an image clockwise by 90 degrees: - -`imgp -o {{90}} {{path/to/file}}` diff --git a/pages.cn/linux/inxi.md b/pages.cn/linux/inxi.md deleted file mode 100644 index aef106fd1..000000000 --- a/pages.cn/linux/inxi.md +++ /dev/null @@ -1,11 +0,0 @@ -# inxi - -> Print a summary of system information and resources for debugging purposes. - -- Print a short summary of CPU, memory, hard drive and kernel information: - -`inxi` - -- Print a full description of CPU, memory, disk, network and process information: - -`inxi -Fz` diff --git a/pages.cn/linux/iostat.md b/pages.cn/linux/iostat.md deleted file mode 100644 index 4b50fdccb..000000000 --- a/pages.cn/linux/iostat.md +++ /dev/null @@ -1,27 +0,0 @@ -# iostat - -> Report statistics for devices and partitions. - -- Display a report of CPU and disk statistics since system startup: - -`iostat` - -- Display a report of CPU and disk statistics with units converted to megabytes: - -`iostat -m` - -- Display CPU statistics: - -`iostat -c` - -- Display disk statistics with disk names (including LVM): - -`iostat -N` - -- Display extended disk statistics with disk names for device "sda": - -`iostat -xN {{sda}}` - -- Display incremental reports of CPU and disk statistics every 2 seconds: - -`iostat {{2}}` diff --git a/pages.cn/linux/ip.md b/pages.cn/linux/ip.md deleted file mode 100644 index 947607611..000000000 --- a/pages.cn/linux/ip.md +++ /dev/null @@ -1,27 +0,0 @@ -# ip - -> Show / manipulate routing, devices, policy routing and tunnels. - -- List interfaces with detailed info: - -`ip a` - -- Display the routing table: - -`ip r` - -- Show neighbors (ARP table): - -`ip n` - -- Make an interface up/down: - -`ip link set {{interface}} up/down` - -- Add/Delete an ip address to an interface: - -`ip addr add/del {{ip}}/{{mask}} dev {{interface}}` - -- Add a default route: - -`ip route add default via {{ip}} dev {{interface}}` diff --git a/pages.cn/linux/ipcalc.md b/pages.cn/linux/ipcalc.md deleted file mode 100644 index 01eab4f08..000000000 --- a/pages.cn/linux/ipcalc.md +++ /dev/null @@ -1,23 +0,0 @@ -# ipcalc - -> Perform simple operations and calculations on IP addresses and networks. - -- Show information about an address or network with a given subnet mask: - -`ipcalc {{1.2.3.4}} {{255.255.255.0}}` - -- Show information about an address or network in CIDR notation: - -`ipcalc {{1.2.3.4}}/{{24}}` - -- Show the broadcast address of an address or network: - -`ipcalc -b {{1.2.3.4}}/{{30}}` - -- Show the network address of provided IP address and netmask: - -`ipcalc -n {{1.2.3.4}}/{{24}}` - -- Display geographic information about a given IP address: - -`ipcalc -g {{1.2.3.4}}` diff --git a/pages.cn/linux/iptables.md b/pages.cn/linux/iptables.md deleted file mode 100644 index e65702206..000000000 --- a/pages.cn/linux/iptables.md +++ /dev/null @@ -1,31 +0,0 @@ -# iptables - -> Program that allows configuration of tables, chains and rules provided by the Linux kernel firewall. - -- View chains, rules, and packet/byte counters for all tables: - -`sudo iptables -vnL` - -- Set chain policy rule: - -`sudo iptables -P {{chain}} {{rule}}` - -- Append rule to chain policy for IP: - -`sudo iptables -A {{chain}} -s {{ip}} -j {{rule}}` - -- Append rule to chain policy for IP considering protocol and port: - -`sudo iptables -A {{chain}} -s {{ip}} -p {{protocol}} --dport {{port}} -j {{rule}}` - -- Delete chain rule: - -`sudo iptables -D {{chain}} {{rule_line_number}}` - -- Save iptables configuration of a given table to a file: - -`sudo iptables-save -t {{tablename}} > {{path/to/iptables_file}}` - -- Restore iptables configuration from a file: - -`sudo iptables-restore < {{path/to/iptables_file}}` diff --git a/pages.cn/linux/isoinfo.md b/pages.cn/linux/isoinfo.md deleted file mode 100644 index 1d62fe9f9..000000000 --- a/pages.cn/linux/isoinfo.md +++ /dev/null @@ -1,15 +0,0 @@ -# isoinfo - -> Utility programs for dumping and verifying ISO disk images. - -- List all the files included in an ISO image: - -`isoinfo -f -i {{path/to/image.iso}}` - -- E[x]tract a specific file from an ISO image and send it out stdout: - -`isoinfo -i {{path/to/image.iso}} -x {{/PATH/TO/FILE/INSIDE/ISO.EXT}}` - -- Show header information for an ISO disk image: - -`isoinfo -d -i {{path/to/image.iso}}` diff --git a/pages.cn/linux/iw.md b/pages.cn/linux/iw.md deleted file mode 100644 index f9389d117..000000000 --- a/pages.cn/linux/iw.md +++ /dev/null @@ -1,19 +0,0 @@ -# iw - -> Show and manipulate wireless devices. - -- Scan for available wireless networks: - -`iw dev {{wlp}} scan` - -- Join an open wireless network: - -`iw dev {{wlp}} connect {{SSID}}` - -- Close the current connection: - -`iw dev {{wlp}} disconnect` - -- Show information about the current connection: - -`iw dev {{wlp}} link` diff --git a/pages.cn/linux/jobs.md b/pages.cn/linux/jobs.md deleted file mode 100644 index 24a0331d8..000000000 --- a/pages.cn/linux/jobs.md +++ /dev/null @@ -1,27 +0,0 @@ -# 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` diff --git a/pages.cn/linux/journalctl.md b/pages.cn/linux/journalctl.md deleted file mode 100644 index 1e238842e..000000000 --- a/pages.cn/linux/journalctl.md +++ /dev/null @@ -1,27 +0,0 @@ -# journalctl - -> Query the systemd journal. - -- Show all messages from this boot: - -`journalctl -b` - -- Show all messages from last boot: - -`journalctl -b -1` - -- Follow new messages (like `tail -f` for traditional syslog): - -`journalctl -f` - -- Show all messages by a specific unit: - -`journalctl -u {{unit}}` - -- Show all messages by a specific process: - -`journalctl _PID={{pid}}` - -- Show all messages by a specific executable: - -`journalctl {{path/to/executable}}` diff --git a/pages.cn/linux/kexec.md b/pages.cn/linux/kexec.md deleted file mode 100644 index eebac3cc8..000000000 --- a/pages.cn/linux/kexec.md +++ /dev/null @@ -1,19 +0,0 @@ -# kexec - -> Directly reboot into a new kernel. - -- Load a new kernel: - -`kexec -l {{path/to/kernel}} --initrd={{path/to/initrd}} --command-line={{arguments}}` - -- Load a new kernel with current boot parameters: - -`kexec -l {{path/to/kernel}} --initrd={{path/to/initrd}} --reuse-cmdline` - -- Execute a currently loaded kernel: - -`kexec -e` - -- Unload current kexec target kernel: - -`kexec -u` diff --git a/pages.cn/linux/lastlog.md b/pages.cn/linux/lastlog.md deleted file mode 100644 index 6ea64247c..000000000 --- a/pages.cn/linux/lastlog.md +++ /dev/null @@ -1,19 +0,0 @@ -# lastlog - -> Show the most recent login of all users or of a given user. - -- Display the most recent login of all users: - -`lastlog` - -- Display lastlog record of the specified user: - -`lastlog -u {{username}}` - -- Display records before than 7 days: - -`lastlog -b {{7}}` - -- Display records more recent than 3 days: - -`lastlog -t {{3}}` diff --git a/pages.cn/linux/ldconfig.md b/pages.cn/linux/ldconfig.md deleted file mode 100644 index a8ee1d5a5..000000000 --- a/pages.cn/linux/ldconfig.md +++ /dev/null @@ -1,15 +0,0 @@ -# ldconfig - -> Configure symlinks and cache for shared library dependencies. - -- Update symlinks and rebuild the cache (usually run when a new library is installed): - -`sudo ldconfig` - -- Update the symlinks for a given directory: - -`sudo ldconfig -n {{path/to/directory}}` - -- Print the libraries in the cache and check whether a given library is present: - -`ldconfig -p | grep {{library_name}}` diff --git a/pages.cn/linux/ldd.md b/pages.cn/linux/ldd.md deleted file mode 100644 index a8cc72add..000000000 --- a/pages.cn/linux/ldd.md +++ /dev/null @@ -1,11 +0,0 @@ -# ldd - -> Display shared library dependencies. - -- Display shared library dependencies of a binary: - -`ldd {{path/to/binary}}` - -- Display unused direct dependencies: - -`ldd -u {{path/to/binary}}` diff --git a/pages.cn/linux/light.md b/pages.cn/linux/light.md deleted file mode 100644 index 0421f7c2b..000000000 --- a/pages.cn/linux/light.md +++ /dev/null @@ -1,19 +0,0 @@ -# light - -> CLI to control the backlight of your screen. - -- Get the current backlight value in percent: - -`light` - -- Set the backlight value to 50 percent: - -`light -S {{50}}` - -- Reduce 20 percent from the current backlight value: - -`light -U {{20}}` - -- Add 20 percent to the current backlight value: - -`light -A {{20}}` diff --git a/pages.cn/linux/lldb.md b/pages.cn/linux/lldb.md deleted file mode 100644 index 8255dc7e3..000000000 --- a/pages.cn/linux/lldb.md +++ /dev/null @@ -1,15 +0,0 @@ -# lldb - -> The LLVM Low-Level Debugger. - -- Debug an executable: - -`lldb {{executable}}` - -- Attach `lldb` to a running process with a given PID: - -`lldb -p {{pid}}` - -- Wait for a new process to launch with a given name, and attach to it: - -`lldb -w -n {{process_name}}` diff --git a/pages.cn/linux/locate.md b/pages.cn/linux/locate.md deleted file mode 100644 index ff8589a79..000000000 --- a/pages.cn/linux/locate.md +++ /dev/null @@ -1,15 +0,0 @@ -# locate - -> Find filenames quickly. - -- Look for pattern in the database. Note: the database is recomputed periodically (usually weekly or daily): - -`locate {{pattern}}` - -- Look for a file by its exact filename (a pattern containing no globbing characters is interpreted as `*pattern*`): - -`locate */{{filename}}` - -- Recompute the database. You need to do it if you want to find recently added files: - -`sudo updatedb` diff --git a/pages.cn/linux/logger.md b/pages.cn/linux/logger.md deleted file mode 100644 index c1fbb3deb..000000000 --- a/pages.cn/linux/logger.md +++ /dev/null @@ -1,23 +0,0 @@ -# logger - -> Add messages to syslog (/var/log/syslog). - -- Log a message to syslog: - -`logger {{message}}` - -- Take input from stdin and log to syslog: - -`echo {{log_entry}} | logger` - -- Send the output to a remote syslog server running at a given port. Default port is 514: - -`echo {{log_entry}} | logger --server {{hostname}} --port {{port}}` - -- Use a specific tag for every line logged. Default is the name of logged in user: - -`echo {{log_entry}} | logger --tag {{tag}}` - -- Log messages with a given priority. Default is `user.notice`. See `man logger` for all priority options: - -`echo {{log_entry}} | logger --priority {{user.warning}}` diff --git a/pages.cn/linux/logwatch.md b/pages.cn/linux/logwatch.md deleted file mode 100644 index 3d6aaa65c..000000000 --- a/pages.cn/linux/logwatch.md +++ /dev/null @@ -1,11 +0,0 @@ -# logwatch - -> Summarizes many different logs for common services (e.g., apache, pam_unix, sshd, etc.) in a single report. - -- Analyze logs for a range of dates at certain level of detail: - -`logwatch --range {{yesterday|today|all|help}} --detail {{low|medium|others}}'` - -- Restrict report to only include information for a selected service: - -`logwatch --range {{all}} --service {{apache|pam_unix|etc}}` diff --git a/pages.cn/linux/losetup.md b/pages.cn/linux/losetup.md deleted file mode 100644 index 2fc0aa281..000000000 --- a/pages.cn/linux/losetup.md +++ /dev/null @@ -1,19 +0,0 @@ -# losetup - -> Set up and control loop devices. - -- List loop devices with detailed info: - -`losetup -a` - -- Attach a file to a given loop device: - -`sudo losetup /dev/{{loop}} /{{path/to/file}}` - -- Detach all loop devices: - -`sudo losetup -D` - -- Detach a given loop device: - -`sudo losetup -d /dev/{{loop}}` diff --git a/pages.cn/linux/lrunzip.md b/pages.cn/linux/lrunzip.md deleted file mode 100644 index 69da8af00..000000000 --- a/pages.cn/linux/lrunzip.md +++ /dev/null @@ -1,24 +0,0 @@ -# lrunzip - -> A large file decompression program. -> See also `lrzip`, `lrztar`, `lrzuntar`. - -- Decompress a file: - -`lrunzip {{filename.lrz}}` - -- Decompress a file using a specific number of processor threads: - -`lrunzip -p {{8}} {{filename.lrz}}` - -- Decompress a file and silently overwrite files if they exist: - -`lrunzip -f {{filename.lrz}}` - -- Keep broken or damaged files instead of deleting them when decompressing: - -`lrunzip -K {{filename.lrz}}` - -- Specify output file name and/or path: - -`lrunzip -o {{outfilename}} {{filename.lrz}}` diff --git a/pages.cn/linux/lrzip.md b/pages.cn/linux/lrzip.md deleted file mode 100644 index d372db9a1..000000000 --- a/pages.cn/linux/lrzip.md +++ /dev/null @@ -1,28 +0,0 @@ -# lrzip - -> A large file compression program. -> See also `lrunzip`, `lrztar`, `lrzuntar`. - -- Compress a file with LZMA - slow compression, fast decompression: - -`lrzip {{filename}}` - -- Compress a file with BZIP2 - good middle ground for compression/speed: - -`lrzip -b {{filename}}` - -- Compress with ZPAQ - extreme compression, but very slow: - -`lrzip -z {{filename}}` - -- Compress with LZO - light compression, extremely fast decompression: - -`lrzip -l {{filename}}` - -- Compress a file and password protect/encrypt it: - -`lrzip -e {{filename}}` - -- Override the number of processor threads to use: - -`lrzip -p {{8}} {{filename}}` diff --git a/pages.cn/linux/lrztar.md b/pages.cn/linux/lrztar.md deleted file mode 100644 index 233a51bd7..000000000 --- a/pages.cn/linux/lrztar.md +++ /dev/null @@ -1,24 +0,0 @@ -# lrztar - -> A wrapper for `lrzip` to simplify compression of directories. -> See also: `tar`, `lrzuntar`, `lrunzip`. - -- Archive a directory with `tar`, then compress: - -`lrztar {{path/to/directory}}` - -- Same as above, with ZPAQ - extreme compression, but very slow: - -`lrztar -z {{path/to/directory}}` - -- Specify the output file: - -`lrztar -o {{path/to/file}} {{path/to/directory}}` - -- Override the number of processor threads to use: - -`lrztar -p {{8}} {{path/to/directory}}` - -- Force overwriting of existing files: - -`lrztar -f {{path/to/directory}}` diff --git a/pages.cn/linux/lrzuntar.md b/pages.cn/linux/lrzuntar.md deleted file mode 100644 index e0d87688f..000000000 --- a/pages.cn/linux/lrzuntar.md +++ /dev/null @@ -1,24 +0,0 @@ -# lrzuntar - -> A wrapper for `lrunzip` to simplify decompression of directories. -> See also: `lrztar`, `lrzip`. - -- Decompress from a file to the current directory: - -`lrzuntar {{path/to/archive.tar.lrz}}` - -- Decompress from a file to the current directory using a specific number of processor threads: - -`lrzuntar -p {{8}} {{path/to/archive.tar.lrz}}` - -- Decompress from a file to the current directory and silently overwrite items that already exist: - -`lrzuntar -f {{archive.tar.lrz}}` - -- Specify the output path: - -`lrzuntar -O {{path/to/directory}} {{archive.tar.lrz}}` - -- Delete the compressed file after decompression: - -`lrzuntar -D {{path/to/archive.tar.lrz}}` diff --git a/pages.cn/linux/lsattr.md b/pages.cn/linux/lsattr.md deleted file mode 100644 index ed0b524fa..000000000 --- a/pages.cn/linux/lsattr.md +++ /dev/null @@ -1,23 +0,0 @@ -# lsattr - -> List file attributes on a Linux file system. - -- Display the attributes of the files in the current directory: - -`lsattr` - -- List the attributes of files in a particular path: - -`lsattr {{path}}` - -- List file attributes recursively in the current and subsequent directories: - -`lsattr -R` - -- Show attributes of all the files in the current directory, including hidden ones: - -`lsattr -a` - -- Display attributes of directories in the current directory: - -`lsattr -d` diff --git a/pages.cn/linux/lsb_release.md b/pages.cn/linux/lsb_release.md deleted file mode 100644 index 4c831b9ce..000000000 --- a/pages.cn/linux/lsb_release.md +++ /dev/null @@ -1,19 +0,0 @@ -# lsb_release - -> Provides certain LSB (Linux Standard Base) and distribution-specific information. - -- Print all available information: - -`lsb_release -a` - -- Print a description (usually the full name) of the operating system: - -`lsb_release -d` - -- Print only the operating system name (ID), suppressing the field name: - -`lsb_release -i -s` - -- Print the release number and codename of the distribution, suppressing the field names: - -`lsb_release -rcs` diff --git a/pages.cn/linux/lsblk.md b/pages.cn/linux/lsblk.md deleted file mode 100644 index ab473b134..000000000 --- a/pages.cn/linux/lsblk.md +++ /dev/null @@ -1,27 +0,0 @@ -# lsblk - -> Lists information about devices. - -- List all storage devices in a tree-like format: - -`lsblk` - -- Also list empty devices: - -`lsblk -a` - -- Print the SIZE column in bytes rather than in a human-readable format: - -`lsblk -b` - -- Output info about filesystems: - -`lsblk -f` - -- Use ASCII characters for tree formatting: - -`lsblk -i` - -- Output info about block-device topology: - -`lsblk -t` diff --git a/pages.cn/linux/lscpu.md b/pages.cn/linux/lscpu.md deleted file mode 100644 index 161bb68c1..000000000 --- a/pages.cn/linux/lscpu.md +++ /dev/null @@ -1,15 +0,0 @@ -# lscpu - -> Displays information about the CPU architecture. - -- Display information about all CPUs: - -`lscpu` - -- Display information in a table: - -`lscpu --extended` - -- Display only information about offline CPUs in a table: - -`lscpu --extended --offline` diff --git a/pages.cn/linux/lshw.md b/pages.cn/linux/lshw.md deleted file mode 100644 index 8f8f27e70..000000000 --- a/pages.cn/linux/lshw.md +++ /dev/null @@ -1,19 +0,0 @@ -# lshw - -> List detailed information about hardware configurations as root user. - -- Launch the GUI: - -`sudo lshw -X` - -- List all hardwares in tabular format: - -`sudo lshw -short` - -- List all disks and storage controllers in tabular format: - -`sudo lshw -class disk -class storage -short` - -- Save all network interfaces to an HTML file: - -`sudo lshw -class network -html > {{interfaces.html}}` diff --git a/pages.cn/linux/lsmod.md b/pages.cn/linux/lsmod.md deleted file mode 100644 index 470770389..000000000 --- a/pages.cn/linux/lsmod.md +++ /dev/null @@ -1,8 +0,0 @@ -# lsmod - -> Shows the status of linux kernel modules. -> See also `modprobe`, which loads kernel modules. - -- List all currently loaded kernel modules: - -`lsmod` diff --git a/pages.cn/linux/lspci.md b/pages.cn/linux/lspci.md deleted file mode 100644 index f7ce0c76b..000000000 --- a/pages.cn/linux/lspci.md +++ /dev/null @@ -1,23 +0,0 @@ -# lspci - -> List all PCI devices. - -- Show a brief list of devices: - -`lspci` - -- Display additional info: - -`lspci -v` - -- Display drivers and modules handling each device: - -`lspci -k` - -- Show a specific device: - -`lspci -s {{00:18.3}}` - -- Dump info in a readable form: - -`lspci -vm` diff --git a/pages.cn/linux/lsscsi.md b/pages.cn/linux/lsscsi.md deleted file mode 100644 index f640774a1..000000000 --- a/pages.cn/linux/lsscsi.md +++ /dev/null @@ -1,15 +0,0 @@ -# lsscsi - -> List SCSI devices (or hosts) and their attributes. - -- List all SCSI devices: - -`lsscsi` - -- List all SCSI devices with detailed attributes: - -`lsscsi -L` - -- List all SCSI devices with human readable disk capacity: - -`lsscsi -s` diff --git a/pages.cn/linux/lsusb.md b/pages.cn/linux/lsusb.md deleted file mode 100644 index c10dd871c..000000000 --- a/pages.cn/linux/lsusb.md +++ /dev/null @@ -1,23 +0,0 @@ -# lsusb - -> Display information about USB buses and devices connected to them. - -- List all the USB devices available: - -`lsusb` - -- List the USB hierarchy as a tree: - -`lsusb -t` - -- List verbose information about USB devices: - -`lsusb --verbose` - -- List detailed information about a USB device: - -`lsusb -D {{device}}` - -- List devices with a specified vendor and product id only: - -`lsusb -d {{vendor}}:{{product}}` diff --git a/pages.cn/linux/ltrace.md b/pages.cn/linux/ltrace.md deleted file mode 100644 index 6aefa204d..000000000 --- a/pages.cn/linux/ltrace.md +++ /dev/null @@ -1,19 +0,0 @@ -# ltrace - -> Display dynamic library calls of a process. - -- Print (trace) library calls of a program binary: - -`ltrace ./{{program}}` - -- Count library calls. Print a handy summary at the bottom: - -`ltrace -c {{/path/to/program}}` - -- Trace calls to malloc and free, omit those done by libc: - -`ltrace -e malloc+free-@libc.so* {{/path/to/program}}` - -- Write to file instead of terminal: - -`ltrace -o {{file}} {{/path/to/program}}` diff --git a/pages.cn/linux/lvcreate.md b/pages.cn/linux/lvcreate.md deleted file mode 100644 index 00be05dfa..000000000 --- a/pages.cn/linux/lvcreate.md +++ /dev/null @@ -1,20 +0,0 @@ -# lvcreate - -> Creates a logical volume in an existing volume group. -> A volume group is a collection of logical and physical volumes. - -- Create a logical volume of 10 gigabytes in the volume group vg1: - -`lvcreate -L {{10G}} {{vg1}}` - -- Create a 1500 megabyte linear logical volume named mylv in the volume group vg1: - -`lvcreate -L {{1500}} -n {{mylv}} {{vg1}}` - -- Create a logical volume called mylv that uses 60% of the total space in volume group vg1: - -`lvcreate -l {{60%VG}} -n {{mylv}} {{vg1}}` - -- Create a logical volume called mylv that uses all of the unallocated space in the volume group vg1: - -`lvcreate -l {{100%FREE}} -n {{mylv}} {{vg1}}` diff --git a/pages.cn/linux/lxc.md b/pages.cn/linux/lxc.md deleted file mode 100644 index b6f571b90..000000000 --- a/pages.cn/linux/lxc.md +++ /dev/null @@ -1,32 +0,0 @@ -# lxc - -> Manage Linux containers using the lxd REST API. -> Any container names or patterns can be prefixed with the name of a remote server. - -- List local containers matching a string. Omit the string to list all local containers: - -`lxc list {{match_string}}` - -- List images matching a string. Omit the string to list all images: - -`lxc image list [{{remote}}:]{{match_string}}` - -- Create a new container from an image: - -`lxc launch [{{remote}}:]{{image}} {{container}}` - -- Start a container: - -`lxc start [{{remote}}:]{{container}}` - -- Stop a container: - -`lxc stop [{{remote}}:]{{container}}` - -- Show detailed info about a container: - -`lxc info [{{remote}}:]{{container}}` - -- Take a snapshot of a container: - -`lxc snapshot [{{remote}}:]{{container}} {{snapshot}}` diff --git a/pages.cn/linux/mdadm.md b/pages.cn/linux/mdadm.md deleted file mode 100644 index 51e20cef0..000000000 --- a/pages.cn/linux/mdadm.md +++ /dev/null @@ -1,27 +0,0 @@ -# mdadm - -> RAID management utility. - -- Create array: - -`mdadm --create {{/path/to/raid_device_file}} --level {{raid_level}} --raid-devices {{number_of_disks}} {{/path/to/disk_device_file}}` - -- Stop array: - -`mdadm -S {{/path/to/raid_device_file}}` - -- Mark disk as failed: - -`mdadm {{/path/to/raid_device_file}} -f {{/path/to/disk_device_file}}` - -- Remove disk: - -`mdadm {{/path/to/raid_device_file}} -r {{/path/to/disk_device_file}}` - -- Add disk to array: - -`mdadm {{/path/to/raid_device_file}} -a {{/path/to/disk_device_file}}` - -- Show RAID info: - -`mdadm -D {{/path/to/raid_device_file}}` diff --git a/pages.cn/linux/microcom.md b/pages.cn/linux/microcom.md deleted file mode 100644 index 460cd69de..000000000 --- a/pages.cn/linux/microcom.md +++ /dev/null @@ -1,11 +0,0 @@ -# microcom - -> A minimalistic terminal program, used to access remote devices via a serial, CAN or telnet connection from the console. - -- Open a serial port using the specified baud rate: - -`microcom --port {{path/to/serial_port}} --speed {{baud_rate}}` - -- Establish a telnet connection to the specified host: - -`microcom --telnet {{hostname}}:{{port}}` diff --git a/pages.cn/linux/mke2fs.md b/pages.cn/linux/mke2fs.md deleted file mode 100644 index 365f36a70..000000000 --- a/pages.cn/linux/mke2fs.md +++ /dev/null @@ -1,15 +0,0 @@ -# mke2fs - -> Creates a Linux filesystem inside a partition. - -- Create an ext2 filesystem in partition 1 of device b (`sdb1`): - -`mkfs.ext2 {{/dev/sdb1}}` - -- Create an ext3 filesystem in partition 1 of device b (`sdb1`): - -`mkfs.ext3 {{/dev/sdb1}}` - -- Create an ext3 filesystem in partition 1 of device b (`sdb1`): - -`mkfs.ext3 {{/dev/sdb1}}` diff --git a/pages.cn/linux/mkfs.cramfs.md b/pages.cn/linux/mkfs.cramfs.md deleted file mode 100644 index 57f5cff84..000000000 --- a/pages.cn/linux/mkfs.cramfs.md +++ /dev/null @@ -1,11 +0,0 @@ -# mkfs.cramfs - -> Creates a ROM filesystem inside a partition. - -- Create a ROM filesystem inside partition 1 on device b (`sdb1`): - -`mkfs.cramfs {{/dev/sdb1}}` - -- Create a ROM filesystem with a volume-name: - -`mkfs.cramfs -n {{volume_name}} {{/dev/sdb1}}` diff --git a/pages.cn/linux/mkfs.exfat.md b/pages.cn/linux/mkfs.exfat.md deleted file mode 100644 index 572ffe719..000000000 --- a/pages.cn/linux/mkfs.exfat.md +++ /dev/null @@ -1,15 +0,0 @@ -# mkfs.exfat - -> Creates an exfat filesystem inside a partition. - -- Create an exfat filesystem inside partition 1 on device b (`sdb1`): - -`mkfs.exfat {{/dev/sdb1}}` - -- Create filesystem with a volume-name: - -`mkfs.exfat -n {{volume_name}} {{/dev/sdb1}}` - -- Create filesystem with a volume-id: - -`mkfs.exfat -i {{volume_id}} {{/dev/sdb1}}` diff --git a/pages.cn/linux/mkfs.fat.md b/pages.cn/linux/mkfs.fat.md deleted file mode 100644 index d2d1d0673..000000000 --- a/pages.cn/linux/mkfs.fat.md +++ /dev/null @@ -1,19 +0,0 @@ -# mkfs.fat - -> Creates an MS-DOS filesystem inside a partition. - -- Create a fat filesystem inside partition 1 on device b (`sdb1`): - -`mkfs.fat {{/dev/sdb1}}` - -- Create filesystem with a volume-name: - -`mkfs.fat -n {{volume_name}} {{/dev/sdb1}}` - -- Create filesystem with a volume-id: - -`mkfs.fat -i {{volume_id}} {{/dev/sdb1}}` - -- Use 5 instead of 2 file allocation tables: - -`mkfs.fat -f 5 {{/dev/sdb1}}` diff --git a/pages.cn/linux/mkfs.minix.md b/pages.cn/linux/mkfs.minix.md deleted file mode 100644 index ce1fc15c6..000000000 --- a/pages.cn/linux/mkfs.minix.md +++ /dev/null @@ -1,7 +0,0 @@ -# mkfs.minix - -> Creates a Minix filesystem inside a partition. - -- Create a Minix filesystem inside partition 1 on device b (`sdb1`): - -`mkfs.minix {{/dev/sdb1}}` diff --git a/pages.cn/linux/mkfs.ntfs.md b/pages.cn/linux/mkfs.ntfs.md deleted file mode 100644 index 33d26f879..000000000 --- a/pages.cn/linux/mkfs.ntfs.md +++ /dev/null @@ -1,15 +0,0 @@ -# mkfs.ntfs - -> Creates a NTFS filesystem inside a partition. - -- Create a NTFS filesystem inside partition 1 on device b (`sdb1`): - -`mkfs.ntfs {{/dev/sdb1}}` - -- Create filesystem with a volume-label: - -`mkfs.ntfs -L {{volume_label}} {{/dev/sdb1}}` - -- Create filesystem with specific UUID: - -`mkfs.ntfs -U {{UUID}} {{/dev/sdb1}}` diff --git a/pages.cn/linux/mkfs.vfat.md b/pages.cn/linux/mkfs.vfat.md deleted file mode 100644 index 307b4cb15..000000000 --- a/pages.cn/linux/mkfs.vfat.md +++ /dev/null @@ -1,19 +0,0 @@ -# mkfs.vfat - -> Creates an MS-DOS filesystem inside a partition. - -- Create a.vfat filesystem inside partition 1 on device b (`sdb1`): - -`mkfs.vfat {{/dev/sdb1}}` - -- Create filesystem with a volume-name: - -`mkfs.vfat -n {{volume_name}} {{/dev/sdb1}}` - -- Create filesystem with a volume-id: - -`mkfs.vfat -i {{volume_id}} {{/dev/sdb1}}` - -- Use 5 instead of 2 file allocation tables: - -`mkfs.vfat -f 5 {{/dev/sdb1}}` diff --git a/pages.cn/linux/mkisofs.md b/pages.cn/linux/mkisofs.md deleted file mode 100644 index 77a41debe..000000000 --- a/pages.cn/linux/mkisofs.md +++ /dev/null @@ -1,12 +0,0 @@ -# mkisofs - -> Create ISO files from folders. -> Also aliased as `genisoimage`. - -- Create an ISO from a folder: - -`mkisofs -o {{filename.iso}} {{path/to/source_folder}}` - -- Set the disc label when creating an ISO: - -`mkisofs -o {{filename.iso}} -V {{"label_name"}} {{path/to/source_folder}}` diff --git a/pages.cn/linux/mknod.md b/pages.cn/linux/mknod.md deleted file mode 100644 index 53e90446e..000000000 --- a/pages.cn/linux/mknod.md +++ /dev/null @@ -1,19 +0,0 @@ -# mknod - -> Create block or character device special files. - -- Create a block device: - -`sudo mknod {{path/to/device_file}} b {{major_device_number}} {{minor_device_number}}` - -- Create a character device: - -`sudo mknod {{path/to/device_file}} c {{major_device_number}} {{minor_device_number}}` - -- Create a FIFO (queue) device: - -`sudo mknod {{path/to/device_file}} p` - -- Create a device file with default SELinux security context: - -`sudo mknod -Z {{path/to/device_file}} {{type}} {{major_device_number}} {{minor_device_number}}` diff --git a/pages.cn/linux/mkswap.md b/pages.cn/linux/mkswap.md deleted file mode 100644 index 263afd6a3..000000000 --- a/pages.cn/linux/mkswap.md +++ /dev/null @@ -1,19 +0,0 @@ -# mkswap - -> Sets up a Linux swap area on a device or in a file. - -- Setup a given partition as swap area: - -`sudo mkswap {{/dev/sdb7}}` - -- Use a given file as swap area: - -`sudo mkswap {{path/to/file}}` - -- Check a partition for bad blocks before creating the swap area: - -`sudo mkswap -c {{/dev/sdb7}}` - -- Specify a label for the file (to allow `swapon` to use the label): - -`sudo mkswap -L {{swap1}} {{path/to/file}}` diff --git a/pages.cn/linux/modinfo.md b/pages.cn/linux/modinfo.md deleted file mode 100644 index a10d7a2ba..000000000 --- a/pages.cn/linux/modinfo.md +++ /dev/null @@ -1,11 +0,0 @@ -# modinfo - -> Extract information about a Linux kernel module. - -- List all attributes of a kernel module: - -`modinfo {{kernel_module}}` - -- List the specified attribute only: - -`modinfo -F {{author|description|license|parm|filename}} {{kernel_module}}` diff --git a/pages.cn/linux/modprobe.md b/pages.cn/linux/modprobe.md deleted file mode 100644 index 27c3d8b26..000000000 --- a/pages.cn/linux/modprobe.md +++ /dev/null @@ -1,23 +0,0 @@ -# modprobe - -> Add or remove modules from the Linux kernel. - -- Pretend to load a module into the kernel, but don't actually do it: - -`sudo modprobe --dry-run {{module_name}}` - -- Load a module into the kernel: - -`sudo modprobe {{module_name}}` - -- Remove a module from the kernel: - -`sudo modprobe --remove {{module_name}}` - -- Remove a module and those that depend on it from the kernel: - -`sudo modprobe --remove-dependencies {{module_name}}` - -- Show a kernel module's dependencies: - -`sudo modprobe --show-depends {{module_name}}` diff --git a/pages.cn/linux/mpstat.md b/pages.cn/linux/mpstat.md deleted file mode 100644 index 8ca131933..000000000 --- a/pages.cn/linux/mpstat.md +++ /dev/null @@ -1,15 +0,0 @@ -# mpstat - -> Report CPU statistics. - -- Display CPU statistics every 2 seconds: - -`mpstat {{2}}` - -- Display 5 reports, one by one, at 2 second intervals: - -`mpstat {{2}} {{5}}` - -- Display 5 reports, one by one, from a given processor, at 2 second intervals: - -`mpstat -P {{0}} {{2}} {{5}}` diff --git a/pages.cn/linux/mycli.md b/pages.cn/linux/mycli.md deleted file mode 100644 index 72490483c..000000000 --- a/pages.cn/linux/mycli.md +++ /dev/null @@ -1,15 +0,0 @@ -# mycli - -> A CLI for MySQL, MariaDB, and Percona with auto-completion and syntax highlighting. - -- Connect to a database with the currently logged in user: - -`mycli {{database_name}}` - -- Connect to a database with the specified user: - -`mycli -u {{user}} {{database_name}}` - -- Connect to a database on the specified host with the specified user: - -`mycli -u {{user}} -h {{host}} {{database_name}}` diff --git a/pages.cn/linux/n.md b/pages.cn/linux/n.md deleted file mode 100644 index cc3db8f9f..000000000 --- a/pages.cn/linux/n.md +++ /dev/null @@ -1,23 +0,0 @@ -# n - -> Tool to manage multiple node versions. - -- Install a given version of node. If the version is already installed, it will be activated: - -`n {{version}}` - -- Display installed versions and interactively activate one of them: - -`n` - -- Remove a version: - -`n rm {{version}}` - -- Execute a file with a given version: - -`n use {{version}} {{file.js}}` - -- Output binary path for a version: - -`n bin {{version}}` diff --git a/pages.cn/linux/namei.md b/pages.cn/linux/namei.md deleted file mode 100644 index 211f24f58..000000000 --- a/pages.cn/linux/namei.md +++ /dev/null @@ -1,24 +0,0 @@ -# namei - -> Follows a pathname (which can be a symbolic link) until a terminal point is found (a file/directory/char device etc). -> This program is useful for finding "too many levels of symbolic links" problems. - -- Resolve the pathnames specified as the argument parameters: - -`namei {{path/to/a}} {{path/to/b}} {{path/to/c}}` - -- Display the results in a long-listing format: - -`namei --long {{path/to/a}} {{path/to/b}} {{path/to/c}}` - -- Show the mode bits of each file type in the style of `ls`: - -`namei --modes {{path/to/a}} {{path/to/b}} {{path/to/c}}` - -- Show owner and group name of each file: - -`namei --owners {{path/to/a}} {{path/to/b}} {{path/to/c}}` - -- Don't follow symlinks while resolving: - -`namei --nosymlinks {{path/to/a}} {{path/to/b}} {{path/to/c}}` diff --git a/pages.cn/linux/ncat.md b/pages.cn/linux/ncat.md deleted file mode 100644 index c8da3aad5..000000000 --- a/pages.cn/linux/ncat.md +++ /dev/null @@ -1,15 +0,0 @@ -# ncat - -> Use the normal `cat` functionality over networks. - -- Listen for input on the specified port and write it to the specified file: - -`ncat -l {{port}} > {{path/to/file}}` - -- Accept multiple connections and keep ncat open after they have been closed: - -`ncat -lk {{port}}` - -- Write output of specified file to the specified host on the specified port: - -`ncat {{address}} {{port}} < {{path/to/file}}` diff --git a/pages.cn/linux/ncdu.md b/pages.cn/linux/ncdu.md deleted file mode 100644 index f2c14616e..000000000 --- a/pages.cn/linux/ncdu.md +++ /dev/null @@ -1,19 +0,0 @@ -# ncdu - -> Disk usage analyzer with an ncurses interface. - -- Analyze the current working directory: - -`ncdu` - -- Analyze a given directory: - -`ncdu {{path/to/directory}}` - -- Save results to a file: - -`ncdu -o {{path/to/file}}` - -- Exclude files that match a pattern, argument can be given multiple times to add more patterns: - -`ncdu --exclude '{{*.txt}}'` diff --git a/pages.cn/linux/ndctl.md b/pages.cn/linux/ndctl.md deleted file mode 100644 index d0c7fb29e..000000000 --- a/pages.cn/linux/ndctl.md +++ /dev/null @@ -1,31 +0,0 @@ -# ndctl - -> Utility for managing Non-Volatile DIMMs. - -- Create an 'fsdax' mode namespace: - -`ndctl create-namespace --mode={{fsdax}}` - -- Change the mode of a namespace to 'raw': - -`ndctl create-namespace --reconfigure={{namespaceX.Y}} --mode={{raw}}` - -- Check a sector mode namespace for consistency, and repair if needed: - -`ndctl check-namespace --repair {{namespaceX.Y}}` - -- List all namespaces, regions, and buses (including disabled ones): - -`ndctl list --namespaces --regions --buses --idle` - -- List a specific namespace and include lots of additional information: - -`ndctl list -vvv --namespace={{namespaceX.Y}}` - -- Run a monitor to watch for SMART health events for NVDIMMs on the 'ACPI.NFIT' bus: - -`ndctl monitor --bus={{ACPI.NFIT}}` - -- Remove a namespace (when applicable) or reset it to an initial state: - -`ndctl destroy-namespace --force {{namespaceX.Y}}` diff --git a/pages.cn/linux/nethogs.md b/pages.cn/linux/nethogs.md deleted file mode 100644 index a602fa1ae..000000000 --- a/pages.cn/linux/nethogs.md +++ /dev/null @@ -1,19 +0,0 @@ -# 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}}` diff --git a/pages.cn/linux/netstat.md b/pages.cn/linux/netstat.md deleted file mode 100644 index 51a65aacc..000000000 --- a/pages.cn/linux/netstat.md +++ /dev/null @@ -1,35 +0,0 @@ -# netstat - -> Displays network-related information such as open connections, open socket ports, etc. - -- List all ports: - -`netstat -a` - -- List all listening ports: - -`netstat -l` - -- List listening TCP ports: - -`netstat -t` - -- Display PID and program names: - -`netstat -p` - -- List information continuously: - -`netstat -c` - -- List routes and do not resolve IP to hostname: - -`netstat -rn` - -- List listening TCP and UDP ports (+ user and process if you're root): - -`netstat -lepunt` - -- Print the routing table: - -`netstat -nr` diff --git a/pages.cn/linux/nft.md b/pages.cn/linux/nft.md deleted file mode 100644 index 329cd5d31..000000000 --- a/pages.cn/linux/nft.md +++ /dev/null @@ -1,32 +0,0 @@ -# nft - -> Allows configuration of tables, chains and rules provided by the Linux kernel firewall. -> Nftables replaces iptables. - -- View current configuration: - -`sudo nft list ruleset` - -- Add a new table with family "inet" and table "filter": - -`sudo nft add table {{inet}} {{filter}}` - -- Add a new chain to accept all inbound traffic: - -`sudo nft add chain {{inet}} {{filter}} {{input}} \{ type {{filter}} hook {{input}} priority {{0}} \; policy {{accept}} \}` - -- Add a new rule to accept several TCP ports: - -`sudo nft add rule {{inet}} {{filter}} {{input}} {{tcp}} {{dport \{ telnet, ssh, http, https \} accept}}` - -- Show rule handles: - -`sudo nft --handle --numeric list chain {{family}} {{table}} {{chain}}` - -- Delete a rule: - -`sudo nft delete rule {{inet}} {{filter}} {{input}} handle {{3}}` - -- Save current configuration: - -`sudo nft list ruleset > {{/etc/nftables.conf}}` diff --git a/pages.cn/linux/nm.md b/pages.cn/linux/nm.md deleted file mode 100644 index f2cfecdd6..000000000 --- a/pages.cn/linux/nm.md +++ /dev/null @@ -1,19 +0,0 @@ -# nm - -> List symbol names in object files. - -- List global (extern) functions in a file (prefixed with T): - -`nm -g {{file.o}}` - -- Demangle C++ symbols (make them readable): - -`nm --demangle {{file.o}}` - -- List only undefined symbols in a file: - -`nm -u {{file.o}}` - -- List all symbols, even debugging symbols: - -`nm -a {{file.o}}` diff --git a/pages.cn/linux/nmcli.md b/pages.cn/linux/nmcli.md deleted file mode 100644 index 6abe3bab4..000000000 --- a/pages.cn/linux/nmcli.md +++ /dev/null @@ -1,27 +0,0 @@ -# nmcli - -> A command line tool for controlling NetworkManager. - -- List all NetworkManager connections (shows name, uuid, type and device): - -`nmcli connection` - -- Print the available Wi-Fi access points: - -`nmcli device wifi` - -- Connect to the Wi-Fi network with a specified name and password: - -`nmcli device wifi connect {{name}} {{password}}` - -- Activate a connection by specifying an uuid: - -`nmcli connection up uuid {{uuid}}` - -- Deactivate a connection: - -`nmcli connection down uuid {{uuid}}` - -- Print statuses of network interfaces: - -`nmcli device status` diff --git a/pages.cn/linux/nmon.md b/pages.cn/linux/nmon.md deleted file mode 100644 index cad8bdb01..000000000 --- a/pages.cn/linux/nmon.md +++ /dev/null @@ -1,15 +0,0 @@ -# nmon - -> A system administrator, tuner, and benchmark tool. - -- Start nmon: - -`nmon` - -- Save records to file ("-s 300 -c 288" by default): - -`nmon -f` - -- Save records to file with a total of 240 measurements, by taking 30 seconds between each measurement: - -`nmon -f -s {{30}} -c {{240}}` diff --git a/pages.cn/linux/nmtui.md b/pages.cn/linux/nmtui.md deleted file mode 100644 index a0729376a..000000000 --- a/pages.cn/linux/nmtui.md +++ /dev/null @@ -1,24 +0,0 @@ -# nmtui - -> Text user interface for controlling NetworkManager. -> Use arrow keys to navigate, enter to select an option. - -- Open the user interface: - -`nmtui` - -- Show a list of available connections, with the option to activate or deactivate them: - -`nmtui connect` - -- Connect to a given network: - -`nmtui connect {{name|uuid|device|SSID}}` - -- Edit/Add/Delete a given network: - -`nmtui edit {{name|id}}` - -- Set the system hostname: - -`nmtui hostname` diff --git a/pages.cn/linux/notify-send.md b/pages.cn/linux/notify-send.md deleted file mode 100644 index 4083cfe01..000000000 --- a/pages.cn/linux/notify-send.md +++ /dev/null @@ -1,15 +0,0 @@ -# notify-send - -> Uses the current desktop environment's notification system to create a notification. - -- Show a notification with the title "Test" and the content "This is a test": - -`notify-send {{"Test"}} {{"This is a test"}}` - -- Show a notification with a custom icon: - -`notify-send -i {{icon.png}} {{"Test"}} {{"This is a test"}}` - -- Show a notification for 5 seconds: - -`notify-send -t 5000 {{"Test"}} {{"This is a test"}}` diff --git a/pages.cn/linux/ntfsfix.md b/pages.cn/linux/ntfsfix.md deleted file mode 100644 index 011934392..000000000 --- a/pages.cn/linux/ntfsfix.md +++ /dev/null @@ -1,7 +0,0 @@ -# ntfsfix - -> Fix common problems on an NTFS partition. - -- Fix a given NTFS partition: - -`sudo ntfsfix {{/dev/sdb2}}` diff --git a/pages.cn/linux/opkg.md b/pages.cn/linux/opkg.md deleted file mode 100644 index 309bccdaf..000000000 --- a/pages.cn/linux/opkg.md +++ /dev/null @@ -1,31 +0,0 @@ -# opkg - -> A lightweight package manager used to install OpenWrt packages. - -- Install a package: - -`opkg install {{package}}` - -- Remove a package: - -`opkg remove {{package}}` - -- Update the list of available packages: - -`opkg update` - -- Upgrade all the installed packages: - -`opkg upgrade` - -- Upgrade one or more specific package(s): - -`opkg upgrade {{package(s)}}` - -- Display informations for a specific package: - -`opkg info {{package}}` - -- List all the available packages: - -`opkg list` diff --git a/pages.cn/linux/pacaur.md b/pages.cn/linux/pacaur.md deleted file mode 100644 index 56028fc3d..000000000 --- a/pages.cn/linux/pacaur.md +++ /dev/null @@ -1,27 +0,0 @@ -# pacaur - -> A utility for Arch Linux to build and install packages from the Arch User Repository. - -- Synchronize and update all packages (includes AUR): - -`pacaur -Syu` - -- Synchronize and update only AUR packages: - -`pacaur -Syua` - -- Install a new package (includes AUR): - -`pacaur -S {{package_name}}` - -- Remove a package and its dependencies (includes AUR packages): - -`pacaur -Rs {{package_name}}` - -- Search the package database for a keyword (includes AUR): - -`pacaur -Ss {{keyword}}` - -- List all currently installed packages (includes AUR packages): - -`pacaur -Qs` diff --git a/pages.cn/linux/pacman.md b/pages.cn/linux/pacman.md deleted file mode 100644 index f10adff2e..000000000 --- a/pages.cn/linux/pacman.md +++ /dev/null @@ -1,35 +0,0 @@ -# pacman - -> Arch Linux package manager utility. - -- Synchronize and update all packages: - -`pacman -Syu` - -- Install a new package: - -`pacman -S {{package_name}}` - -- Remove a package and its dependencies: - -`pacman -Rs {{package_name}}` - -- Search the package database for a regular expression or keyword: - -`pacman -Ss "{{search_pattern}}"` - -- List installed packages and versions: - -`pacman -Q` - -- 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` diff --git a/pages.cn/linux/pamac.md b/pages.cn/linux/pamac.md deleted file mode 100644 index 00d01f16e..000000000 --- a/pages.cn/linux/pamac.md +++ /dev/null @@ -1,23 +0,0 @@ -# pamac - -> A command line utility for the GUI package manager pamac. - -- Install a new package: - -`pamac install {{package_name}}` - -- Remove a package and its no longer required dependencies (orphans): - -`pamac remove -o {{package_name}}` - -- Search the package database for a package: - -`pamac search {{package_name}}` - -- List installed packages: - -`pamac list -i` - -- Check for package updates: - -`pamac checkupdates` diff --git a/pages.cn/linux/pasuspender.md b/pages.cn/linux/pasuspender.md deleted file mode 100644 index 284432268..000000000 --- a/pages.cn/linux/pasuspender.md +++ /dev/null @@ -1,7 +0,0 @@ -# pasuspender - -> Temporarily suspends `pulseaudio` while another command is running to allow access to alsa. - -- Suspend pulseaudio while running `jackd`: - -`pasuspender -- {{jackd -d alsa --device hw:0}}` diff --git a/pages.cn/linux/pdfgrep.md b/pages.cn/linux/pdfgrep.md deleted file mode 100644 index 5e229a05b..000000000 --- a/pages.cn/linux/pdfgrep.md +++ /dev/null @@ -1,23 +0,0 @@ -# pdfgrep - -> Search text in PDF files. - -- Find lines that match pattern in a PDF: - -`pdfgrep {{pattern}} {{file.pdf}}` - -- Include file name and page number for each matched line: - -`pdfgrep --with-filename --page-number {{pattern}} {{file.pdf}}` - -- Do a case insensitive search for lines that begin with "foo" and return the first 3 matches: - -`pdfgrep --max-count {{3}} --ignore-case {{'^foo'}} {{file.pdf}}` - -- Find pattern in files with a .pdf extension in the current directory recursively: - -`pdfgrep --recursive {{pattern}}` - -- Find pattern on files that match a specific glob in the current directory recursively: - -`pdfgrep --recursive --include {{'*book.pdf'}} {{pattern}}` diff --git a/pages.cn/linux/perf.md b/pages.cn/linux/perf.md deleted file mode 100644 index 4ea729365..000000000 --- a/pages.cn/linux/perf.md +++ /dev/null @@ -1,19 +0,0 @@ -# perf - -> Framework for linux performance counter measurements. - -- Display basic performance counter stats for a command: - -`perf stat {{gcc hello.c}}` - -- Display system-wide real time performance counter profile: - -`sudo perf top` - -- Run a command and record its profile into "perf.data": - -`sudo perf record {{command}}` - -- Read "perf.data" (created by `perf record`) and display the profile: - -`sudo perf report` diff --git a/pages.cn/linux/phar.md b/pages.cn/linux/phar.md deleted file mode 100644 index d873a006f..000000000 --- a/pages.cn/linux/phar.md +++ /dev/null @@ -1,35 +0,0 @@ -# phar - -> Create, update or extract PHP archives (PHAR). - -- Add space-separated files or directories to a Phar file: - -`phar add -f {{path/to/phar_file}} {{files_or_directories}}` - -- Display the contents of a Phar file: - -`phar list -f {{path/to/phar_file}}` - -- Delete the specified file or directory from a Phar file: - -`phar delete -f {{path/to/phar_file}} -e {{file_or_directory}}` - -- Display full usage information and available hashing/compression algorithms: - -`phar help` - -- Compress or uncompress files and directories in a Phar file: - -`phar compress -f {{path/to/phar_file}} -c {{algorithm}}` - -- Get information about a Phar file: - -`phar info -f {{path/to/phar_file}}` - -- Sign a Phar file with a specific hash algorithm: - -`phar sign -f {{path/to/phar_file}} -h {{algorithm}}` - -- Sign a Phar file with an OpenSSL private key: - -`phar sign -f {{path/to/phar_file}} -h openssl -y {{path/to/private_key}}` diff --git a/pages.cn/linux/pkgadd.md b/pages.cn/linux/pkgadd.md deleted file mode 100644 index 5a22fd3c3..000000000 --- a/pages.cn/linux/pkgadd.md +++ /dev/null @@ -1,11 +0,0 @@ -# pkgadd - -> Add a package to a CRUX system. - -- Install a local software package: - -`pkgadd {{package_name}}` - -- Update an already installed package from a local package: - -`pkgadd -u {{package_name}}` diff --git a/pages.cn/linux/pkginfo.md b/pages.cn/linux/pkginfo.md deleted file mode 100644 index 567aefbaa..000000000 --- a/pages.cn/linux/pkginfo.md +++ /dev/null @@ -1,19 +0,0 @@ -# pkginfo - -> Query the package database on a CRUX system. - -- List installed packages and their versions: - -`pkginfo -i` - -- List files owned by a package: - -`pkginfo -l {{package_name}}` - -- List the owner(s) of files matching a pattern: - -`pkginfo -o {{pattern}}` - -- Print the footprint of a file: - -`pkginfo -f {{file}}` diff --git a/pages.cn/linux/pkgmk.md b/pages.cn/linux/pkgmk.md deleted file mode 100644 index 3f9ea5f58..000000000 --- a/pages.cn/linux/pkgmk.md +++ /dev/null @@ -1,27 +0,0 @@ -# pkgmk - -> Make a binary package for use with pkgadd on CRUX. - -- Make and download a package: - -`pkgmk -d` - -- Install the package after making it: - -`pkgmk -d -i` - -- Upgrade the package after making it: - -`pkgmk -d -u` - -- Ignore the footprint when making a package: - -`pkgmk -d -if` - -- Ignore the MD5 sum when making a package: - -`pkgmk -d -im` - -- Update the package's footprint: - -`pkgmk -uf` diff --git a/pages.cn/linux/pkgrm.md b/pages.cn/linux/pkgrm.md deleted file mode 100644 index c19740034..000000000 --- a/pages.cn/linux/pkgrm.md +++ /dev/null @@ -1,7 +0,0 @@ -# pkgrm - -> Remove a package from a CRUX system. - -- Remove an installed package: - -`pkgrm {{package_name}}` diff --git a/pages.cn/linux/playerctl.md b/pages.cn/linux/playerctl.md deleted file mode 100644 index 3c1212055..000000000 --- a/pages.cn/linux/playerctl.md +++ /dev/null @@ -1,27 +0,0 @@ -# playerctl - -> Utility to control different media players. - -- Toggle play: - -`playerctl play-pause` - -- Next media: - -`playerctl next` - -- Previous media: - -`playerctl previous` - -- List all players: - -`playerctl --list-all` - -- Send a command to a specific player: - -`playerctl --player={{player_name}} {{command}}` - -- Send a command to all players: - -`playerctl --all-players {{command}}` diff --git a/pages.cn/linux/popd.md b/pages.cn/linux/popd.md deleted file mode 100644 index 34576cbe7..000000000 --- a/pages.cn/linux/popd.md +++ /dev/null @@ -1,15 +0,0 @@ -# popd - -> Remove a directory placed on the directory stack by the `pushd` command. - -- Remove the top directory from the stack and cd to it: - -`popd` - -- Remove the Nth directory (starting from zero to the left from the list printed with `dirs`): - -`popd +N` - -- Remove the Nth directory (starting from zero to the right from the list printed with `dirs`): - -`popd -N` diff --git a/pages.cn/linux/ports.md b/pages.cn/linux/ports.md deleted file mode 100644 index 97372e95f..000000000 --- a/pages.cn/linux/ports.md +++ /dev/null @@ -1,15 +0,0 @@ -# ports - -> Update/list the ports tree on a CRUX system. - -- Update the ports tree: - -`ports -u` - -- List the ports in the current tree: - -`ports -l` - -- Check the differences between installed packages and the ports tree: - -`ports -d` diff --git a/pages.cn/linux/poweroff.md b/pages.cn/linux/poweroff.md deleted file mode 100644 index 370a38128..000000000 --- a/pages.cn/linux/poweroff.md +++ /dev/null @@ -1,7 +0,0 @@ -# poweroff - -> Shutdown the system. - -- Poweroff the system: - -`sudo poweroff` diff --git a/pages.cn/linux/print.md b/pages.cn/linux/print.md deleted file mode 100644 index 03088430c..000000000 --- a/pages.cn/linux/print.md +++ /dev/null @@ -1,12 +0,0 @@ -# print - -> An alias to a `run-mailcap`'s action print. -> Originally `run-mailcap` is used to process mime-type/file. - -- Print action can be used to print any file on default run-mailcap tool: - -`print {{filename}}` - -- With `run-mailcap`: - -`run-mailcap --action=print {{filename}}` diff --git a/pages.cn/linux/prt-get.md b/pages.cn/linux/prt-get.md deleted file mode 100644 index 4968b7912..000000000 --- a/pages.cn/linux/prt-get.md +++ /dev/null @@ -1,31 +0,0 @@ -# prt-get - -> The advanced CRUX package manager. - -- Install a package: - -`prt-get install {{package_name}}` - -- Install a package with dependency handling: - -`prt-get depinst {{package_name}}` - -- Update a package manually: - -`prt-get upgrade {{package_name}}` - -- Remove a package: - -`prt-get remove {{package_name}}` - -- Upgrade the system from the local ports tree: - -`prt-get sysup` - -- Search the ports tree: - -`prt-get search {{package_name}}` - -- Search for a file in a package: - -`prt-get fsearch {{file}}` diff --git a/pages.cn/linux/pstree.md b/pages.cn/linux/pstree.md deleted file mode 100644 index ad5ef346b..000000000 --- a/pages.cn/linux/pstree.md +++ /dev/null @@ -1,15 +0,0 @@ -# pstree - -> A convenient tool to show running processes as a tree. - -- Display a tree of processes: - -`pstree` - -- Display a tree of processes with PIDs: - -`pstree -p` - -- Display all process trees rooted at processes owned by specified user: - -`pstree {{user}}` diff --git a/pages.cn/linux/pulseaudio.md b/pages.cn/linux/pulseaudio.md deleted file mode 100644 index d048441af..000000000 --- a/pages.cn/linux/pulseaudio.md +++ /dev/null @@ -1,23 +0,0 @@ -# pulseaudio - -> The pulseaudio sound system daemon and manager. - -- Check if pulseaudio is running (a non-zero exit code means it is not running): - -`pulseaudio --check` - -- Start the pulseaudio daemon in the background: - -`pulseaudio --start` - -- Kill the running pulseaudio daemon: - -`pulseaudio --kill` - -- List available modules: - -`pulseaudio --dump-modules` - -- Load a module into the currently running daemon with the specified arguments: - -`pulseaudio --load="{{module_name}} {{arguments}}"` diff --git a/pages.cn/linux/pushd.md b/pages.cn/linux/pushd.md deleted file mode 100644 index 56095473e..000000000 --- a/pages.cn/linux/pushd.md +++ /dev/null @@ -1,16 +0,0 @@ -# pushd - -> Place a directory on a stack so it can be accessed later. -> See also `popd` to switch back to original directory. - -- Switch to directory and push it on the stack: - -`pushd < {{directory}}` - -- Switch first and second directories on the stack: - -`pushd` - -- Rotate stack by making the 5th element the top of the stack: - -`pushd +4` diff --git a/pages.cn/linux/pvcreate.md b/pages.cn/linux/pvcreate.md deleted file mode 100644 index 2cccd9b90..000000000 --- a/pages.cn/linux/pvcreate.md +++ /dev/null @@ -1,11 +0,0 @@ -# pvcreate - -> Initialize a physical volume (disk or partition) for use by the Logical Volume Manager (LVM). - -- Initialize the `/dev/sda1` volume for use by LVM: - -`pvcreate {{/dev/sda1}}` - -- Force the creation without any confirmation prompts: - -`pvcreate --force {{/dev/sda1}}` diff --git a/pages.cn/linux/pwgen.md b/pages.cn/linux/pwgen.md deleted file mode 100644 index 70f4cc67f..000000000 --- a/pages.cn/linux/pwgen.md +++ /dev/null @@ -1,15 +0,0 @@ -# pwgen - -> Generate pronounceable passwords. - -- Generate random password with s[y]mbols: - -`pwgen -y {{length}}` - -- Generate secure, hard-to-memorize passwords: - -`pwgen -s {{length}}` - -- Generate password with at least one capital letter in them: - -`pwgen -c {{length}}` diff --git a/pages.cn/linux/qsub.md b/pages.cn/linux/qsub.md deleted file mode 100644 index 9a8558b86..000000000 --- a/pages.cn/linux/qsub.md +++ /dev/null @@ -1,19 +0,0 @@ -# qsub - -> Submits a script to the queue management system TORQUE. - -- Submit a script with default settings (depends on TORQUE settings): - -`qsub {{script.sh}}` - -- Submit a script with a specified wallclock runtime limit of 1 hour, 2 minutes and 3 seconds: - -`qsub -l walltime={{1}}:{{2}}:{{3}} {{script.sh}}` - -- Submit a script that is executed on 2 nodes using 4 cores per node: - -`qsub -l nodes={{2}}:ppn={{4}} {{script.sh}}` - -- Submit a script to a specific queue. Note that different queues can have different maximum and minimum runtime limits: - -`qsub -q {{queue_name}} {{script.sh}}` diff --git a/pages.cn/linux/quotacheck.md b/pages.cn/linux/quotacheck.md deleted file mode 100644 index 28edc2daf..000000000 --- a/pages.cn/linux/quotacheck.md +++ /dev/null @@ -1,28 +0,0 @@ -# quotacheck - -> Scan a filesystem for disk usage; create, check and repair quota files. -> It is best to run quota check with quotas turned off to prevent damage or loss to quota files. - -- Check quotas on all mounted non-NFS filesystems: - -`sudo quotacheck --all` - -- Force check even if quotas are enabled (this can cause damage or loss to quota files): - -`sudo quotacheck --force {{mountpoint}}` - -- Check quotas on a given filesystem in debug mode: - -`sudo quotacheck --debug {{mountpoint}}` - -- Check quotas on a given filesystem, displaying the progress: - -`sudo quotacheck --verbose {{mountpoint}}` - -- Check user quotas: - -`sudo quotacheck --user {{user}} {{mountpoint}}` - -- Check group quotas: - -`sudo quotacheck --group {{group}} {{mountpoint}}` diff --git a/pages.cn/linux/rdesktop.md b/pages.cn/linux/rdesktop.md deleted file mode 100644 index 227bdfe29..000000000 --- a/pages.cn/linux/rdesktop.md +++ /dev/null @@ -1,28 +0,0 @@ -# rdesktop - -> Remote Desktop Protocol client. -> It can be used to connect the remote computer using the RDP protocol. - -- Connect to a remote computer (default port is 3389): - -`rdesktop -u {{username}} -p {{password}} {{host:port}}` - -- Simple Examples: - -`rdesktop -u Administrator -p passwd123 192.168.1.111:3389` - -- Connect to a remote computer with full screen (press `Ctrl + Alt + Enter` to exist): - -`rdesktop -u {{username}} -p {{password}} -f {{host:port}}` - -- Use the customed resolution (use the letter 'x' between the number): - -`rdesktop -u {{username}} -p {{password}} -g 1366x768 {{host:port}}` - -- Connect to a remote computer using domain user: - -`rdesktop -u {{username}} -p {{password}} -d {{domainname}} {{host:port}}` - -- Use the 16 bit color (speed up): - -`rdesktop -u {{username}} -p {{password}} -a 16 {{host:port}}` diff --git a/pages.cn/linux/reboot.md b/pages.cn/linux/reboot.md deleted file mode 100644 index 32e9538d5..000000000 --- a/pages.cn/linux/reboot.md +++ /dev/null @@ -1,11 +0,0 @@ -# reboot - -> Reboot the system. - -- Reboot immediately: - -`reboot` - -- Reboot immediately without gracefully shutdown: - -`reboot -f` diff --git a/pages.cn/linux/reflector.md b/pages.cn/linux/reflector.md deleted file mode 100644 index d41cc6513..000000000 --- a/pages.cn/linux/reflector.md +++ /dev/null @@ -1,15 +0,0 @@ -# reflector - -> Arch script to fetch and sort mirrorlists. - -- Get all mirrors, sort for download speed and save them: - -`sudo reflector --sort {{rate}} --save {{/etc/pacman.d/mirrorlist}}` - -- Only get German HTTPS mirrors: - -`reflector --country {{Germany}} --protocol {{https}}` - -- Only get the 10 recently sync'd mirrors: - -`reflector --latest {{10}}` diff --git a/pages.cn/linux/repquota.md b/pages.cn/linux/repquota.md deleted file mode 100644 index 64de3d0d3..000000000 --- a/pages.cn/linux/repquota.md +++ /dev/null @@ -1,27 +0,0 @@ -# repquota - -> Display a summary of existing file quotas for a filesystem. - -- Report stats for all quotas in use: - -`sudo repquota -all` - -- Report quota stats for all users, even those who aren't using any of their quota: - -`sudo repquota -v {{filesystem}}` - -- Report on quotas for users only: - -`repquota --user {{filesystem}}` - -- Report on quotas for groups only: - -`sudo repquota --group {{filesystem}}` - -- Report on used quota and limits in a human-readable format: - -`sudo repquota --human-readable {{filesystem}}` - -- Report on all quotas for users and groups in a human-readable format: - -`sudo repquota -augs` diff --git a/pages.cn/linux/reset.md b/pages.cn/linux/reset.md deleted file mode 100644 index 2eb6954c0..000000000 --- a/pages.cn/linux/reset.md +++ /dev/null @@ -1,11 +0,0 @@ -# reset - -> Reinitialises the current terminal. Clears the entire terminal screen. - -- Reinitialise the current terminal: - -`reset` - -- Display the terminal type instead: - -`reset -q` diff --git a/pages.cn/linux/rfkill.md b/pages.cn/linux/rfkill.md deleted file mode 100644 index 9ecdb7dbf..000000000 --- a/pages.cn/linux/rfkill.md +++ /dev/null @@ -1,23 +0,0 @@ -# rfkill - -> Enable and disable wireless devices. - -- List devices: - -`rfkill` - -- Filter by columns: - -`rfkill -o {{ID,TYPE,DEVICE}}` - -- Block devices by type (e.g. bluetooth, wlan): - -`rfkill block {{bluetooth}}` - -- Unblock devices by type (e.g. bluetooth, wlan): - -`rfkill unblock {{wlan}}` - -- Output in JSON format: - -`rfkill -J` diff --git a/pages.cn/linux/rofi.md b/pages.cn/linux/rofi.md deleted file mode 100644 index 44b7aaf8e..000000000 --- a/pages.cn/linux/rofi.md +++ /dev/null @@ -1,15 +0,0 @@ -# rofi - -> An application launcher and window switcher. - -- Show the list of apps: - -`rofi -show drun` - -- Show the list of all commands: - -`rofi -show run` - -- Switch between windows: - -`rofi -show window` diff --git a/pages.cn/linux/rpcinfo.md b/pages.cn/linux/rpcinfo.md deleted file mode 100644 index 70ad2dd2d..000000000 --- a/pages.cn/linux/rpcinfo.md +++ /dev/null @@ -1,23 +0,0 @@ -# rpcinfo - -> Makes an RPC call to an RPC server and reports what it finds. - -- Show full table of all RPC services registered on localhost: - -`rpcinfo` - -- Show concise table of all RPC services registered on localhost: - -`rpcinfo -s {{localhost}}` - -- Display table of statistics of rpcbind operations on localhost: - -`rpcinfo -m` - -- Display list of entries of given service name (mountd) and version number (2) on a remote nfs share: - -`rpcinfo -l {{remote_nfs_server_ip}} {{mountd}} {{2}}` - -- Delete the registration for version 1 of the mountd service for all transports: - -`rpcinfo -d {{mountd}} {{1}}` diff --git a/pages.cn/linux/rpm.md b/pages.cn/linux/rpm.md deleted file mode 100644 index ea62afdc1..000000000 --- a/pages.cn/linux/rpm.md +++ /dev/null @@ -1,27 +0,0 @@ -# rpm - -> RPM Package Manager. - -- Show version of httpd package: - -`rpm -q {{httpd}}` - -- List versions of all matching packages: - -`rpm -qa '{{mariadb*}}'` - -- Identify owner of a file and show version of the package: - -`rpm -qf {{/etc/postfix/main.cf}}` - -- List package-owned files: - -`rpm -ql {{kernel}}` - -- Show scriptlets from an RPM file: - -`rpm -qp --scripts {{some.rpm}}` - -- Show changed, missing and/or incorrectly installed files of matching packages: - -`rpm -Va '{{php-*}}'` diff --git a/pages.cn/linux/rspamc.md b/pages.cn/linux/rspamc.md deleted file mode 100644 index 32d7284c7..000000000 --- a/pages.cn/linux/rspamc.md +++ /dev/null @@ -1,19 +0,0 @@ -# rspamc - -> Command line client for rspamd servers. - -- Train the bayesian filter to recognise an email as spam: - -`rspamc learn_spam {{path/to/email_file}}` - -- Train the bayesian filter to recognise an email as ham: - -`rspamc learn_ham {{path/to/email_file}}` - -- Generate a manual report on an email: - -`rspamc symbols {{path/to/email_file}}` - -- Show server statistics: - -`rspamc stat` diff --git a/pages.cn/linux/rtcwake.md b/pages.cn/linux/rtcwake.md deleted file mode 100644 index 89ca07c01..000000000 --- a/pages.cn/linux/rtcwake.md +++ /dev/null @@ -1,27 +0,0 @@ -# rtcwake - -> Enter a system sleep state until specified wakeup time relative to your bios clock. - -- Show whether an alarm is set or not: - -`sudo rtcwake -m show -v` - -- Suspend to ram and wakeup after 10 seconds: - -`sudo rtcwake -m mem -s {{10}}` - -- Suspend to disk (higher power saving) and wakeup 15 minutes later: - -`sudo rtcwake -m disk --date +{{15}}min` - -- Freeze the system (more efficient than suspend-to-ram but linux > 3.9 required) and wakeup at a given date and time: - -`sudo rtcwake -m freeze --date {{YYYYMMDDhhmm}}` - -- Disable a previously set alarm: - -`sudo rtc -m disable` - -- Perform a dry run to wakup the computer at a given time. (Press Ctrl + C to abort): - -`sudo rtcwake -m on --date {{hh:ss}}` diff --git a/pages.cn/linux/rtorrent.md b/pages.cn/linux/rtorrent.md deleted file mode 100644 index 14cf9d7e8..000000000 --- a/pages.cn/linux/rtorrent.md +++ /dev/null @@ -1,19 +0,0 @@ -# rtorrent - -> Download torrents over the command line. - -- Add a torrent file or magnet to be downloaded: - -`rtorrent {{torrent_or_magnet}}` - -- Start the download: - -`S` - -- View details about downloading torrent: - -`->` - -- Close rtorrent safely: - -`Q` diff --git a/pages.cn/linux/run-mailcap.md b/pages.cn/linux/run-mailcap.md deleted file mode 100644 index 76dbfe32d..000000000 --- a/pages.cn/linux/run-mailcap.md +++ /dev/null @@ -1,24 +0,0 @@ -# run-mailcap - -> Run MailCap Programs. -> Run mailcap view, see, edit, compose, print - execute programs via entries in the mailcap file (or any of its aliases) will use the given action to process each mime-type/file. - -- Individual actions/programs on run-mailcap can be invoked with action flag: - -`run-mailcap --action=ACTION [--option[=value]]` - -- In simple language: - -`run-mailcap --action=ACTION {{filename}}` - -- Turn on extra information: - -`run-mailcap --action=ACTION --debug {{filename}}` - -- Ignore any "copiousoutput" directive and forward output to STD‐OUT: - -`run-mailcap --action=ACTION --nopager {{filename}}` - -- Display the found command without actually executing it: - -`run-mailcap --action=ACTION --norun {{filename}}` diff --git a/pages.cn/linux/runit.md b/pages.cn/linux/runit.md deleted file mode 100644 index 841092117..000000000 --- a/pages.cn/linux/runit.md +++ /dev/null @@ -1,11 +0,0 @@ -# runit - -> 3-stage init system. - -- Start runit's 3-stage init scheme: - -`runit` - -- Shut down runit: - -`kill --CONT {{runit_pid}}` diff --git a/pages.cn/linux/runsv.md b/pages.cn/linux/runsv.md deleted file mode 100644 index 8b131ae6a..000000000 --- a/pages.cn/linux/runsv.md +++ /dev/null @@ -1,11 +0,0 @@ -# runsv - -> Start and manage a runit service. - -- Start a runit service as the current user: - -`runsv {{path/to/service}}` - -- Start a runit service as root: - -`sudo runsv {{path/to/service}}` diff --git a/pages.cn/linux/runsvchdir.md b/pages.cn/linux/runsvchdir.md deleted file mode 100644 index 91ee11444..000000000 --- a/pages.cn/linux/runsvchdir.md +++ /dev/null @@ -1,7 +0,0 @@ -# runsvchdir - -> Change the directory `runsvdir` uses by default. - -- Switch `runsvdir` directories: - -`sudo runsvchdir {{/path/to/directory}}` diff --git a/pages.cn/linux/runsvdir.md b/pages.cn/linux/runsvdir.md deleted file mode 100644 index bc1ad17b1..000000000 --- a/pages.cn/linux/runsvdir.md +++ /dev/null @@ -1,15 +0,0 @@ -# runsvdir - -> Run an entire directory of services. - -- Start and manage all services in a directory as the current user: - -`runsvdir {{path/to/services}}` - -- Start and manage all services in a directory as root: - -`sudo runsvdir {{path/to/services}}` - -- Start services in separate sessions: - -`runsvdir -P {{path/to/services}}` diff --git a/pages.cn/linux/sar.md b/pages.cn/linux/sar.md deleted file mode 100644 index f3d04ee03..000000000 --- a/pages.cn/linux/sar.md +++ /dev/null @@ -1,27 +0,0 @@ -# sar - -> Monitor performance of various Linux subsystems. - -- Report I/O and transfer rate issued to physical devices, one per second (press CTRL+C to quit): - -`sar -b {{1}}` - -- Report a total of 10 network device statistics, one per 2 seconds: - -`sar -n DEV {{2}} {{10}}` - -- Report CPU utilization, one per 2 seconds: - -`sar -u ALL {{2}}` - -- Report a total of 20 memory utilization statistics, one per second: - -`sar -r ALL {{1}} {{20}}` - -- Report the run queue length and load averages, one per second: - -`sar -q {{1}}` - -- Report paging statistics, one per 5 seconds: - -`sar -B {{5}}` diff --git a/pages.cn/linux/sbatch.md b/pages.cn/linux/sbatch.md deleted file mode 100644 index 34c53678a..000000000 --- a/pages.cn/linux/sbatch.md +++ /dev/null @@ -1,19 +0,0 @@ -# sbatch - -> Submit a batch job to the SLURM scheduler. - -- Submit a batch job: - -`sbatch {{path/to/job.sh}}` - -- Submit a batch job with a custom name: - -`sbatch --job-name={{myjob}} {{path/to/job.sh}}` - -- Submit a batch job with a time limit of 30 minutes: - -`sbatch --time={{00:30:00}} {{path/to/job.sh}}` - -- Submit a job and request multiple nodes: - -`sbatch --nodes={{3}} {{path/to/job.sh}}` diff --git a/pages.cn/linux/see.md b/pages.cn/linux/see.md deleted file mode 100644 index c9ba69dbb..000000000 --- a/pages.cn/linux/see.md +++ /dev/null @@ -1,12 +0,0 @@ -# see - -> Alias to `run-mailcap`'s view. -> An alias to a `run-mailcap`'s action print. - -- See action can be used to view any file (usually image) on default mailcap explorer: - -`see {{filename}}` - -- Using with `run-mailcap`: - -`run-mailcap --action=view {{filename}}` diff --git a/pages.cn/linux/sensible-browser.md b/pages.cn/linux/sensible-browser.md deleted file mode 100644 index ccb8b2cac..000000000 --- a/pages.cn/linux/sensible-browser.md +++ /dev/null @@ -1,11 +0,0 @@ -# sensible-browser - -> Open the default browser. - -- Open a new window of the default browser: - -`sensible-browser` - -- Open a url in the default browser: - -`sensible-browser {{url}}` diff --git a/pages.cn/linux/service.md b/pages.cn/linux/service.md deleted file mode 100644 index 0b8110ab1..000000000 --- a/pages.cn/linux/service.md +++ /dev/null @@ -1,20 +0,0 @@ -# service - -> Manage services by running init scripts. -> The full script path should be omitted (/etc/init.d/ is assumed). - -- Start/Stop/Restart/Reload service (start/stop should always be available): - -`service {{init_script}} {{start|stop|restart|reload}}` - -- Do a full restart (runs script twice with start and stop): - -`service {{init_script}} --full-restart` - -- Show the current status of a service: - -`service {{init_script}} status` - -- List the status of all services: - -`service --status-all` diff --git a/pages.cn/linux/setfacl.md b/pages.cn/linux/setfacl.md deleted file mode 100644 index 2ef3268ea..000000000 --- a/pages.cn/linux/setfacl.md +++ /dev/null @@ -1,19 +0,0 @@ -# setfacl - -> Set file access control lists (ACL). - -- Modify ACL of a file for user with read and write access: - -`setfacl -m u:{{username}}:rw {{file}}` - -- Modify default ACL of a file for all users: - -`setfacl -d -m u::rw {{file}}` - -- Remove ACL of a file for an user: - -`setfacl -x u:{{username}} {{file}}` - -- Remove all ACL entries of a file: - -`setfacl -b {{file}}` diff --git a/pages.cn/linux/shasum.md b/pages.cn/linux/shasum.md deleted file mode 100644 index 64e658ea8..000000000 --- a/pages.cn/linux/shasum.md +++ /dev/null @@ -1,23 +0,0 @@ -# shasum - -> Calculate or check cryptographic SHA checksums. - -- Calculate the SHA1 checksum for a file: - -`shasum {{filename}}` - -- Calculate the SHA256 checksum for a file: - -`shasum --algorithm 256 {{filename}}` - -- Calculate the SHA512 checksum for multiple files: - -`shasum --algorithm 512 {{filename1}} {{filename2}}` - -- Check a file with a list of sums against the directory's files: - -`shasum --check {{list_file}}` - -- Calculate the SHA1 checksum from stdin: - -`{{somecommand}} | shasum` diff --git a/pages.cn/linux/shutdown.md b/pages.cn/linux/shutdown.md deleted file mode 100644 index 481a1f14f..000000000 --- a/pages.cn/linux/shutdown.md +++ /dev/null @@ -1,23 +0,0 @@ -# shutdown - -> Shutdown and reboot the system. - -- Power off (halt) immediately: - -`shutdown -h now` - -- Reboot immediately: - -`shutdown -r now` - -- Reboot in 5 minutes: - -`shutdown -r +{{5}} &` - -- Shutdown at 1:00 pm (Uses 24h clock): - -`shutdown -h 13:00` - -- Cancel a pending shutdown/reboot operation: - -`shutdown -c` diff --git a/pages.cn/linux/sinfo.md b/pages.cn/linux/sinfo.md deleted file mode 100644 index 1fbaff2ea..000000000 --- a/pages.cn/linux/sinfo.md +++ /dev/null @@ -1,23 +0,0 @@ -# sinfo - -> View information about SLURM nodes and partitions. - -- View info about available partitions: - -`sinfo` - -- View info about a specific partition: - -`sinfo -p {{partition}}` - -- View info about available nodes: - -`sinfo -N` - -- View info about dead nodes: - -`sinfo -d` - -- View info about idle nodes: - -`sinfo -t {{idle}}` diff --git a/pages.cn/linux/slapt-get.md b/pages.cn/linux/slapt-get.md deleted file mode 100644 index 0af3c82d6..000000000 --- a/pages.cn/linux/slapt-get.md +++ /dev/null @@ -1,28 +0,0 @@ -# slapt-get - -> An apt like system for Slackware package management. -> Package sources need to be configured in the slapt-getrc file. - -- Update the list of available packages and versions: - -`slapt-get --update` - -- Install a package, or update it to the latest available version: - -`slapt-get --install {{package_name}}` - -- Remove a package: - -`slapt-get --remove {{package_name}}` - -- Upgrade all installed packages to their latest available versions: - -`slapt-get --upgrade {{package_name}}` - -- Locate packages of interest by the package name, disk set, or version: - -`slapt-get --search {{package_name}}` - -- Show information about a package: - -`slapt-get --show {{package_name}}` diff --git a/pages.cn/linux/sm.md b/pages.cn/linux/sm.md deleted file mode 100644 index 66eb631b2..000000000 --- a/pages.cn/linux/sm.md +++ /dev/null @@ -1,27 +0,0 @@ -# sm - -> Displays a short message fullscreen. - -- Display a message fullscreen: - -`sm {{Hello World!}}` - -- Display a message with inverted colors: - -`sm -i {{Hello World!}}` - -- Display a message with a foreground color: - -`sm -f {{blue}} {{Hello World!}}` - -- Display a message with a background color: - -`sm -b {{#008888}} {{Hello World!}}` - -- Rotate the displayed message by n times 90 degrees: - -`sm -r {{3}} {{Hello World!}}` - -- Pipe a message to sm: - -`{{echo Hello World!}} | sm -` diff --git a/pages.cn/linux/smbclient.md b/pages.cn/linux/smbclient.md deleted file mode 100644 index a9cd0beee..000000000 --- a/pages.cn/linux/smbclient.md +++ /dev/null @@ -1,23 +0,0 @@ -# smbclient - -> FTP-like client to access SMB/CIFS resources on servers. - -- Connect to a share (user will be prompted for password; `exit` to quit the session): - -`smbclient {{//server/share}}` - -- Connect with a different username: - -`smbclient {{//server/share}} --user {{username}}` - -- Connect with a username and password: - -`smbclient {{//server/share}} --user {{username%password}}` - -- Download a file from the server: - -`smbclient {{//server/share}} --directory {{path/to/folder}} --command "get {{file.txt}}"` - -- Upload a file to the server: - -`smbclient {{//server/share}} --directory {{path/to/folder}} --command "put {{file.txt}}"` diff --git a/pages.cn/linux/snap.md b/pages.cn/linux/snap.md deleted file mode 100644 index 415ee3bff..000000000 --- a/pages.cn/linux/snap.md +++ /dev/null @@ -1,28 +0,0 @@ -# snap - -> Tool for managing the "snap" self-contained software packages. -> Similar to what `apt` is for ".deb". - -- Search for a package: - -`snap find {{package_name}}` - -- Install a package: - -`snap install {{package_name}}` - -- Update all packages: - -`snap refresh` - -- Display basic information about installed snap software: - -`snap list` - -- Uninstall a package: - -`snap remove {{package_name}}` - -- Check for recent snap changes in the system: - -`snap changes` diff --git a/pages.cn/linux/snapper.md b/pages.cn/linux/snapper.md deleted file mode 100644 index 89b2c2197..000000000 --- a/pages.cn/linux/snapper.md +++ /dev/null @@ -1,27 +0,0 @@ -# snapper - -> Filesystem snapshot management tool. - -- List snapshot configs: - -`snapper list-configs` - -- Create snapper config: - -`snapper -c {{config}} create-config {{path/to/directory}}` - -- List snapshots for a config: - -`snapper -c {{config}} list` - -- Create a new snapshot: - -`snapper -c {{config}} snapshot` - -- Delete a snapshot: - -`snapper -c {{config}} delete {{snapshot_number}}` - -- Delete a range of snapshots: - -`snapper -c {{config}} delete {{snapshot_X}}-{{snapshot_Y}}` diff --git a/pages.cn/linux/squeue.md b/pages.cn/linux/squeue.md deleted file mode 100644 index fdcb4d33d..000000000 --- a/pages.cn/linux/squeue.md +++ /dev/null @@ -1,19 +0,0 @@ -# squeue - -> View the jobs queued in the SLURM scheduler. - -- View the queue: - -`squeue` - -- View jobs queued by a specific user: - -`squeue -u {{username}}` - -- View the queue and refresh every 5 seconds: - -`squeue -i {{5}}` - -- View the queue with expected start times: - -`squeue --start` diff --git a/pages.cn/linux/ss.md b/pages.cn/linux/ss.md deleted file mode 100644 index a8940c1f1..000000000 --- a/pages.cn/linux/ss.md +++ /dev/null @@ -1,27 +0,0 @@ -# ss - -> Utility to investigate sockets. - -- Show all TCP/UDP/RAW/UNIX sockets: - -`ss -a {{-t|-u|-w|-x}}` - -- Filter TCP sockets by states, only/exclude: - -`ss {{state/exclude}} {{bucket/big/connected/synchronized/...}}` - -- Show all TCP sockets connected to the local HTTPS port (443): - -`ss -t src :{{443}}` - -- Show all TCP sockets along with processes connected to a remote ssh port: - -`ss -pt dst :{{ssh}}` - -- Show all UDP sockets connected on specific source and destination ports: - -`ss -u 'sport == :{{source_port}} and dport == :{{destination_port}}'` - -- Show all TCP IPv4 sockets locally connected on the subnet 192.168.0.0/16: - -`ss -4t src {{192.168/16}}` diff --git a/pages.cn/linux/ssh-add.md b/pages.cn/linux/ssh-add.md deleted file mode 100644 index 134a17ddb..000000000 --- a/pages.cn/linux/ssh-add.md +++ /dev/null @@ -1,24 +0,0 @@ -# ssh-add - -> Manage loaded ssh keys in the ssh-agent. -> Ensure that ssh-agent is up and running for the keys to be loaded in it. - -- Add the default ssh keys in "~/.ssh" to the ssh-agent: - -`ssh-add` - -- Add a specific key to the ssh-agent: - -`ssh-add {{path/to/private_key}}` - -- List fingerprints of currently loaded keys: - -`ssh-add -l` - -- Delete a key from the ssh-agent: - -`ssh-add -d {{path/to/private_key}}` - -- Delete all currently loaded keys from the ssh-agent: - -`ssh-add -D` diff --git a/pages.cn/linux/sshuttle.md b/pages.cn/linux/sshuttle.md deleted file mode 100644 index 64ee5a506..000000000 --- a/pages.cn/linux/sshuttle.md +++ /dev/null @@ -1,16 +0,0 @@ -# sshuttle - -> Transparent proxy server that tunnels traffic over an SSH connection. -> Doesn't require admin, or any special setup on the remote SSH server. - -- Forward all IPv4 TCP traffic via a remote SSH server: - -`sshuttle --remote={{username}}@{{sshserver}} {{0.0.0.0/0}}` - -- Forward all IPv4 TCP and DNS traffic: - -`sshuttle --dns --remote={{username}}@{{sshserver}} {{0.0.0.0/0}}` - -- Use the tproxy method to forward all IPv4 and IPv6 traffic: - -`sudo sshuttle --method=tproxy --remote={{username}}@{{sshserver}} {{0.0.0.0/0}} {{::/0}} --exclude={{your_local_ip_address}} --exclude={{ssh_server_ip_address}}` diff --git a/pages.cn/linux/strace.md b/pages.cn/linux/strace.md deleted file mode 100644 index d17744224..000000000 --- a/pages.cn/linux/strace.md +++ /dev/null @@ -1,27 +0,0 @@ -# strace - -> Troubleshooting tool for tracing system calls. - -- Start tracing a specific process by its PID: - -`strace -p {{pid}}` - -- Trace a process and filter output by system call: - -`strace -p {{pid}} -e {{system_call_name}}` - -- 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` - -- Start tracing a program by executing it: - -`strace {{program}}` - -- Start tracing file operations of a program: - -`strace -e trace=file {{program}}` diff --git a/pages.cn/linux/sv.md b/pages.cn/linux/sv.md deleted file mode 100644 index 0567e0d0c..000000000 --- a/pages.cn/linux/sv.md +++ /dev/null @@ -1,15 +0,0 @@ -# sv - -> Control a running runsv service. - -- Start a service: - -`sudo sv up {{path/to/service}}` - -- Stop a service: - -`sudo sv down {{path/to/service}}` - -- Get service status: - -`sudo sv status {{path/to/service}}` diff --git a/pages.cn/linux/swapoff.md b/pages.cn/linux/swapoff.md deleted file mode 100644 index cc84c7670..000000000 --- a/pages.cn/linux/swapoff.md +++ /dev/null @@ -1,19 +0,0 @@ -# swapoff - -> Disables device or file for swapping. - -- Disable a given swap partition: - -`swapoff {{/dev/sdb7}}` - -- Disable a given swap file: - -`swapoff {{path/to/file}}` - -- Disable all swap areas: - -`swapoff -a` - -- Disable swap by label of a device or file: - -`swapoff -L {{swap1}}` diff --git a/pages.cn/linux/swapon.md b/pages.cn/linux/swapon.md deleted file mode 100644 index 89cd4448a..000000000 --- a/pages.cn/linux/swapon.md +++ /dev/null @@ -1,23 +0,0 @@ -# swapon - -> Enables device or file for swapping. - -- Get swap information: - -`swapon -s` - -- Enable a given swap partition: - -`swapon {{/dev/sdb7}}` - -- Enable a given swap file: - -`swapon {{path/to/file}}` - -- Enable all swap areas: - -`swapon -a` - -- Enable swap by label of a device or file: - -`swapon -L {{swap1}}` diff --git a/pages.cn/linux/sysctl.md b/pages.cn/linux/sysctl.md deleted file mode 100644 index bb7388bcc..000000000 --- a/pages.cn/linux/sysctl.md +++ /dev/null @@ -1,23 +0,0 @@ -# sysctl - -> List and change kernel runtime variables. - -- Show all available variables and their values: - -`sysctl -a` - -- Set a changeable kernel state variable: - -`sysctl -w {{section.tunable}}={{value}}` - -- Get currently open file handlers: - -`sysctl fs.file-nr` - -- Get limit for simultaneous open files: - -`sysctl fs.file-max` - -- Apply changes from /etc/sysctl.conf: - -`sysctl -p` diff --git a/pages.cn/linux/systemctl.md b/pages.cn/linux/systemctl.md deleted file mode 100644 index 04db9aa21..000000000 --- a/pages.cn/linux/systemctl.md +++ /dev/null @@ -1,27 +0,0 @@ -# systemctl - -> Control the systemd system and service manager. - -- List failed units: - -`systemctl --failed` - -- Start/Stop/Restart/Reload a service: - -`systemctl start/stop/restart/reload {{unit}}` - -- Show the status of a unit: - -`systemctl status {{unit}}` - -- Enable/Disable a unit to be started on bootup: - -`systemctl enable/disable {{unit}}` - -- Mask/Unmask a unit, prevent it to be started on bootup: - -`systemctl mask/unmask {{unit}}` - -- Reload systemd, scanning for new or changed units: - -`systemctl daemon-reload` diff --git a/pages.cn/linux/systemd-analyze.md b/pages.cn/linux/systemd-analyze.md deleted file mode 100644 index b914d9a28..000000000 --- a/pages.cn/linux/systemd-analyze.md +++ /dev/null @@ -1,11 +0,0 @@ -# systemd-analyze - -> Show timing details about the boot process of units (services, mount points, devices, sockets). - -- List time of each unit to start up: - -`systemd-analyze blame` - -- Print a tree of the time critical chain of units: - -`systemd-analyze critical-chain` diff --git a/pages.cn/linux/tcpflow.md b/pages.cn/linux/tcpflow.md deleted file mode 100644 index 97c771fef..000000000 --- a/pages.cn/linux/tcpflow.md +++ /dev/null @@ -1,7 +0,0 @@ -# tcpflow - -> Capture TCP traffic for debugging and analysis. - -- Show all data on the given interface and port: - -`tcpflow -c -i {{eth0}} port {{80}}` diff --git a/pages.cn/linux/tcpkill.md b/pages.cn/linux/tcpkill.md deleted file mode 100644 index 92f3897e5..000000000 --- a/pages.cn/linux/tcpkill.md +++ /dev/null @@ -1,7 +0,0 @@ -# tcpkill - -> Kills specified in-progress TCP connections. - -- Kill in-progress connections at a specified interface, host and port: - -`tcpkill -i {{eth1}} host {{192.95.4.27}} and port {{2266}}` diff --git a/pages.cn/linux/terminator.md b/pages.cn/linux/terminator.md deleted file mode 100644 index b11c69d6c..000000000 --- a/pages.cn/linux/terminator.md +++ /dev/null @@ -1,23 +0,0 @@ -# terminator - -> Arrange multiple GNOME terminals in one window. - -- Start terminator window: - -`terminator` - -- Start with a fullscreen window: - -`terminator -f` - -- Split terminals horizontally: - -`Ctrl + Shift + O` - -- Split terminals vertically: - -`Ctrl + Shift + E` - -- Open new tab: - -`Ctrl + Shift + T` diff --git a/pages.cn/linux/thunar.md b/pages.cn/linux/thunar.md deleted file mode 100644 index 9bda32b04..000000000 --- a/pages.cn/linux/thunar.md +++ /dev/null @@ -1,15 +0,0 @@ -# thunar - -> Graphical file manager for XFCE desktop environments. - -- Open a new window showing the current directory: - -`thunar` - -- Open the bulk rename utility: - -`thunar --bulk-rename` - -- Close all open thunar windows: - -`thunar --quit` diff --git a/pages.cn/linux/timedatectl.md b/pages.cn/linux/timedatectl.md deleted file mode 100644 index 0d2170bbb..000000000 --- a/pages.cn/linux/timedatectl.md +++ /dev/null @@ -1,23 +0,0 @@ -# timedatectl - -> Control the system time and date. - -- Check the current system clock time: - -`timedatectl` - -- Set the local time of the system clock directly: - -`timedatectl set-time {{"yyyy-MM-dd hh:mm:ss"}}` - -- List available timezones: - -`timedatectl list-timezones` - -- Set the system timezone: - -`timedatectl set-timezone {{timezone}}` - -- Enable Network Time Protocol (NTP) synchronization: - -`timedatectl set-ntp on` diff --git a/pages.cn/linux/tomb.md b/pages.cn/linux/tomb.md deleted file mode 100644 index cf2a7e48a..000000000 --- a/pages.cn/linux/tomb.md +++ /dev/null @@ -1,31 +0,0 @@ -# tomb - -> Manage encrypted storage folders that can be safely transported and hidden in a filesystem. - -- Create a new tomb with an initial size of 100MB: - -`tomb dig -s {{100}} {{encrypted_folder.tomb}}` - -- Create a new key file that can be used to lock a tomb; user will be prompted for a password for the key: - -`tomb forge {{encrypted_folder.tomb.key}}` - -- Initialize and lock an empty tomb using a key made with `forge`: - -`tomb lock {{encrypted_folder.tomb}} -k {{encrypted_folder.tomb.key}}` - -- Mount a tomb (by default in /media) using its key, making it usable as a regular filesystem folder: - -`tomb open {{encrypted_folder.tomb}} -k {{encrypted_folder.tomb.key}}` - -- Close a tomb (fails if the tomb is being used by a process): - -`tomb close {{encrypted_folder.tomb}}` - -- Forcefully close all open tombs, killing any applications using them: - -`tomb slam all` - -- List all open tombs: - -`tomb list` diff --git a/pages.cn/linux/top.md b/pages.cn/linux/top.md deleted file mode 100644 index 28d93278f..000000000 --- a/pages.cn/linux/top.md +++ /dev/null @@ -1,23 +0,0 @@ -# top - -> Display dynamic real-time information about running processes. - -- Start top: - -`top` - -- Do not show any idle or zombie processes: - -`top -i` - -- Show only processes owned by given user: - -`top -u {{user_name}}` - -- Show only the processes with the given PID(s), passed as a comma-separated list. (Normally you wouldn't know PIDs off hand. This example picks the PIDs from the process name): - -`top -p $(pgrep -d ',' {{process_name}})` - -- Get help about interactive commands: - -`?` diff --git a/pages.cn/linux/trap.md b/pages.cn/linux/trap.md deleted file mode 100644 index 325b1c123..000000000 --- a/pages.cn/linux/trap.md +++ /dev/null @@ -1,20 +0,0 @@ -# trap - -> Automatically execute commands after receiving signals by processes or the operating system. -> Can be used to perform cleanups for interruptions by the user or other actions. - -- List available signals to set traps for: - -`trap -l` - -- List active traps for the current shell: - -`trap -p` - -- Set a trap to execute commands when one or more signals are detected: - -`trap 'echo "Caught signal {{SIGHUP}}"' {{SIGHUP}}` - -- Remove active traps: - -`trap - {{SIGHUP}} {{SIGINT}}` diff --git a/pages.cn/linux/tree.md b/pages.cn/linux/tree.md deleted file mode 100644 index 836d19add..000000000 --- a/pages.cn/linux/tree.md +++ /dev/null @@ -1,31 +0,0 @@ -# tree - -> Show the contents of the current directory as a tree. - -- Show files and directories up to 'num' levels of depth (where 1 means the current directory): - -`tree -L {{num}}` - -- Show directories only: - -`tree -d` - -- Show hidden files too: - -`tree -a` - -- Print the tree without indentation lines, showing the full path instead (use `-N` to not escape whitespace and special characters): - -`tree -i -f` - -- Print the size of each node next to it, in human-readable format: - -`tree -s -h` - -- Filter the tree using a wildcard (glob) pattern: - -`tree -P {{*.txt}}` - -- Ignore entries that match a wildcard (glob) pattern: - -`tree -I {{*.txt}}` diff --git a/pages.cn/linux/trizen.md b/pages.cn/linux/trizen.md deleted file mode 100644 index 14c5ee3b5..000000000 --- a/pages.cn/linux/trizen.md +++ /dev/null @@ -1,27 +0,0 @@ -# trizen - -> Arch Linux utility for building packages from the Arch User Repository (AUR). - -- Synchronize and update all AUR packages: - -`trizen -Syua` - -- Install a new package: - -`trizen -S {{package}}` - -- Remove a package and its dependencies: - -`trizen -Rs {{package}}` - -- Search the package database for a keyword: - -`trizen -Ss {{keyword}}` - -- Show information about a package: - -`trizen -Si {{package}}` - -- List installed packages and versions: - -`trizen -Qe` diff --git a/pages.cn/linux/ufw.md b/pages.cn/linux/ufw.md deleted file mode 100644 index 72532088d..000000000 --- a/pages.cn/linux/ufw.md +++ /dev/null @@ -1,36 +0,0 @@ -# ufw - -> Uncomplicated Firewall. -> Frontend for iptables aiming to make configuration of a firewall easier. - -- Enable ufw: - -`ufw enable` - -- Disable ufw: - -`ufw disable` - -- Show ufw rules, along with their numbers: - -`ufw status numbered` - -- Allow incoming traffic on port 5432 on this host with a comment identifying the service: - -`ufw allow {{5432}} comment {{"Service"}}` - -- Allow only TCP traffic from 192.168.0.4 to any address on this host, on port 22: - -`ufw allow proto {{tcp}} from {{192.168.0.4}} to {{any}} port {{22}}` - -- Deny traffic on port 80 on this host: - -`ufw deny {{80}}` - -- Deny all UDP traffic to port 22: - -`ufw deny proto {{udp}} from {{any}} to {{any}} port {{22}}` - -- Delete a particular rule. The rule number can be retrieved from the `ufw status numbered` command: - -`ufw delete {{rule_number}}` diff --git a/pages.cn/linux/ulimit.md b/pages.cn/linux/ulimit.md deleted file mode 100644 index 30e0e89f1..000000000 --- a/pages.cn/linux/ulimit.md +++ /dev/null @@ -1,19 +0,0 @@ -# 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` diff --git a/pages.cn/linux/umask.md b/pages.cn/linux/umask.md deleted file mode 100644 index fb6c23582..000000000 --- a/pages.cn/linux/umask.md +++ /dev/null @@ -1,19 +0,0 @@ -# umask - -> Manage the read/write/execute permissions that are masked out (i.e. restricted) for newly created files by the user. - -- Display the current mask in octal notation: - -`umask` - -- Display the current mask in symbolic (human-readable) mode: - -`umask -S` - -- Change the mask symbolically to allow read permission for all users (the rest of the mask bits are unchanged): - -`umask {{a+r}}` - -- Set the mask (using octal) to restrict no permissions for the file's owner, and restrict all permissions for everyone else: - -`umask {{077}}` diff --git a/pages.cn/linux/units.md b/pages.cn/linux/units.md deleted file mode 100644 index 712496388..000000000 --- a/pages.cn/linux/units.md +++ /dev/null @@ -1,24 +0,0 @@ -# units - -> Provide the conversion between two units of measure. -> Typing 'search {{text}}' in the prompt will display a list of all of the units containing {{text}}. - -- Run in interactive mode: - -`units` - -- Show the conversion between two simple units: - -`units {{quarts}} {{tablespoons}}` - -- Convert between units with quantities: - -`units {{15 pounds}} {{kilograms}}` - -- Show the conversion between two compound units: - -`units {{"meters / second"}} {{"inches / hour"}}` - -- Show the conversion between units with different dimensions: - -`units {{"acres"}} {{"ft^2"}}` diff --git a/pages.cn/linux/unset.md b/pages.cn/linux/unset.md deleted file mode 100644 index 4de7038b2..000000000 --- a/pages.cn/linux/unset.md +++ /dev/null @@ -1,11 +0,0 @@ -# unset - -> Remove shell variables or functions. - -- Remove the variables foo and bar: - -`unset {{foo}} {{bar}}` - -- Remove the function my_func: - -`unset -f {{my_func}}` diff --git a/pages.cn/linux/update-alternatives.md b/pages.cn/linux/update-alternatives.md deleted file mode 100644 index a2761858f..000000000 --- a/pages.cn/linux/update-alternatives.md +++ /dev/null @@ -1,23 +0,0 @@ -# update-alternatives - -> A convenient tool for maintaining symbolic links to determine default commands. - -- Add a symbolic link: - -`sudo update-alternatives --install {{path/to/symlink}} {{command_name}} {{path/to/command_binary}} {{priority}}` - -- Configure a symbolic link for "java": - -`sudo update-alternatives --config {{java}}` - -- Remove a symbolic link: - -`sudo update-alternatives --remove {{java}} {{/opt/java/jdk1.8.0_102/bin/java}}` - -- Display information about a specified command: - -`update-alternatives --display {{java}}` - -- Display all commands and their current selection: - -`update-alternatives --get-selections` diff --git a/pages.cn/linux/update-rc.d.md b/pages.cn/linux/update-rc.d.md deleted file mode 100644 index f47ac09cd..000000000 --- a/pages.cn/linux/update-rc.d.md +++ /dev/null @@ -1,20 +0,0 @@ -# update-rc.d - -> Install and remove services which are System-V style init script links. -> Init scripts are in the /etc/init.d/. - -- Install a service: - -`update-rc.d {{mysql}} defaults` - -- Enable a service: - -`update-rc.d {{mysql}} enable` - -- Disable a service: - -`update-rc.d {{mysql}} disable` - -- Forcibly remove a service: - -`update-rc.d -f {{mysql}} remove` diff --git a/pages.cn/linux/updatedb.md b/pages.cn/linux/updatedb.md deleted file mode 100644 index 644828151..000000000 --- a/pages.cn/linux/updatedb.md +++ /dev/null @@ -1,12 +0,0 @@ -# updatedb - -> Create or update the database used by `locate`. -> It is usually run daily by cron. - -- Refresh database content: - -`sudo updatedb` - -- Display file names as soon as they are found: - -`sudo updatedb --verbose` diff --git a/pages.cn/linux/useradd.md b/pages.cn/linux/useradd.md deleted file mode 100644 index 5e7690ebf..000000000 --- a/pages.cn/linux/useradd.md +++ /dev/null @@ -1,23 +0,0 @@ -# useradd - -> Create a new user. - -- Create new user: - -`useradd {{name}}` - -- Create new user with a default home directory: - -`useradd --create-home {{name}}` - -- Create new user with specified shell: - -`useradd --shell {{/path/to/shell}} {{name}}` - -- Create new user belonging to additional groups (mind the lack of whitespace): - -`useradd --groups {{group1,group2}} {{name}}` - -- Create new system user without a home directory: - -`useradd --no-create-home --system {{name}}` diff --git a/pages.cn/linux/userdel.md b/pages.cn/linux/userdel.md deleted file mode 100644 index ee7a9a3cf..000000000 --- a/pages.cn/linux/userdel.md +++ /dev/null @@ -1,7 +0,0 @@ -# userdel - -> Remove a user. - -- Remove a user and their home directory: - -`userdel -r {{name}}` diff --git a/pages.cn/linux/usermod.md b/pages.cn/linux/usermod.md deleted file mode 100644 index 7c47f8b20..000000000 --- a/pages.cn/linux/usermod.md +++ /dev/null @@ -1,15 +0,0 @@ -# usermod - -> Modifies a user account. - -- Change a user's name: - -`usermod -l {{newname}} {{user}}` - -- Add user to supplementary groups (mind the whitespace): - -`usermod -a -G {{group1,group2}} {{user}}` - -- Create a new home directory for a user and move their files to it: - -`usermod -m -d {{/path/to/home}} {{user}}` diff --git a/pages.cn/linux/vgcreate.md b/pages.cn/linux/vgcreate.md deleted file mode 100644 index 0302fe2ee..000000000 --- a/pages.cn/linux/vgcreate.md +++ /dev/null @@ -1,11 +0,0 @@ -# vgcreate - -> Create volume groups combining multiple mass-storage devices. - -- Create a new volume group called vg1 using the `/dev/sda1` device: - -`vgcreate {{vg1}} {{/dev/sda1}}` - -- Create a new volume group called vg1 using multiple devices: - -`vgcreate {{vg1}} {{/dev/sda1}} {{/dev/sdb1}} {{/dev/sdc1}}` diff --git a/pages.cn/linux/viewnior.md b/pages.cn/linux/viewnior.md deleted file mode 100644 index 31e0926c1..000000000 --- a/pages.cn/linux/viewnior.md +++ /dev/null @@ -1,15 +0,0 @@ -# viewnior - -> Simple and elegant image viewer. - -- View an image: - -`viewnior {{path/to/image.ext}}` - -- View in fullscreen mode: - -`viewnior --fullscreen {{path/to/image.ext}}` - -- View fullscreen in slideshow mode: - -`viewnior --slideshow {{path/to/image.ext}}` diff --git a/pages.cn/linux/vncserver.md b/pages.cn/linux/vncserver.md deleted file mode 100644 index 22efe53e4..000000000 --- a/pages.cn/linux/vncserver.md +++ /dev/null @@ -1,15 +0,0 @@ -# vncserver - -> Launches a VNC (Virtual Network Computing) desktop. - -- Launch a VNC Server on next available display: - -`vncserver` - -- Launch a VNC Server with specific screen geometry: - -`vncserver --geometry {{width}}x{{height}}` - -- Kill an instance of VNC Server running on a specific display: - -`vncserver --kill :{{display_number}}` diff --git a/pages.cn/linux/vncviewer.md b/pages.cn/linux/vncviewer.md deleted file mode 100644 index 6e2817ad2..000000000 --- a/pages.cn/linux/vncviewer.md +++ /dev/null @@ -1,19 +0,0 @@ -# vncviewer - -> Launches a VNC (Virtual Network Computing) client. - -- Launch a VNC client which connects to a host on a given display: - -`vncviewer {{host}}:{{display_number}}` - -- Launch in full-screen mode: - -`vncviewer -FullScreen {{host}}:{{display_number}}` - -- Launch a VNC client with a specific screen geometry: - -`vncviewer --geometry {{width}}x{{height}} {{host}}:{{display_number}}` - -- Launch a VNC client which connects to a host on a given port: - -`vncviewer {{host}}::{{port}}` diff --git a/pages.cn/linux/wall.md b/pages.cn/linux/wall.md deleted file mode 100644 index 65ac05a9e..000000000 --- a/pages.cn/linux/wall.md +++ /dev/null @@ -1,15 +0,0 @@ -# wall - -> Write a message on the terminals of users currently logged in. - -- Send a message: - -`echo "{{message}}" | wall` - -- Send a message from a file: - -`wall {{file}}` - -- Send a message with timeout (default 300): - -`wall -t {{seconds}} {{file}}` diff --git a/pages.cn/linux/watch.md b/pages.cn/linux/watch.md deleted file mode 100644 index 51effdbea..000000000 --- a/pages.cn/linux/watch.md +++ /dev/null @@ -1,15 +0,0 @@ -# watch - -> Execute a command repeatedly, and monitor the output in full-screen mode. - -- Monitor files in the current folder: - -`watch {{ls}}` - -- Monitor disk space and highlight the changes: - -`watch -d {{df}}` - -- Monitor "node" processes, refreshing every 3 seconds: - -`watch -n {{3}} "{{ps aux | grep node}}"` diff --git a/pages.cn/linux/whatis.md b/pages.cn/linux/whatis.md deleted file mode 100644 index 762275952..000000000 --- a/pages.cn/linux/whatis.md +++ /dev/null @@ -1,19 +0,0 @@ -# whatis - -> Display one-line descriptions from manual pages. - -- Display a description from a man page: - -`whatis {{command}}` - -- Don't cut the description off at the end of the line: - -`whatis --long {{command}}` - -- Display descriptions for all commands matching a glob: - -`whatis --wildcard {{net*}}` - -- Search man page descriptions with a regular expression: - -`whatis --regex '{{wish[0-9]\.[0-9]}}'` diff --git a/pages.cn/linux/whereis.md b/pages.cn/linux/whereis.md deleted file mode 100644 index f59c0180a..000000000 --- a/pages.cn/linux/whereis.md +++ /dev/null @@ -1,19 +0,0 @@ -# whereis - -> Locate the binary, source, and manual page files for a command. - -- Locate binary, source and man pages for ssh: - -`whereis {{ssh}}` - -- Locate binary and man pages for ls: - -`whereis -bm {{ls}}` - -- Locate source of gcc and man pages for git: - -`whereis -s {{gcc}} -m {{git}}` - -- Locate binaries for gcc in /usr/bin/ only: - -`whereis -b -B {{/usr/bin/}} -f {{gcc}}` diff --git a/pages.cn/linux/wodim.md b/pages.cn/linux/wodim.md deleted file mode 100644 index a82a4910f..000000000 --- a/pages.cn/linux/wodim.md +++ /dev/null @@ -1,20 +0,0 @@ -# wodim - -> Command (aliased as `cdrecord` on some systems) for recording data to CDs or DVDs. -> Some invocations of wodim can cause destructive actions, such as erasing all the data on a disc. - -- Display optical drives available to `wodim`: - -`wodim --devices` - -- Record ("burn") an audio-only disc: - -`wodim dev=/dev/{{optical_drive}} -audio {{track*.cdaudio}}` - -- Burn a file to a disc, ejecting the disc once done (some recorders require this): - -`wodim -eject dev=/dev/{{optical_drive}} -data {{file.iso}}` - -- Burn a file to the disc in an optical drive, potentially writing to multiple discs in succession: - -`wodim -tao dev=/dev/{{optical_drive}} -data {{file.iso}}` diff --git a/pages.cn/linux/wpa_cli.md b/pages.cn/linux/wpa_cli.md deleted file mode 100644 index b0ceaeda4..000000000 --- a/pages.cn/linux/wpa_cli.md +++ /dev/null @@ -1,27 +0,0 @@ -# wpa_cli - -> Add and configure wlan interfaces. - -- Scan for available networks: - -`wpa_cli scan` - -- Show scan results: - -`wpa_cli scan_results` - -- Add a network: - -`wpa_cli add_network {{number}}` - -- Set a network's SSID: - -`wpa_cli set_network {{number}} ssid "{{SSID}}"` - -- Enable network: - -`wpa_cli enable_network {{number}}` - -- Save config: - -`wpa_cli save_config` diff --git a/pages.cn/linux/write.md b/pages.cn/linux/write.md deleted file mode 100644 index 37877e0d8..000000000 --- a/pages.cn/linux/write.md +++ /dev/null @@ -1,16 +0,0 @@ -# write - -> Write a message on the terminal of a specified logged in user (ctrl-C to stop writing messages). -> Use the `who` command to find out all terminal_ids of all active users active on the system. - -- Send a message to a given user on a given terminal id: - -`write {{username}} {{terminal_id}}` - -- Send message to "testuser" on terminal "/dev/tty/5": - -`write {{testuser}} {{tty/5}}` - -- Send message to "jhondoe" on pseudo terminal "/dev/pts/5": - -`write {{jhondoe}} {{pts/5}}` diff --git a/pages.cn/linux/x11vnc.md b/pages.cn/linux/x11vnc.md deleted file mode 100644 index 5db1cd8a2..000000000 --- a/pages.cn/linux/x11vnc.md +++ /dev/null @@ -1,24 +0,0 @@ -# x11vnc - -> A VNC server that will enable VNC on an existing display ser. -> By default, the server will automatically terminate once all clients disconnect from it. - -- Launch a VNC server that allows multiple clients to connect: - -`x11vnc -shared` - -- Launch a VNC server in view-only mode, and which won't terminate once the last client disconnects: - -`x11vnc -forever -viewonly` - -- Launch a VNC server on a specific display and screen (both starting at index zero): - -`x11vnc -display :{{display}}.{{screen}}` - -- Launch a VNC server on the third display's default screen: - -`x11vnc -display :{{2}}` - -- Launch a VNC server on the first display's second screen: - -`x11vnc -display :{{0}}.{{1}}` diff --git a/pages.cn/linux/xar.md b/pages.cn/linux/xar.md deleted file mode 100644 index 9f9eb37ac..000000000 --- a/pages.cn/linux/xar.md +++ /dev/null @@ -1,15 +0,0 @@ -# xar - -> Manage .xar archives. - -- Create a xar archive of all files in a given directory: - -`xar -cf {{archive.xar}} {{path/to/directory}}` - -- List the contents of a given xar archive: - -`xar -tf {{archive.xar}}` - -- Extract the contents of a given xar archive to the current directory: - -`xar -xf {{archive.xar}}` diff --git a/pages.cn/linux/xbps.md b/pages.cn/linux/xbps.md deleted file mode 100644 index 56478d7c8..000000000 --- a/pages.cn/linux/xbps.md +++ /dev/null @@ -1,23 +0,0 @@ -# xbps - -> The X Binary Package System (or xbps) is the binary package system used by Void Linux. - -- Install packages and synchronize them with the remote repository: - -`xbps-install --synchronize {{package_name1}} {{package_name2}}` - -- Search for a package in the remote repository: - -`xbps-query --repository -s {{package_name}}` - -- Remove a package, leaving all of its dependencies installed: - -`xbps-remove {{package_name}}` - -- Remove a package and all of its dependencies recursively that are not required by other packages: - -`xbps-remove --recursive {{package_name}}` - -- Synchronize your repository databases and update your system and dependencies: - -`xbps-install --synchronize -u` diff --git a/pages.cn/linux/xclip.md b/pages.cn/linux/xclip.md deleted file mode 100644 index 5a87db273..000000000 --- a/pages.cn/linux/xclip.md +++ /dev/null @@ -1,32 +0,0 @@ -# xclip - -> X11 clipboard manipulation tool, similar to `xsel`. -> Handles the X primary and secondary selections, plus the system clipboard (`Ctrl + C`/`Ctrl + V`). - -- Copy the output from a command to the X11 primary selection area (clipboard): - -`echo 123 | xclip` - -- Copy the output from a command to a given X11 selection area: - -`echo 123 | xclip -selection {{primary|secondary|clipboard}}` - -- Copy the contents of a file to the system clipboard, using short notation: - -`echo 123 | xclip -sel clip` - -- Copy the contents of a file into the system clipboard: - -`xclip -sel clip {{input_file.txt}}` - -- Paste the contents of the X11 primary selection area to the console: - -`xclip -o` - -- Paste the contents of the system clipboard to the console: - -`xclip -o -sel clip` - -- Paste the contents of the system clipboard into a file: - -`xclip -o -sel clip > {{output_file.txt}}` diff --git a/pages.cn/linux/xdotool.md b/pages.cn/linux/xdotool.md deleted file mode 100644 index dcb350a8d..000000000 --- a/pages.cn/linux/xdotool.md +++ /dev/null @@ -1,27 +0,0 @@ -# xdotool - -> Command line automation for X11. - -- Retrieve the X-Windows window ID of the running Firefox window(s): - -`xdotool search --onlyvisible --name {{firefox}}` - -- Click the right mouse button: - -`xdotool click {{3}}` - -- Get the id of the currently active window: - -`xdotool getactivewindow` - -- Focus on the window with id of 12345: - -`xdotool windowfocus --sync {{12345}}` - -- Type a message, with a 500ms delay for each letter: - -`xdotool type --delay {{500}} "Hello world"` - -- Press the enter key: - -`xdotool key {{KP_Enter}}` diff --git a/pages.cn/linux/xeyes.md b/pages.cn/linux/xeyes.md deleted file mode 100644 index 315bebeb6..000000000 --- a/pages.cn/linux/xeyes.md +++ /dev/null @@ -1,11 +0,0 @@ -# xeyes - -> Display eyes on the screen that follow the mouse cursor. - -- Launch xeyes on the local machine's default display: - -`xeyes` - -- Launch xeyes on a remote machine's display 0, screen 0: - -`xeyes -display {{remote_host}}:{{0}}.{{0}}` diff --git a/pages.cn/linux/xfce4-terminal.md b/pages.cn/linux/xfce4-terminal.md deleted file mode 100644 index e1d25d530..000000000 --- a/pages.cn/linux/xfce4-terminal.md +++ /dev/null @@ -1,27 +0,0 @@ -# xfce4-terminal - -> The XFCE4 terminal emulator. - -- Open a new terminal window: - -`xfce4-terminal` - -- Set the initial title: - -`xfce4-terminal --initial-title "{{initial_title}}"` - -- Open a new tab in the current terminal window: - -`xfce4-terminal --tab` - -- Execute a command in a new terminal window: - -`xfce4-terminal --command "{{command_with_args}}"` - -- Keep the terminal around after the executed command finishes executing: - -`xfce4-terminal --command "{{command_with_args}}" --hold` - -- Open multiple new tabs, executing a command in each: - -`xfce4-terminal --tab --command "{{command_a}}" --tab --command "{{command_b}}"` diff --git a/pages.cn/linux/xinput.md b/pages.cn/linux/xinput.md deleted file mode 100644 index e5e1848c6..000000000 --- a/pages.cn/linux/xinput.md +++ /dev/null @@ -1,15 +0,0 @@ -# xinput - -> List available input devices, query information about a device and change input device settings. - -- List all input devices: - -`xinput list` - -- Disconnect an input from its master: - -`xinput float {{id}}` - -- Reattach an input as slave to a master: - -`xinput reattach {{id}} {{master_id}}` diff --git a/pages.cn/linux/xman.md b/pages.cn/linux/xman.md deleted file mode 100644 index 8de01da1b..000000000 --- a/pages.cn/linux/xman.md +++ /dev/null @@ -1,15 +0,0 @@ -# xman - -> Manual page viewer for X Window System. - -- Start xman in three-button window: - -`xman` - -- Open the manual page output stored in a given file: - -`xman -helpfile {{filename}}` - -- Show both manual page and directory: - -`xman -bothshown` diff --git a/pages.cn/linux/xrandr.md b/pages.cn/linux/xrandr.md deleted file mode 100644 index 13f24aecb..000000000 --- a/pages.cn/linux/xrandr.md +++ /dev/null @@ -1,23 +0,0 @@ -# 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` diff --git a/pages.cn/linux/xsel.md b/pages.cn/linux/xsel.md deleted file mode 100644 index 2c68f3135..000000000 --- a/pages.cn/linux/xsel.md +++ /dev/null @@ -1,27 +0,0 @@ -# xsel - -> X11 selection and clipboard manipulation tool. - -- Use a command's output as input of the clip[b]oard (equivalent to `Ctrl + C`): - -`echo 123 | xsel -ib` - -- Use the contents of a file as input of the clipboard: - -`cat {{file}} | xsel -ib` - -- Output the clipboard's contents into the terminal (equivalent to `Ctrl + V`): - -`xsel -ob` - -- Output the clipboard's contents into a file: - -`xsel -ob > {{file}}` - -- Clear the clipboard: - -`xsel -cb` - -- Output the X11 primary selection's contents into the terminal (equivalent to a mouse middle-click): - -`xsel -op` diff --git a/pages.cn/linux/xsetwacom.md b/pages.cn/linux/xsetwacom.md deleted file mode 100644 index 9af3f6fb1..000000000 --- a/pages.cn/linux/xsetwacom.md +++ /dev/null @@ -1,23 +0,0 @@ -# xsetwacom - -> Command line tool to change settings for Wacom pen tablets at runtime. - -- List all the available wacom devices. The device name is in the first column: - -`xsetwacom list` - -- Set Wacom area to specific screen. Get name of the screen with `xrandr`: - -`xsetwacom set "{{device_name}}" MapToOutput {{screen}}` - -- Set mode to relative (like a mouse) or absolute (like a pen) mode: - -`xsetwacom set "{{device_name}}" Mode "{{Relative|Absolute}}"` - -- Rotate the input (useful for tablet-PC when rotating screen) by 0|90|180|270 degrees from "natural" rotation: - -`xsetwacom set "{{device_name}}" Rotate {{none|half|cw|ccw}}` - -- Set button to only work when the tip of the pen is touching the tablet: - -`xsetwacom set "{{device_name}}" TabletPCButton "on"` diff --git a/pages.cn/linux/xtrlock.md b/pages.cn/linux/xtrlock.md deleted file mode 100644 index 4be573403..000000000 --- a/pages.cn/linux/xtrlock.md +++ /dev/null @@ -1,15 +0,0 @@ -# xtrlock - -> Lock the X display until the user supplies their password. - -- Lock the display and show a padlock instead of the cursor: - -`xtrlock` - -- Display a blank screen as well as the padlock cursor: - -`xtrlock -b` - -- Fork the xtrlock process and return immediately: - -`xtrlock -f` diff --git a/pages.cn/linux/yank.md b/pages.cn/linux/yank.md deleted file mode 100644 index d44aed7ad..000000000 --- a/pages.cn/linux/yank.md +++ /dev/null @@ -1,19 +0,0 @@ -# yank - -> Read input from stdin and display a selection interface that allows a field to be selected and copied to the clipboard. - -- Yank using the default delimiters (\f, \n, \r, \s, \t): - -`{{sudo dmesg}} | yank` - -- Yank an entire line: - -`{{sudo dmesg}} | yank -l` - -- Yank using a specific delimiter: - -`{{echo hello=world}} | yank -d {{=}}` - -- Only yank fields matching a specific pattern: - -`{{ps ux}} | yank -g {{"[0-9]+"}}` diff --git a/pages.cn/linux/yaourt.md b/pages.cn/linux/yaourt.md deleted file mode 100644 index 8660c1db3..000000000 --- a/pages.cn/linux/yaourt.md +++ /dev/null @@ -1,23 +0,0 @@ -# yaourt - -> Arch Linux utility for building packages from the Arch User Repository. - -- Synchronize and update all packages (including AUR): - -`yaourt -Syua` - -- Install a new package (includes AUR): - -`yaourt -S {{package_name}}` - -- Remove a package and its dependencies (includes AUR packages): - -`yaourt -Rs {{package_name}}` - -- Search the package database for a keyword (including AUR): - -`yaourt -Ss {{package_name}}` - -- List installed packages, versions, and repositories (AUR packages will be listed under the repository name 'local'): - -`yaourt -Q` diff --git a/pages.cn/linux/yay.md b/pages.cn/linux/yay.md deleted file mode 100644 index 2d1f9c798..000000000 --- a/pages.cn/linux/yay.md +++ /dev/null @@ -1,28 +0,0 @@ -# yay - -> Yet Another Yogurt: A utility for Arch Linux to build and install packages from the Arch User Repository. -> Also see `pacman`. - -- Interactively search and install packages from the repos and AUR: - -`yay {{package_name|search_term}}` - -- Synchronize and update all packages from the repos and AUR: - -`yay` - -- Synchronize and update only AUR packages: - -`yay -Sua` - -- Install a new package from the repos and AUR: - -`yay -S {{package_name}}` - -- Search the package database for a keyword from the repos and AUR: - -`yay -Ss {{keyword}}` - -- Show statistics for installed packages and system health: - -`yay -Ps` diff --git a/pages.cn/linux/yum.md b/pages.cn/linux/yum.md deleted file mode 100644 index 175706778..000000000 --- a/pages.cn/linux/yum.md +++ /dev/null @@ -1,27 +0,0 @@ -# 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}}` - -- Find the package that provides a particular command: - -`yum provides {{command}}` - -- Remove a package: - -`yum remove {{package}}` - -- Upgrade installed packages to newest available versions: - -`yum upgrade` diff --git a/pages.cn/linux/zenity.md b/pages.cn/linux/zenity.md deleted file mode 100644 index fe81f8db0..000000000 --- a/pages.cn/linux/zenity.md +++ /dev/null @@ -1,24 +0,0 @@ -# zenity - -> Display dialogs from the command line/shell scripts. -> Return user-inserted values or 1 if error. - -- Display the default question dialog: - -`zenity --question` - -- Display an info dialog displaying the text "Hello!": - -`zenity --info --text="{{Hello!}}"` - -- Display a name/password form and output the data separated by ";": - -`zenity --forms --add-entry="{{Name}}" --add-password="{{Password}}" --separator="{{;}}"` - -- Display a file selection form in which the user can only select directories: - -`zenity --file-selection --directory` - -- Display a progress bar which updates its message every second and show a progress percent: - -`{{(echo "#1"; sleep 1; echo "50"; echo "#2"; sleep 1; echo "100")}} | zenity --progress` diff --git a/pages.cn/linux/zramctl.md b/pages.cn/linux/zramctl.md deleted file mode 100644 index 183058c5d..000000000 --- a/pages.cn/linux/zramctl.md +++ /dev/null @@ -1,20 +0,0 @@ -# zramctl - -> Setup and control zram devices. -> Use `mke2fs` or `mkswap` to format zram devices to partitions. - -- Check if zram is enabled: - -`lsmod | grep -i zram` - -- Enable zram with 2 devices (use `zramctl` to configure the devices further): - -`sudo modprobe zram num_devices={{2}}` - -- Find and initialise the next free zram device to a 2GB virtual drive using LZ4 compression: - -`sudo zramctl --find --size {{2GB}} --algorithm {{lz4}}` - -- List currently initialised devices: - -`zramctl` diff --git a/pages.cn/linux/zypper.md b/pages.cn/linux/zypper.md deleted file mode 100644 index 2db099e4d..000000000 --- a/pages.cn/linux/zypper.md +++ /dev/null @@ -1,23 +0,0 @@ -# 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}}` diff --git a/pages.cn/osx/airport.md b/pages.cn/osx/airport.md deleted file mode 100644 index bd3625b92..000000000 --- a/pages.cn/osx/airport.md +++ /dev/null @@ -1,19 +0,0 @@ -# airport - -> Wireless network configuration utility. - -- Show current wireless status information: - -`airport -I` - -- Sniff wireless traffic on channel 1: - -`airport sniff {{1}}` - -- Scan for available wireless networks: - -`airport -s` - -- Disassociate from current airport network: - -`sudo airport -z` diff --git a/pages.cn/osx/apachectl.md b/pages.cn/osx/apachectl.md deleted file mode 100644 index 415871644..000000000 --- a/pages.cn/osx/apachectl.md +++ /dev/null @@ -1,15 +0,0 @@ -# apachectl - -> Apache HTTP Server control interface for macOS. - -- Start the org.apache.httpd launchd job: - -`apachectl start` - -- Stop the launchd job: - -`apachectl stop` - -- Stop, then start launchd job: - -`apachectl restart` diff --git a/pages.cn/osx/archey.md b/pages.cn/osx/archey.md deleted file mode 100644 index a15250491..000000000 --- a/pages.cn/osx/archey.md +++ /dev/null @@ -1,19 +0,0 @@ -# archey - -> Simple tool for stylishly displaying system information. - -- Show system information: - -`archey` - -- Show system information without colored output: - -`archey --nocolor` - -- Show system information, using MacPorts instead of Homebrew: - -`archey --macports` - -- Show system information without IP address check: - -`archey --offline` diff --git a/pages.cn/osx/as.md b/pages.cn/osx/as.md deleted file mode 100644 index 683f797c2..000000000 --- a/pages.cn/osx/as.md +++ /dev/null @@ -1,20 +0,0 @@ -# as - -> Portable GNU assembler. -> Primarily intended to assemble output from `gcc` to be used by `ld`. - -- Assemble a file, writing the output to a.out: - -`as {{file.s}}` - -- Assemble the output to a given file: - -`as {{file.s}} -o {{out.o}}` - -- Generate output faster by skipping whitespace and comment preprocessing. (Should only be used for trusted compilers): - -`as -f {{file.s}}` - -- Include a given path to the list of directories to search for files specified in .include directives: - -`as -I {{path/to/directory}} {{file.s}}` diff --git a/pages.cn/osx/asr.md b/pages.cn/osx/asr.md deleted file mode 100644 index 2bcd24c60..000000000 --- a/pages.cn/osx/asr.md +++ /dev/null @@ -1,20 +0,0 @@ -# asr - -> Restore (copy) a disk image onto a volume. -> The command name stands for Apple Software Restore. - -- Restore a disk image to a target volume: - -`sudo asr restore --source {{image_name}}.dmg --target {{path/to/volume}}` - -- Erase the target volume before restoring: - -`sudo asr restore --source {{image_name}}.dmg --target {{path/to/volume}} --erase` - -- Skip verification after restoring: - -`sudo asr restore --source {{image_name}}.dmg --target {{path/to/volume}} --noverify` - -- Clone volumes without the use of an intermediate disk image: - -`sudo asr restore --source {{path/to/volume}} --target {{path/to/cloned_volume}}` diff --git a/pages.cn/osx/base64.md b/pages.cn/osx/base64.md deleted file mode 100644 index bbf963491..000000000 --- a/pages.cn/osx/base64.md +++ /dev/null @@ -1,19 +0,0 @@ -# base64 - -> Encode and decode using Base64 representation. - -- Encode a file: - -`base64 -i {{plain_file}}` - -- Decode a file: - -`base64 -D -i {{base64_file}}` - -- Encode from stdin: - -`echo -n {{plain_text}} | base64` - -- Decode from stdin: - -`echo -n {{base64_text}} | base64 -D` diff --git a/pages.cn/osx/brew-cask.md b/pages.cn/osx/brew-cask.md deleted file mode 100644 index 0ce9e3602..000000000 --- a/pages.cn/osx/brew-cask.md +++ /dev/null @@ -1,35 +0,0 @@ -# brew cask - -> Package manager for macOS applications distributed as binaries. - -- Search for formulas and casks: - -`brew search {{text}}` - -- Install a cask: - -`brew cask install {{cask_name}}` - -- List all installed casks: - -`brew cask list` - -- List installed casks that have newer versions available: - -`brew cask outdated` - -- Upgrade an installed cask to its latest version: - -`brew cask upgrade {{cask_name}}` - -- Uninstall a cask: - -`brew cask uninstall {{cask_name}}` - -- Uninstall a cask and remove related settings and files: - -`brew cask zap {{cask_name}}` - -- Display information about a given cask: - -`brew cask info {{cask_name}}` diff --git a/pages.cn/osx/brew-mas.md b/pages.cn/osx/brew-mas.md deleted file mode 100644 index 876989b79..000000000 --- a/pages.cn/osx/brew-mas.md +++ /dev/null @@ -1,27 +0,0 @@ -# brew mas - -> Mas is a simple command line interface for the Mac App Store. - -- Search the Mac App Store by app name and return matching identifiers: - -`mas search {{app_name}}` - -- Install or update a previously purchased application: - -`mas install {{app_name}} {{app_identifier}}` - -- Show all installed applications and their product identifiers: - -`mas list` - -- List installed apps with pending updates: - -`mas outdated` - -- Install all pending updates: - -`mas upgrade` - -- Install updates for a specific app: - -`mas upgrade {{app_identifier}}` diff --git a/pages.cn/osx/brew.md b/pages.cn/osx/brew.md deleted file mode 100644 index 9fee90feb..000000000 --- a/pages.cn/osx/brew.md +++ /dev/null @@ -1,35 +0,0 @@ -# brew - -> Package manager for macOS. - -- Search for available formulas and casks: - -`brew search {{text}}` - -- Install the latest stable version of a formula (use `--devel` for development versions): - -`brew install {{formula}}` - -- List all installed formulae: - -`brew list` - -- Update an installed formula (if no formula name is given, all installed formulae are updated): - -`brew upgrade {{formula}}` - -- Fetch the newest version of Homebrew and all formulae from GitHub: - -`brew update` - -- Show formulae that have a more recent version available: - -`brew outdated` - -- Display information about a formula (version, installation path, dependencies, etc.): - -`brew info {{formula}}` - -- Check your Homebrew installation for potential problems: - -`brew doctor` diff --git a/pages.cn/osx/brightness.md b/pages.cn/osx/brightness.md deleted file mode 100644 index 0e98b4af4..000000000 --- a/pages.cn/osx/brightness.md +++ /dev/null @@ -1,15 +0,0 @@ -# brightness - -> Get and set the brightness level of all internal and certain external displays. - -- Show current brightness: - -`brightness -l` - -- Set the brightness to 100%:: - -`brightness {{1}}` - -- Set the brightness to 50%:: - -`brightness {{0.5}}` diff --git a/pages.cn/osx/caffeinate.md b/pages.cn/osx/caffeinate.md deleted file mode 100644 index 83c3fc87d..000000000 --- a/pages.cn/osx/caffeinate.md +++ /dev/null @@ -1,15 +0,0 @@ -# caffeinate - -> Prevent mac from sleeping. - -- Prevent from sleeping for 1 hour (3600 seconds): - -`caffeinate -u -t {{3600}}` - -- Prevent from sleeping until a command completes: - -`caffeinate -s {{command}}` - -- Prevent from sleeping until you type Ctrl-C: - -`caffeinate -i` diff --git a/pages.cn/osx/cal.md b/pages.cn/osx/cal.md deleted file mode 100644 index c3ef69862..000000000 --- a/pages.cn/osx/cal.md +++ /dev/null @@ -1,27 +0,0 @@ -# cal - -> Prints calendar information. - -- Display a calendar for the current month: - -`cal` - -- Display a calendar for a specific month (1-12 or name): - -`cal -m {{month}}` - -- Display a calendar for the current year: - -`cal -y` - -- Display a calendar for a specific year (4 digits): - -`cal {{year}}` - -- Display a calendar for a specific month and year: - -`cal {{month}} {{year}}` - -- Display date of Easter (Western Christian churches) in a given year: - -`ncal -e {{year}}` diff --git a/pages.cn/osx/carthage.md b/pages.cn/osx/carthage.md deleted file mode 100644 index 257183547..000000000 --- a/pages.cn/osx/carthage.md +++ /dev/null @@ -1,23 +0,0 @@ -# carthage - -> A dependency management tool for Cocoa applications. - -- Download the latest version of all dependencies mentioned in Cartfile, and build them: - -`carthage update` - -- Update dependencies, but only build for iOS: - -`carthage update --platform ios` - -- Update dependencies, but don't build any of them: - -`carthage update --no-build` - -- Download and rebuild the current version of dependencies (without updating them): - -`carthage bootstrap` - -- Rebuild a specific dependency: - -`carthage build {{dependency}}` diff --git a/pages.cn/osx/codesign.md b/pages.cn/osx/codesign.md deleted file mode 100644 index 16d34f33e..000000000 --- a/pages.cn/osx/codesign.md +++ /dev/null @@ -1,11 +0,0 @@ -# codesign - -> Create and manipulate code signatures for macOS. - -- Sign an application with a certificate: - -`codesign -s {{"My Company Name"}} {{/path/to/App.app}}` - -- Verify the certificate of an application: - -`codesign -v {{/path/to/App.app}}` diff --git a/pages.cn/osx/command.md b/pages.cn/osx/command.md deleted file mode 100644 index 1cd7922d9..000000000 --- a/pages.cn/osx/command.md +++ /dev/null @@ -1,7 +0,0 @@ -# command - -> Command forces the shell to execute the program and ignore any functions, builtins and aliases with the same name. - -- Execute the ls program literally, even if an ls alias exists: - -`command {{ls}}` diff --git a/pages.cn/osx/compgen.md b/pages.cn/osx/compgen.md deleted file mode 100644 index 15e350519..000000000 --- a/pages.cn/osx/compgen.md +++ /dev/null @@ -1,23 +0,0 @@ -# compgen - -> A built-in command for auto-completion in bash, which is called on pressing TAB key twice. - -- List all commands that you could run: - -`compgen -c` - -- List all aliases: - -`compgen -a` - -- List all functions that you could run: - -`compgen -A function` - -- Show shell reserved key words: - -`compgen -k` - -- See all available commands/aliases starting with 'ls': - -`compgen -ac {{ls}}` diff --git a/pages.cn/osx/date.md b/pages.cn/osx/date.md deleted file mode 100644 index 92e097131..000000000 --- a/pages.cn/osx/date.md +++ /dev/null @@ -1,19 +0,0 @@ -# date - -> Set or display the system date. - -- Display the current date using the default locale's format: - -`date +"%c"` - -- Display the current date in UTC and ISO 8601 format: - -`date -u +"%Y-%m-%dT%H:%M:%SZ"` - -- Display the current date as a Unix timestamp (seconds since the Unix epoch): - -`date +%s` - -- Display a specific date (represented as a Unix timestamp) using the default format: - -`date -r 1473305798` diff --git a/pages.cn/osx/dd.md b/pages.cn/osx/dd.md deleted file mode 100644 index 8ca14df8d..000000000 --- a/pages.cn/osx/dd.md +++ /dev/null @@ -1,19 +0,0 @@ -# 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` - -- Generate 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.cn/osx/defaults.md b/pages.cn/osx/defaults.md deleted file mode 100644 index 9a359da9e..000000000 --- a/pages.cn/osx/defaults.md +++ /dev/null @@ -1,23 +0,0 @@ -# defaults - -> Read and write macOS user configuration for applications. - -- Read system defaults for an application option: - -`defaults read {{application}} {{option}}` - -- Read default values for an application option: - -`defaults read -app {{application}} {{option}}` - -- Write the default value of an application option: - -`defaults write {{application}} {{option}} {{-type}} {{value}}` - -- Speed up Mission Control animations: - -`defaults write com.apple.Dock expose-animation-duration -float 0.1` - -- Delete all defaults of an application: - -`defaults delete {{application}}` diff --git a/pages.cn/osx/diskutil.md b/pages.cn/osx/diskutil.md deleted file mode 100644 index a55a3b626..000000000 --- a/pages.cn/osx/diskutil.md +++ /dev/null @@ -1,19 +0,0 @@ -# diskutil - -> Utility to manage local disks and volumes. - -- List all currently available disks, partitions and mounted volumes: - -`diskutil list` - -- Repair the file system data structures of a volume: - -`diskutil repairVolume {{/dev/diskX}}` - -- Unmount a volume: - -`diskutil unmountDisk {{/dev/diskX}}` - -- Eject a CD/DVD (unmount first): - -`diskutil eject {{/dev/disk1}}` diff --git a/pages.cn/osx/ditto.md b/pages.cn/osx/ditto.md deleted file mode 100644 index 039824b66..000000000 --- a/pages.cn/osx/ditto.md +++ /dev/null @@ -1,15 +0,0 @@ -# ditto - -> Copy files and folders. - -- Overwrite 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}}` diff --git a/pages.cn/osx/dmesg.md b/pages.cn/osx/dmesg.md deleted file mode 100644 index eb3b54352..000000000 --- a/pages.cn/osx/dmesg.md +++ /dev/null @@ -1,15 +0,0 @@ -# dmesg - -> Write the kernel messages to standard output. - -- Show kernel messages: - -`dmesg` - -- Show how much physical memory is available on this system: - -`dmesg | grep -i memory` - -- Show kernel messages 1 page at a time: - -`dmesg | less` diff --git a/pages.cn/osx/drutil.md b/pages.cn/osx/drutil.md deleted file mode 100644 index ce41c8e74..000000000 --- a/pages.cn/osx/drutil.md +++ /dev/null @@ -1,11 +0,0 @@ -# drutil - -> Interact with DVD burners. - -- Eject a disk from the drive: - -`drutil eject` - -- Burn a folder as an ISO9660 filesystem onto a DVD. Don't verify and eject when complete: - -`drutil burn -noverify -eject -iso9660` diff --git a/pages.cn/osx/du.md b/pages.cn/osx/du.md deleted file mode 100644 index 10def6fe9..000000000 --- a/pages.cn/osx/du.md +++ /dev/null @@ -1,27 +0,0 @@ -# du - -> Disk usage: estimate and summarize file and folder space usage. - -- List the sizes of a folder and any subfolders, in the given unit (KB/MB/GB): - -`du -{{k|m|g}} {{path/to/folder}}` - -- List the sizes of a folder and any subfolders, in human-readable form (i.e. auto-selecting the appropriate unit for each size): - -`du -h {{path/to/folder}}` - -- Show the size of a single folder, in human readable units: - -`du -sh {{path/to/folder}}` - -- List the human-readable sizes of a folder and of all the files and folders within it: - -`du -ah {{path/to/folder}}` - -- List the human-readable sizes of a folder and any subfolders, up to N levels deep: - -`du -h -d {{N}} {{path/to/folder}}` - -- List the human-readable size of all .jpg files in subfolders of the current folder, and show a cumulative total at the end: - -`du -ch */*.jpg` diff --git a/pages.cn/osx/duti.md b/pages.cn/osx/duti.md deleted file mode 100644 index 5f6c61635..000000000 --- a/pages.cn/osx/duti.md +++ /dev/null @@ -1,27 +0,0 @@ -# duti - -> Set default applications for document types and URL schemes on macOS. - -- Set Safari as the default handler for HTML documents: - -`duti -s {{com.apple.Safari}} {{public.html}} all` - -- Set VLC as the default viewer for files with .m4v extensions: - -`duti -s {{org.videolan.vlc}} {{m4v}} viewer` - -- Set Finder as the default handler for the ftp:// URL scheme: - -`duti -s {{com.apple.Finder}} {{ftp}}` - -- Display information about the default application for a given extension: - -`duti -x {{ext}}` - -- Display the default handler for a given UTI: - -`duti -d {{uti}}` - -- Display all handlers of a given UTI: - -`duti -l {{uti}}` diff --git a/pages.cn/osx/eval.md b/pages.cn/osx/eval.md deleted file mode 100644 index ee1135a91..000000000 --- a/pages.cn/osx/eval.md +++ /dev/null @@ -1,11 +0,0 @@ -# eval - -> Execute arguments as a single command in the current shell and return its result. - -- Call `echo` with the "foo" argument: - -`eval "{{echo foo}}"` - -- Set a variable in the current shell: - -`eval "{{foo=bar}}"` diff --git a/pages.cn/osx/export.md b/pages.cn/osx/export.md deleted file mode 100644 index c09481e8e..000000000 --- a/pages.cn/osx/export.md +++ /dev/null @@ -1,15 +0,0 @@ -# export - -> Command to mark shell variables in the current environment to be exported with any newly forked child processes. - -- Set a new environment variable: - -`export {{VARIABLE}}={{value}}` - -- Remove an environment variable: - -`export -n {{VARIABLE}}` - -- Append something to the PATH variable: - -`export PATH=$PATH:{{path/to/append}}` diff --git a/pages.cn/osx/fc.md b/pages.cn/osx/fc.md deleted file mode 100644 index 7e6c46410..000000000 --- a/pages.cn/osx/fc.md +++ /dev/null @@ -1,15 +0,0 @@ -# fc - -> Open the most recent command and edit it. - -- Open in the default system editor: - -`fc` - -- Specify an editor to open with: - -`fc -e {{'emacs'}}` - -- List recent commands from history: - -`fc -l` diff --git a/pages.cn/osx/feh.md b/pages.cn/osx/feh.md deleted file mode 100644 index 3d3464c91..000000000 --- a/pages.cn/osx/feh.md +++ /dev/null @@ -1,27 +0,0 @@ -# feh - -> Lightweight image viewing utility. - -- View images locally or using a URL: - -`feh {{path/to/images}}` - -- View images recursively: - -`feh --recursive {{path/to/images}}` - -- View images without window borders: - -`feh --borderless {{path/to/images}}` - -- Exit after the last image: - -`feh --cycle-once {{path/to/images}}` - -- Set the slideshow cycle delay: - -`feh --slideshow-delay {{seconds}} {{path/to/images}}` - -- Set your wallpaper (centered, filled, maximized, scaled or tiled): - -`feh --bg-{{center|fill|max|scale|tile}} {{path/to/image}}` diff --git a/pages.cn/osx/file.md b/pages.cn/osx/file.md deleted file mode 100644 index 841d703d3..000000000 --- a/pages.cn/osx/file.md +++ /dev/null @@ -1,23 +0,0 @@ -# file - -> Determine file type. - -- Give a description of the type of the specified file. Works fine for files with no file extension: - -`file {{filename}}` - -- Look inside a zipped file and determine the file type(s) inside: - -`file -z {{foo.zip}}` - -- Allow file to work with special or device files: - -`file -s {{filename}}` - -- Don't stop at first file type match; keep going until the end of the file: - -`file -k {{filename}}` - -- Determine the mime encoding type of a file: - -`file -I {{filename}}` diff --git a/pages.cn/osx/fsck.md b/pages.cn/osx/fsck.md deleted file mode 100644 index 7ba527069..000000000 --- a/pages.cn/osx/fsck.md +++ /dev/null @@ -1,20 +0,0 @@ -# fsck - -> Check the integrity of a filesystem or repair it. The filesystem should be unmounted at the time the command is run. -> It is a wrapper that calls `fsck_hfs`, `fsck_apfs`, `fsck_msdos`, `fsck_exfat`, and `fsck_udf` as needed. - -- Check filesystem /dev/sda, reporting any damaged blocks: - -`fsck {{/dev/sda}}` - -- Check filesystem /dev/sda only if it is clean, reporting any damaged blocks and interactively letting the user choose to repair each one: - -`fsck -f {{/dev/sda}}` - -- Check filesystem /dev/sda only if it is clean, reporting any damaged blocks and automatically repairing them: - -`fsck -fy {{/dev/sda}}` - -- Check filesystem /dev/sda, reporting whether it has been cleanly unmounted: - -`fsck -q {{/dev/sda}}` diff --git a/pages.cn/osx/gunicorn.md b/pages.cn/osx/gunicorn.md deleted file mode 100644 index eaeaa68d8..000000000 --- a/pages.cn/osx/gunicorn.md +++ /dev/null @@ -1,27 +0,0 @@ -# gunicorn - -> Python WSGI HTTP Server. - -- Run Python web app: - -`gunicorn {{import.path:app_object}}` - -- Listen on port 8080 on localhost: - -`gunicorn --bind {{localhost}}:{{8080}} {{import.path:app_object}}` - -- Turn on live reload: - -`gunicorn --reload {{import.path:app_object}}` - -- Use 4 worker processes for handling requests: - -`gunicorn --workers {{4}} {{import.path:app_object}}` - -- Use 4 worker threads for handling requests: - -`gunicorn --threads {{4}} {{import.path:app_object}}` - -- Run app over HTTPS: - -`gunicorn --certfile {{cert.pem}} --keyfile {{key.pem}} {{import.path:app_object}}` diff --git a/pages.cn/osx/head.md b/pages.cn/osx/head.md deleted file mode 100644 index 993a1f8f1..000000000 --- a/pages.cn/osx/head.md +++ /dev/null @@ -1,11 +0,0 @@ -# head - -> Output the first part of files. - -- Output the first few lines of a file: - -`head -n {{count_of_lines}} {{filename}}` - -- Output the first few bytes of a file: - -`head -c {{number_in_bytes}} {{filename}}` diff --git a/pages.cn/osx/hexdump.md b/pages.cn/osx/hexdump.md deleted file mode 100644 index b0463261c..000000000 --- a/pages.cn/osx/hexdump.md +++ /dev/null @@ -1,15 +0,0 @@ -# hexdump - -> An ASCII, decimal, hexadecimal, octal dump. - -- Print the hexadecimal representation of a file: - -`hexdump {{file}}` - -- Display the input offset in hexadecimal and its ASCII representation in two columns: - -`hexdump -C {{file}}` - -- Display the hexadecimal representation of a file, but interpret only n bytes of the input: - -`hexdump -C -n{{number_of_bytes}} {{file}}` diff --git a/pages.cn/osx/hostname.md b/pages.cn/osx/hostname.md deleted file mode 100644 index 88d0981d6..000000000 --- a/pages.cn/osx/hostname.md +++ /dev/null @@ -1,11 +0,0 @@ -# hostname - -> Show or set the system's host name. - -- Show current host name: - -`hostname` - -- Set current host name: - -`hostname {{new_hostname}}` diff --git a/pages.cn/osx/imgcat.md b/pages.cn/osx/imgcat.md deleted file mode 100644 index 0b97ee824..000000000 --- a/pages.cn/osx/imgcat.md +++ /dev/null @@ -1,8 +0,0 @@ -# imgcat - -> A utility to display images directly on the command line. -> Requires a compatible terminal such as iTerm2. - -- Display an image on the command line: - -`imgcat {{filename}}` diff --git a/pages.cn/osx/launchctl.md b/pages.cn/osx/launchctl.md deleted file mode 100644 index 5977338d4..000000000 --- a/pages.cn/osx/launchctl.md +++ /dev/null @@ -1,32 +0,0 @@ -# launchctl - -> A command-line interface to Apple's `launchd` manager for launch daemons (system-wide services) and launch agents (per-user programs). -> `launchd` loads XML-based `*.plist` files placed in the appropriate locations, and runs the corresponding commands according to their defined schedule. - -- Activate a user-specific agent to be loaded into `launchd` whenever the user logs in: - -`launchctl load ~/Library/LaunchAgents/{{my_script}}.plist` - -- Activate an agent which requires root privileges to run and/or should be loaded whenever any user logs in (note the absence of `~` in the path): - -`sudo launchctl load /Library/LaunchAgents/{{root_script}}.plist` - -- Activate a system-wide daemon to be loaded whenever the system boots up (even if no user logs in): - -`sudo launchctl load /Library/LaunchDaemons/{{system_daemon}}.plist` - -- Show all loaded agents/daemons, with the PID if the process they specify is currently running, and the exit code returned the last time they ran: - -`launchctl list` - -- Unload a currently loaded agent, e.g. to make changes (note: the plist file is automatically loaded into `launchd` after a reboot and/or logging in): - -`launchctl unload ~/Library/LaunchAgents/{{my_script}}.plist` - -- Manually run a known (loaded) agent/daemon, even if it isn’t the right time (note: this command uses the agent's label, rather than the filename): - -`launchctl start {{my_script}}` - -- Manually kill the process associated with a known agent/daemon, if it's running: - -`launchctl stop {{my_script}}` diff --git a/pages.cn/osx/lldb.md b/pages.cn/osx/lldb.md deleted file mode 100644 index 8255dc7e3..000000000 --- a/pages.cn/osx/lldb.md +++ /dev/null @@ -1,15 +0,0 @@ -# lldb - -> The LLVM Low-Level Debugger. - -- Debug an executable: - -`lldb {{executable}}` - -- Attach `lldb` to a running process with a given PID: - -`lldb -p {{pid}}` - -- Wait for a new process to launch with a given name, and attach to it: - -`lldb -w -n {{process_name}}` diff --git a/pages.cn/osx/locate.md b/pages.cn/osx/locate.md deleted file mode 100644 index aaa66a987..000000000 --- a/pages.cn/osx/locate.md +++ /dev/null @@ -1,15 +0,0 @@ -# locate - -> Find filenames quickly. - -- Look for pattern in the database. Note: the database is recomputed periodically (usually weekly or daily): - -`locate {{pattern}}` - -- Look for a file by its exact filename (a pattern containing no globbing characters is interpreted as `*pattern*`): - -`locate */{{filename}}` - -- Recompute the database. You need to do it if you want to find recently added files: - -`sudo /usr/libexec/locate.updatedb` diff --git a/pages.cn/osx/logger.md b/pages.cn/osx/logger.md deleted file mode 100644 index d5bad38eb..000000000 --- a/pages.cn/osx/logger.md +++ /dev/null @@ -1,23 +0,0 @@ -# logger - -> Add messages to syslog (/var/log/syslog). - -- Log a message to syslog: - -`logger {{message}}` - -- Take input from stdin and log to syslog: - -`echo {{log_entry}} | logger` - -- Send the output to a remote syslog server running at a given port. Default port is 514: - -`echo {{log_entry}} | logger -h {{hostname}} -P {{port}}` - -- Use a specific tag for every line logged. Default is the name of logged in user: - -`echo {{log_entry}} | logger -t {{tag}}` - -- Log messages with a given priority. Default is `user.notice`. See `man logger` for all priority options: - -`echo {{log_entry}} | logger -p {{user.warning}}` diff --git a/pages.cn/osx/look.md b/pages.cn/osx/look.md deleted file mode 100644 index 3ef7c169d..000000000 --- a/pages.cn/osx/look.md +++ /dev/null @@ -1,11 +0,0 @@ -# look - -> Look for lines in sorted file. - -- Look for lines which begins with the given prefix: - -`look {{prefix}} {{file}}` - -- Look for lines ignoring case: - -`look -f {{prefix}} {{file}}` diff --git a/pages.cn/osx/m.md b/pages.cn/osx/m.md deleted file mode 100644 index d790c6fbb..000000000 --- a/pages.cn/osx/m.md +++ /dev/null @@ -1,23 +0,0 @@ -# m - -> Swiss Army Knife for macOS. - -- Get the battery status: - -`m battery status` - -- Turn off bluetooth: - -`m bluetooth off` - -- List available filesystems for formatting: - -`m disk filesystems` - -- Enable Dock's auto hide feature: - -`m dock autohide YES` - -- Disable the firewall: - -`m firewall disable` diff --git a/pages.cn/osx/md5.md b/pages.cn/osx/md5.md deleted file mode 100644 index 8e7da5b26..000000000 --- a/pages.cn/osx/md5.md +++ /dev/null @@ -1,19 +0,0 @@ -# md5 - -> Calculate MD5 cryptographic checksums. - -- Calculate the MD5 checksum for a file: - -`md5 {{filename}}` - -- Calculate MD5 checksums for multiple files: - -`md5 {{filename1}} {{filename2}}` - -- Output only the md5 checksum (no filename): - -`md5 -q {{filename}}` - -- Print a checksum of the given string: - -`md5 -s {{string}}` diff --git a/pages.cn/osx/mdfind.md b/pages.cn/osx/mdfind.md deleted file mode 100644 index 2fc2ada13..000000000 --- a/pages.cn/osx/mdfind.md +++ /dev/null @@ -1,15 +0,0 @@ -# mdfind - -> List files matching a given query. - -- Find a file by its name: - -`mdfind -name {{file}}` - -- Find a file by its content: - -`mdfind {{query}}` - -- Find a file containing a string, in a given directory: - -`mdfind -onlyin {{directory}} {{query}}` diff --git a/pages.cn/osx/mdutil.md b/pages.cn/osx/mdutil.md deleted file mode 100644 index efcf728d5..000000000 --- a/pages.cn/osx/mdutil.md +++ /dev/null @@ -1,15 +0,0 @@ -# mdutil - -> Manage the metadata stores used by Spotlight for indexing. - -- Show the indexing status of the startup volume: - -`mdutil -s {{/}}` - -- Turn on/off the Spotlight indexing for a given volume: - -`mdutil -i {{on|off}} {{path/to/volume}}` - -- Erase the metadata stores and restart the indexing process: - -`mdutil -E {{path/to/volume}}` diff --git a/pages.cn/osx/mkfile.md b/pages.cn/osx/mkfile.md deleted file mode 100644 index 7b3614098..000000000 --- a/pages.cn/osx/mkfile.md +++ /dev/null @@ -1,15 +0,0 @@ -# mkfile - -> Create one or more empty files of any size. - -- Create an empty file of 15 kilobytes: - -`mkfile -n {{15k}} {{file_name}}` - -- Create a file of a given size and unit (bytes, KB, MB, GB): - -`mkfile -n {{size}}{{b|k|m|g}} {{file_name}}` - -- Create two files of 4 megabytes each: - -`mkfile -n {{4m}} {{first_file_name}} {{second_file_name}}` diff --git a/pages.cn/osx/n.md b/pages.cn/osx/n.md deleted file mode 100644 index cc3db8f9f..000000000 --- a/pages.cn/osx/n.md +++ /dev/null @@ -1,23 +0,0 @@ -# n - -> Tool to manage multiple node versions. - -- Install a given version of node. If the version is already installed, it will be activated: - -`n {{version}}` - -- Display installed versions and interactively activate one of them: - -`n` - -- Remove a version: - -`n rm {{version}}` - -- Execute a file with a given version: - -`n use {{version}} {{file.js}}` - -- Output binary path for a version: - -`n bin {{version}}` diff --git a/pages.cn/osx/netstat.md b/pages.cn/osx/netstat.md deleted file mode 100644 index c8e52183c..000000000 --- a/pages.cn/osx/netstat.md +++ /dev/null @@ -1,27 +0,0 @@ -# netstat - -> Displays network-related information such as open connections, open socket ports, etc. - -- List all ports: - -`netstat -a` - -- List all listening ports: - -`netstat -l` - -- List listening TCP ports: - -`netstat -t` - -- Display PID and program names for a specific port: - -`netstat -p {PROTOCOL}` - -- List information continuously: - -`netstat -c` - -- Print the routing table: - -`netstat -nr` diff --git a/pages.cn/osx/networksetup.md b/pages.cn/osx/networksetup.md deleted file mode 100644 index fb7df8197..000000000 --- a/pages.cn/osx/networksetup.md +++ /dev/null @@ -1,19 +0,0 @@ -# networksetup - -> Configuration tool for Network System Preferences. - -- List available network service providers (Ethernet, Wi-Fi, Bluetooth, etc): - -`networksetup -listallnetworkservices` - -- Show network settings for a particular networking device: - -`networksetup -getinfo {{"Wi-Fi"}}` - -- Get currently connected Wi-Fi network name (Wi-Fi device usually en0 or en1): - -`networksetup -getairportnetwork {{en0}}` - -- Connect to a particular Wi-Fi network: - -`networksetup -setairportnetwork {{en0}} {{"Airport Network SSID"}} {{password}}` diff --git a/pages.cn/osx/nm.md b/pages.cn/osx/nm.md deleted file mode 100644 index 4348dd26e..000000000 --- a/pages.cn/osx/nm.md +++ /dev/null @@ -1,19 +0,0 @@ -# nm - -> List symbol names in object files. - -- List global (extern) functions in a file (prefixed with T): - -`nm -g {{file.o}}` - -- List only undefined symbols in a file: - -`nm -u {{file.o}}` - -- List all symbols, even debugging symbols: - -`nm -a {{file.o}}` - -- Demangle C++ symbols: - -`nm {{file.o}} | c++filt` diff --git a/pages.cn/osx/oathtool.md b/pages.cn/osx/oathtool.md deleted file mode 100644 index 95ad596b4..000000000 --- a/pages.cn/osx/oathtool.md +++ /dev/null @@ -1,15 +0,0 @@ -# oathtool - -> OATH one-time password tool. - -- Generate TOTP token (behaves like Google Authenticator): - -`oathtool --totp --base32 {{secret}}` - -- Generate a TOTP token for a specific time: - -`oathtool --totp --now {{2004−02−29 16:21:42}} --base32 {{secret}}` - -- Validate a TOTP token: - -`oathtool --totp --base32 {{secret}} {{token}}` diff --git a/pages.cn/osx/open.md b/pages.cn/osx/open.md deleted file mode 100644 index ed4889979..000000000 --- a/pages.cn/osx/open.md +++ /dev/null @@ -1,27 +0,0 @@ -# open - -> Opens files, directories and applications. - -- Open a file with the associated application: - -`open {{file.ext}}` - -- Run a graphical macOS application: - -`open -a {{Application}}` - -- Run a graphical macOS app based on the bundle identifier (refer to `osascript` for an easy way get this): - -`open -b {{com.domain.application}}` - -- Open the current directory in Finder: - -`open .` - -- Reveal a file in finder: - -`open -R {{path/to/file}}` - -- Open all the files of a given extension in the current directory with the associated application: - -`open {{*.ext}}` diff --git a/pages.cn/osx/opensnoop.md b/pages.cn/osx/opensnoop.md deleted file mode 100644 index e54bfd570..000000000 --- a/pages.cn/osx/opensnoop.md +++ /dev/null @@ -1,19 +0,0 @@ -# opensnoop - -> Tool that tracks file opens on your system. - -- Print all file opens as they occur: - -`sudo opensnoop` - -- Track all file opens by a process by name: - -`sudo opensnoop -n {{process_name}}` - -- Track all file opens by a process by PID: - -`sudo opensnoop -p {{PID}}` - -- Track which processes open a specified file: - -`sudo opensnoop -f {{path/to/file}}` diff --git a/pages.cn/osx/osascript.md b/pages.cn/osx/osascript.md deleted file mode 100644 index 68ec3f1b3..000000000 --- a/pages.cn/osx/osascript.md +++ /dev/null @@ -1,27 +0,0 @@ -# osascript - -> Run AppleScript or JavaScript for Automation (JXA) from the command line. - -- Run an AppleScript command: - -`osascript -e '{{say "Hello world"}}'` - -- Run multiple AppleScript commands: - -`osascript -e '{{say "Hello"}}' -e '{{say "world"}}'` - -- Run a compiled (`*.scpt`), bundled (`*.scptd`), or plaintext (`*.applescript`) AppleScript file: - -`osascript {{path/to/apple.scpt}}` - -- Get the bundle identifier of an application (useful for `open -b`): - -`osascript -e 'id of app "{{Application}}"'` - -- Run a JavaScript command: - -`osascript -l JavaScript -e '{{console.log("Hello world");}}'` - -- Run a JavaScript file: - -`osascript -l JavaScript {{path/to/script.js}}` diff --git a/pages.cn/osx/pbcopy.md b/pages.cn/osx/pbcopy.md deleted file mode 100644 index ed297e941..000000000 --- a/pages.cn/osx/pbcopy.md +++ /dev/null @@ -1,11 +0,0 @@ -# pbcopy - -> Place standard output in the clipboard. - -- Place the contents of a file in the clipboard: - -`pbcopy < {{file}}` - -- Place the results of a command in the clipboard: - -`find . -type t -name "*.png" | pbcopy` diff --git a/pages.cn/osx/pbpaste.md b/pages.cn/osx/pbpaste.md deleted file mode 100644 index b4cfb3155..000000000 --- a/pages.cn/osx/pbpaste.md +++ /dev/null @@ -1,11 +0,0 @@ -# pbpaste - -> Send the contents of the clipboard to standard output. - -- Write the contents of the clipboard to a file: - -`pbpaste > {{file}}` - -- Use the contents of the clipboard as input to a command: - -`pbpaste | grep foo` diff --git a/pages.cn/osx/pdfgrep.md b/pages.cn/osx/pdfgrep.md deleted file mode 100644 index 5e229a05b..000000000 --- a/pages.cn/osx/pdfgrep.md +++ /dev/null @@ -1,23 +0,0 @@ -# pdfgrep - -> Search text in PDF files. - -- Find lines that match pattern in a PDF: - -`pdfgrep {{pattern}} {{file.pdf}}` - -- Include file name and page number for each matched line: - -`pdfgrep --with-filename --page-number {{pattern}} {{file.pdf}}` - -- Do a case insensitive search for lines that begin with "foo" and return the first 3 matches: - -`pdfgrep --max-count {{3}} --ignore-case {{'^foo'}} {{file.pdf}}` - -- Find pattern in files with a .pdf extension in the current directory recursively: - -`pdfgrep --recursive {{pattern}}` - -- Find pattern on files that match a specific glob in the current directory recursively: - -`pdfgrep --recursive --include {{'*book.pdf'}} {{pattern}}` diff --git a/pages.cn/osx/pmset.md b/pages.cn/osx/pmset.md deleted file mode 100644 index fc0956338..000000000 --- a/pages.cn/osx/pmset.md +++ /dev/null @@ -1,28 +0,0 @@ -# pmset - -> Configure macOS power management settings, as one might do in System Preferences > Energy Saver. -> Commands that modify settings must begin with `sudo`. - -- Display the current power management settings: - -`pmset -g` - -- Display the current power source and battery levels: - -`pmset -g batt` - -- Set display to never sleep when on charger power: - -`sudo pmset -c displaysleep 0` - -- Set display to sleep after 15 minutes when on battery power: - -`sudo pmset -b displaysleep 15` - -- Schedule computer to automatically wake up every weekday at 9 AM: - -`sudo pmset repeat wake MTWRF 09:00:00` - -- Restore to system defaults: - -`sudo pmset -a displaysleep 10 disksleep 10 sleep 30 womp 1` diff --git a/pages.cn/osx/pod.md b/pages.cn/osx/pod.md deleted file mode 100644 index 62584dcea..000000000 --- a/pages.cn/osx/pod.md +++ /dev/null @@ -1,31 +0,0 @@ -# pod - -> Dependency manager for Swift and Objective-C Cocoa projects. - -- Create a Podfile for the current project with the default contents: - -`pod init` - -- Download and install all pods defined in the Podfile (that haven't been installed before): - -`pod install` - -- List all available pods: - -`pod list` - -- Show the outdated pods (of those currently installed): - -`pod outdated` - -- Update all currently installed pods to their newest version: - -`pod update` - -- Update a specific (previously installed) pod to its newest version: - -`pod update {{pod_name}}` - -- Remove CocoaPods from a Xcode project: - -`pod deintegrate {{xcode_project}}` diff --git a/pages.cn/osx/popd.md b/pages.cn/osx/popd.md deleted file mode 100644 index fab4246dc..000000000 --- a/pages.cn/osx/popd.md +++ /dev/null @@ -1,15 +0,0 @@ -# popd - -> Remove a directory placed on the directory stack via the pushd shell built-in. - -- Remove the top directory from the stack and cd to it: - -`popd` - -- Remove the Nth directory (starting from zero to the left from the list printed with `dirs`): - -`popd +N` - -- Remove the Nth directory (starting from zero to the right from the list printed with `dirs`): - -`popd -N` diff --git a/pages.cn/osx/port.md b/pages.cn/osx/port.md deleted file mode 100644 index 80e76ec73..000000000 --- a/pages.cn/osx/port.md +++ /dev/null @@ -1,27 +0,0 @@ -# port - -> Package manager for macOS. - -- Search for a package: - -`port search {{search_term}}` - -- Install a package: - -`sudo port install {{package_name}}` - -- List installed packages: - -`port installed` - -- Update port and fetch latest list of available packages: - -`sudo port selfupdate` - -- Upgrade outdated packages: - -`sudo port upgrade outdated` - -- Remove old versions of installed packages: - -`sudo port uninstall inactive` diff --git a/pages.cn/osx/pushd.md b/pages.cn/osx/pushd.md deleted file mode 100644 index 21d608f84..000000000 --- a/pages.cn/osx/pushd.md +++ /dev/null @@ -1,16 +0,0 @@ -# pushd - -> Place a directory on a stack so it can be accessed later. -> See also `popd` to switch back to original directory. - -- Switch to directory and push it on the stack: - -`pushd {{directory}}` - -- Switch first and second directories on the stack: - -`pushd` - -- Rotate stack by making the 5th element the top of the stack: - -`pushd +4` diff --git a/pages.cn/osx/pwgen.md b/pages.cn/osx/pwgen.md deleted file mode 100644 index 70f4cc67f..000000000 --- a/pages.cn/osx/pwgen.md +++ /dev/null @@ -1,15 +0,0 @@ -# pwgen - -> Generate pronounceable passwords. - -- Generate random password with s[y]mbols: - -`pwgen -y {{length}}` - -- Generate secure, hard-to-memorize passwords: - -`pwgen -s {{length}}` - -- Generate password with at least one capital letter in them: - -`pwgen -c {{length}}` diff --git a/pages.cn/osx/qlmanage.md b/pages.cn/osx/qlmanage.md deleted file mode 100644 index 92da5d901..000000000 --- a/pages.cn/osx/qlmanage.md +++ /dev/null @@ -1,15 +0,0 @@ -# qlmanage - -> QuickLook server tool. - -- Display QuickLook for one or multiple files: - -`qlmanage -p {{filename}} {{filename2}}` - -- Compute 300px wide PNG thumbnails of all JPEGs in the current directory and put them in a directory: - -`qlmanage {{*.jpg}} -t -s {{300}} {{path/to/directory}}` - -- Reset Quicklook: - -`qlmanage -r` diff --git a/pages.cn/osx/route.md b/pages.cn/osx/route.md deleted file mode 100644 index 0bea78c1e..000000000 --- a/pages.cn/osx/route.md +++ /dev/null @@ -1,28 +0,0 @@ -# route - -> Manually manipulate the routing tables. -> Necessitates to be root. - -- Add a route to a destination through a gateway: - -`sudo route add {{dest_ip_address}} {{gateway_address}}` - -- Add a route to a /24 subnet through a gateway: - -`sudo route add {{subnet_ip_address}}/24 {{gateway_address}}` - -- Run in test mode (does not do anything, just print): - -`sudo route -t add {{dest_ip_address}}/24 {{gateway_address}}` - -- Remove all routes: - -`sudo route flush` - -- Delete a specific route: - -`sudo route delete {{dest_ip_address}}/24` - -- Lookup and display the route for a destination (hostname or IP address): - -`sudo route get {{destination}}` diff --git a/pages.cn/osx/rubocop.md b/pages.cn/osx/rubocop.md deleted file mode 100644 index fb4e31f61..000000000 --- a/pages.cn/osx/rubocop.md +++ /dev/null @@ -1,31 +0,0 @@ -# rubocop - -> Lint Ruby files. - -- Check all files in the current directory (including subdirectories): - -`rubocop` - -- Check one or more specific files or directories: - -`rubocop {{path/to/file}} {{path/to/directory}}` - -- Write output to file: - -`rubocop --out {{path/to/file}}` - -- View list of cops (linter rules): - -`rubocop --show-cops` - -- Exclude a cop: - -`rubocop --except {{cop_1}} {{cop_2}}` - -- Run only specified cops: - -`rubocop --only {{cop_1}} {{cop_2}}` - -- Auto-correct files (experimental): - -`rubocop --auto-correct` diff --git a/pages.cn/osx/runit.md b/pages.cn/osx/runit.md deleted file mode 100644 index 841092117..000000000 --- a/pages.cn/osx/runit.md +++ /dev/null @@ -1,11 +0,0 @@ -# runit - -> 3-stage init system. - -- Start runit's 3-stage init scheme: - -`runit` - -- Shut down runit: - -`kill --CONT {{runit_pid}}` diff --git a/pages.cn/osx/runsv.md b/pages.cn/osx/runsv.md deleted file mode 100644 index 8b131ae6a..000000000 --- a/pages.cn/osx/runsv.md +++ /dev/null @@ -1,11 +0,0 @@ -# runsv - -> Start and manage a runit service. - -- Start a runit service as the current user: - -`runsv {{path/to/service}}` - -- Start a runit service as root: - -`sudo runsv {{path/to/service}}` diff --git a/pages.cn/osx/runsvchdir.md b/pages.cn/osx/runsvchdir.md deleted file mode 100644 index 91ee11444..000000000 --- a/pages.cn/osx/runsvchdir.md +++ /dev/null @@ -1,7 +0,0 @@ -# runsvchdir - -> Change the directory `runsvdir` uses by default. - -- Switch `runsvdir` directories: - -`sudo runsvchdir {{/path/to/directory}}` diff --git a/pages.cn/osx/runsvdir.md b/pages.cn/osx/runsvdir.md deleted file mode 100644 index bc1ad17b1..000000000 --- a/pages.cn/osx/runsvdir.md +++ /dev/null @@ -1,15 +0,0 @@ -# runsvdir - -> Run an entire directory of services. - -- Start and manage all services in a directory as the current user: - -`runsvdir {{path/to/services}}` - -- Start and manage all services in a directory as root: - -`sudo runsvdir {{path/to/services}}` - -- Start services in separate sessions: - -`runsvdir -P {{path/to/services}}` diff --git a/pages.cn/osx/say.md b/pages.cn/osx/say.md deleted file mode 100644 index ad23e2fdb..000000000 --- a/pages.cn/osx/say.md +++ /dev/null @@ -1,23 +0,0 @@ -# say - -> Converts text to speech. - -- Say a phrase aloud: - -`say {{"I like to ride my bike."}}` - -- Read a file aloud: - -`say -f {{filename.txt}}` - -- Say a phrase with a custom voice and speech rate: - -`say -v {{voice}} -r {{words_per_minute}} {{"I'm sorry Dave, I can't let you do that."}}` - -- List the available voices: - -`say -v ?` - -- Create an audio file of the spoken text: - -`say -o {{filename.aiff}} {{"Here's to the Crazy Ones."}}` diff --git a/pages.cn/osx/scutil.md b/pages.cn/osx/scutil.md deleted file mode 100644 index 6aacb7a78..000000000 --- a/pages.cn/osx/scutil.md +++ /dev/null @@ -1,28 +0,0 @@ -# scutil - -> Manage system configuration parameters. -> Necessitates to be root when setting configuration. - -- Display DNS Configuration: - -`scutil --dns` - -- Display proxy configuration: - -`scutil --proxy` - -- Get computer name: - -`scutil --get ComputerName` - -- Set computer name: - -`sudo scutil --set ComputerName {{computer_name}}` - -- Get hostname: - -`scutil --get HostName` - -- Set hostname: - -`scutil --set HostName {{hostname}}` diff --git a/pages.cn/osx/sed.md b/pages.cn/osx/sed.md deleted file mode 100644 index 8e8be1b30..000000000 --- a/pages.cn/osx/sed.md +++ /dev/null @@ -1,31 +0,0 @@ -# sed - -> Edit text in a scriptable manner. - -- Replace the first occurrence of a string in a file, and print the result: - -`sed 's/{{find}}/{{replace}}/' {{filename}}` - -- Replace all occurrences of an extended regular expression in a file: - -`sed -E 's/{{regex}}/{{replace}}/g' {{filename}}` - -- Replace all occurrences of a string in a file, overwriting the file (i.e. in-place): - -`sed -i '' 's/{{find}}/{{replace}}/g' {{filename}}` - -- Replace only on lines matching the line pattern: - -`sed '/{{line_pattern}}/s/{{find}}/{{replace}}/' {{filename}}` - -- Print only text between n-th line till the next empty line: - -`sed -n '{{line_number}},/^$/p' {{filename}}` - -- Apply multiple find-replace expressions to a file: - -`sed -e 's/{{find}}/{{replace}}/' -e 's/{{find}}/{{replace}}/' {{filename}}` - -- Replace separator / by any other character not used in the find or replace patterns, e.g., #: - -`sed 's#{{find}}#{{replace}}#' {{filename}}` diff --git a/pages.cn/osx/shasum.md b/pages.cn/osx/shasum.md deleted file mode 100644 index 64e658ea8..000000000 --- a/pages.cn/osx/shasum.md +++ /dev/null @@ -1,23 +0,0 @@ -# shasum - -> Calculate or check cryptographic SHA checksums. - -- Calculate the SHA1 checksum for a file: - -`shasum {{filename}}` - -- Calculate the SHA256 checksum for a file: - -`shasum --algorithm 256 {{filename}}` - -- Calculate the SHA512 checksum for multiple files: - -`shasum --algorithm 512 {{filename1}} {{filename2}}` - -- Check a file with a list of sums against the directory's files: - -`shasum --check {{list_file}}` - -- Calculate the SHA1 checksum from stdin: - -`{{somecommand}} | shasum` diff --git a/pages.cn/osx/shuf.md b/pages.cn/osx/shuf.md deleted file mode 100644 index 8452e60f3..000000000 --- a/pages.cn/osx/shuf.md +++ /dev/null @@ -1,19 +0,0 @@ -# shuf - -> Generate random permutations. - -- Randomize the order of lines in a file and output the result: - -`shuf {{filename}}` - -- Only output the first 5 entries of the result: - -`shuf -n {{5}} {{filename}}` - -- Write output to another file: - -`shuf {{filename}} -o {{output_filename}}` - -- Generate random numbers in range 1-10: - -`shuf -i {{1-10}}` diff --git a/pages.cn/osx/shutdown.md b/pages.cn/osx/shutdown.md deleted file mode 100644 index e8d01466b..000000000 --- a/pages.cn/osx/shutdown.md +++ /dev/null @@ -1,19 +0,0 @@ -# shutdown - -> Shutdown and reboot the system. - -- Power off (halt) immediately: - -`shutdown -h now` - -- Sleep immediately: - -`shutdown -s now` - -- Reboot immediately: - -`shutdown -r now` - -- Reboot in 5 minutes: - -`shutdown -r +{{5}}` diff --git a/pages.cn/osx/sips.md b/pages.cn/osx/sips.md deleted file mode 100644 index 7a883e033..000000000 --- a/pages.cn/osx/sips.md +++ /dev/null @@ -1,28 +0,0 @@ -# sips - -> Apple Scriptable Image Processing System. -> Raster/Query images and ColorSync ICC Profiles. - -- Specify an output directory so that originals do not get modified: - -`sips --out {{path/to/out_dir}}` - -- Resample image at specified size, Image aspect ratio may be altered: - -`sips -z {{1920}} {{300}} {{image.ext}}` - -- Resample image so height and width aren't greater than specified size (notice the capital Z): - -`sips -Z {{1920}} {{300}} {{image.ext}}` - -- Resample all images in a folder to fit a width of 960px (honoring aspect ratio): - -`sips --resampleWidth {{960}} {{path/to/images}}` - -- Convert an image from CMYK to RGB: - -`sips --matchTo '/System/Library/ColorSync/Profiles/Generic RGB Profile.icc' {{path/to/image.ext}} {{path/to/out_dir}}` - -- Remove ColorSync ICC profile from an image: - -`sips -d profile --deleteColorManagementProperties {{path/to/image.ext}}` diff --git a/pages.cn/osx/softwareupdate.md b/pages.cn/osx/softwareupdate.md deleted file mode 100644 index 7cc3f0b01..000000000 --- a/pages.cn/osx/softwareupdate.md +++ /dev/null @@ -1,19 +0,0 @@ -# softwareupdate - -> A tool for updating MacOS App Store apps via the command line. - -- List all available updates: - -`softwareupdate -l` - -- Download and install all updates: - -`softwareupdate -ia` - -- Download and install all recommended updates: - -`softwareupdate -ir` - -- Download and install a specific app: - -`softwareupdate -i {{update_name}}` diff --git a/pages.cn/osx/split.md b/pages.cn/osx/split.md deleted file mode 100644 index 303ce3147..000000000 --- a/pages.cn/osx/split.md +++ /dev/null @@ -1,15 +0,0 @@ -# split - -> Split a file into pieces. - -- Split a file, each split having 10 lines (except the last split): - -`split -l {{10}} {{filename}}` - -- Split a file into 5 files. File is split such that each split has same size (except the last split): - -`split -n {{5}} {{filename}}` - -- Split a file with 512 bytes in each split (except the last split; use 512k for kilobytes and 512m for megabytes): - -`split -b {{512}} {{filename}}` diff --git a/pages.cn/osx/ssh-add.md b/pages.cn/osx/ssh-add.md deleted file mode 100644 index f59e2546a..000000000 --- a/pages.cn/osx/ssh-add.md +++ /dev/null @@ -1,28 +0,0 @@ -# ssh-add - -> Manage loaded ssh keys in the ssh-agent. -> Ensure that ssh-agent is up and running for the keys to be loaded in it. - -- Add the default ssh keys in "~/.ssh" to the ssh-agent: - -`ssh-add` - -- Add a specific key to the ssh-agent: - -`ssh-add {{path/to/private_key}}` - -- List fingerprints of currently loaded keys: - -`ssh-add -l` - -- Delete a key from the ssh-agent: - -`ssh-add -d {{path/to/private_key}}` - -- Delete all currently loaded keys from the ssh-agent: - -`ssh-add -D` - -- Add a key to the ssh-agent and the keychain: - -`ssh-add -K {{path/to/private_key}}` diff --git a/pages.cn/osx/sshuttle.md b/pages.cn/osx/sshuttle.md deleted file mode 100644 index 64ee5a506..000000000 --- a/pages.cn/osx/sshuttle.md +++ /dev/null @@ -1,16 +0,0 @@ -# sshuttle - -> Transparent proxy server that tunnels traffic over an SSH connection. -> Doesn't require admin, or any special setup on the remote SSH server. - -- Forward all IPv4 TCP traffic via a remote SSH server: - -`sshuttle --remote={{username}}@{{sshserver}} {{0.0.0.0/0}}` - -- Forward all IPv4 TCP and DNS traffic: - -`sshuttle --dns --remote={{username}}@{{sshserver}} {{0.0.0.0/0}}` - -- Use the tproxy method to forward all IPv4 and IPv6 traffic: - -`sudo sshuttle --method=tproxy --remote={{username}}@{{sshserver}} {{0.0.0.0/0}} {{::/0}} --exclude={{your_local_ip_address}} --exclude={{ssh_server_ip_address}}` diff --git a/pages.cn/osx/stat.md b/pages.cn/osx/stat.md deleted file mode 100644 index a1a2b0cce..000000000 --- a/pages.cn/osx/stat.md +++ /dev/null @@ -1,23 +0,0 @@ -# stat - -> Display file status. - -- Show file properties such as size, permissions, creation and access dates among others: - -`stat {{file}}` - -- Same as above but verbose (more similar to linux's `stat`): - -`stat -x {{file}}` - -- Show only octal file permissions: - -`stat -f %Mp%Lp {{file}}` - -- Show owner and group of the file: - -`stat -f "%Su %Sg" {{file}}` - -- Show the size of the file in bytes: - -`stat -f "%z %N" {{file}}` diff --git a/pages.cn/osx/stty.md b/pages.cn/osx/stty.md deleted file mode 100644 index 51a85fee3..000000000 --- a/pages.cn/osx/stty.md +++ /dev/null @@ -1,23 +0,0 @@ -# stty - -> Set options for a terminal device interface. - -- Display all settings for the current terminal: - -`stty -a` - -- Set the number of rows: - -`stty rows {{rows}}` - -- Set the number of columns: - -`stty cols {{cols}}` - -- Get the actual transfer speed of a device: - -`stty -f {{path/to/device_file}} speed` - -- Reset all modes to reasonable values for the current terminal: - -`stty sane` diff --git a/pages.cn/osx/sv.md b/pages.cn/osx/sv.md deleted file mode 100644 index 0567e0d0c..000000000 --- a/pages.cn/osx/sv.md +++ /dev/null @@ -1,15 +0,0 @@ -# sv - -> Control a running runsv service. - -- Start a service: - -`sudo sv up {{path/to/service}}` - -- Stop a service: - -`sudo sv down {{path/to/service}}` - -- Get service status: - -`sudo sv status {{path/to/service}}` diff --git a/pages.cn/osx/sw_vers.md b/pages.cn/osx/sw_vers.md deleted file mode 100644 index f06ab6333..000000000 --- a/pages.cn/osx/sw_vers.md +++ /dev/null @@ -1,11 +0,0 @@ -# sw_vers - -> Print macOS Software versioning information. - -- Print macOS Version: - -`sw_vers -productVersion` - -- Print macOS Build: - -`sw_vers -buildVersion` diff --git a/pages.cn/osx/sysctl.md b/pages.cn/osx/sysctl.md deleted file mode 100644 index 2cde48192..000000000 --- a/pages.cn/osx/sysctl.md +++ /dev/null @@ -1,23 +0,0 @@ -# sysctl - -> Access kernel state information. - -- Show all available variables and their values: - -`sysctl -a` - -- Show Apple model identifier: - -`sysctl -n hw.model` - -- Show CPU model: - -`sysctl -n machdep.cpu.brand_string` - -- Show available CPU features (MMX, SSE, SSE2, SSE3, AES, etc): - -`sysctl -n machdep.cpu.feature` - -- Set a changeable kernel state variable: - -`sysctl -w {{section.tunable}}={{value}}` diff --git a/pages.cn/osx/system_profiler.md b/pages.cn/osx/system_profiler.md deleted file mode 100644 index f150a1810..000000000 --- a/pages.cn/osx/system_profiler.md +++ /dev/null @@ -1,15 +0,0 @@ -# system_profiler - -> Report system hardware and software configuration. - -- Display a full system profiler report which can be opened by System Profiler.app: - -`system_profiler -xml > MyReport.spx` - -- Display a hardware overview (Model, CPU, Memory, Serial, etc): - -`system_profiler SPHardwareDataType` - -- Print the system serial number: - -`system_profiler SPHardwareDataType|grep "Serial Number (system)" |awk '{print $4}'` diff --git a/pages.cn/osx/systemsetup.md b/pages.cn/osx/systemsetup.md deleted file mode 100644 index 431beae76..000000000 --- a/pages.cn/osx/systemsetup.md +++ /dev/null @@ -1,23 +0,0 @@ -# systemsetup - -> Configure System Preferences machine settings. - -- Enable remote login (SSH): - -`systemsetup -setremotelogin on` - -- Specify TimeZone, NTP Server and enable network time: - -`systemsetup -settimezone {{US/Pacific}} -setnetworktimeserver {{us.pool.ntp.org}} -setusingnetworktime on` - -- Make the machine never sleep and automatically restart on power failure or kernel panic: - -`systemsetup -setsleep off -setrestartpowerfailure on -setrestartfreeze on` - -- List valid startup disks: - -`systemsetup -liststartupdisks` - -- Specify a new startup disk: - -`systemsetup -setstartupdisk {{path}}` diff --git a/pages.cn/osx/top.md b/pages.cn/osx/top.md deleted file mode 100644 index 72420fcca..000000000 --- a/pages.cn/osx/top.md +++ /dev/null @@ -1,23 +0,0 @@ -# top - -> Display dynamic real-time information about running processes. - -- Start top, all options are available in the interface: - -`top` - -- Start top sorting processes by internal memory size (default order - process ID): - -`top -o mem` - -- Start top sorting processes first by CPU, then by running time: - -`top -o cpu -O time` - -- Start top displaying only processes owned by given user: - -`top -user {{user_name}}` - -- Get help about interactive commands: - -`?` diff --git a/pages.cn/osx/trap.md b/pages.cn/osx/trap.md deleted file mode 100644 index 325b1c123..000000000 --- a/pages.cn/osx/trap.md +++ /dev/null @@ -1,20 +0,0 @@ -# trap - -> Automatically execute commands after receiving signals by processes or the operating system. -> Can be used to perform cleanups for interruptions by the user or other actions. - -- List available signals to set traps for: - -`trap -l` - -- List active traps for the current shell: - -`trap -p` - -- Set a trap to execute commands when one or more signals are detected: - -`trap 'echo "Caught signal {{SIGHUP}}"' {{SIGHUP}}` - -- Remove active traps: - -`trap - {{SIGHUP}} {{SIGINT}}` diff --git a/pages.cn/osx/tree.md b/pages.cn/osx/tree.md deleted file mode 100644 index 73e8b6f28..000000000 --- a/pages.cn/osx/tree.md +++ /dev/null @@ -1,31 +0,0 @@ -# tree - -> Show the contents of the current directory as a tree. - -- Show files and directories up to 'num' levels of depth (where 1 means the current directory): - -`tree -L {{num}}` - -- Show directories only: - -`tree -d` - -- Show hidden files too: - -`tree -a` - -- Print the tree without indentation lines, showing the full path instead (use `-N` to not escape whitespace and special characters): - -`tree -i -f` - -- Print the size of each node next to it, in human-readable format, with folders displaying their cumulative size (as in the `du` command): - -`tree -s -h --du` - -- Find files within the tree hierarchy, using a wildcard (glob) pattern, and pruning out directories that don't contain matching files: - -`tree -P '{{*.txt}}' --prune` - -- Find directories within the tree hierarchy, pruning out directories that aren't ancestors of the wanted one: - -`tree -P {{directory_name}} --matchdirs --prune` diff --git a/pages.cn/osx/uname.md b/pages.cn/osx/uname.md deleted file mode 100644 index 78330a2e1..000000000 --- a/pages.cn/osx/uname.md +++ /dev/null @@ -1,20 +0,0 @@ -# uname - -> Print details about the current machine and the operating system running on it. -> Note: for additional information about the operating system, try the `sw_vers` command. - -- Print hardware-related information: machine and processor: - -`uname -mp` - -- Print software-related information: operating system, release number, and version: - -`uname -srv` - -- Print the nodename (hostname) of the system: - -`uname -n` - -- Print all available system information (hardware, software, nodename): - -`uname -a` diff --git a/pages.cn/osx/units.md b/pages.cn/osx/units.md deleted file mode 100644 index 5d01b9086..000000000 --- a/pages.cn/osx/units.md +++ /dev/null @@ -1,27 +0,0 @@ -# units - -> Provide the conversion between two units of measure. - -- Run in interactive mode: - -`units` - -- Show the conversion between two simple units: - -`units {{quarts}} {{tablespoons}}` - -- Convert between units with quantities: - -`units {{"15 pounds"}} {{kilograms}}` - -- Show the conversion between two compound units: - -`units {{"meters / second"}} {{"inches / hour"}}` - -- Show the conversion between units with different dimensions: - -`units {{"acres"}} {{"ft^2"}}` - -- Show the conversion of byte multipliers: - -`units {{"15 megabytes"}} {{bytes}}` diff --git a/pages.cn/osx/w.md b/pages.cn/osx/w.md deleted file mode 100644 index 1cf83af6e..000000000 --- a/pages.cn/osx/w.md +++ /dev/null @@ -1,16 +0,0 @@ -# w - -> Show who is logged on and what they are doing. -> Print user login, TTY, remote host, login time, idle time, current process. - -- Show logged-in users info: - -`w` - -- Show logged-in users info without a header: - -`w -h` - -- Show info about logged-in users, sorted by their idle time: - -`w -i` diff --git a/pages.cn/osx/wacaw.md b/pages.cn/osx/wacaw.md deleted file mode 100644 index 0bb5ba19d..000000000 --- a/pages.cn/osx/wacaw.md +++ /dev/null @@ -1,23 +0,0 @@ -# wacaw - -> A little command-line tool for macOS that allows you to capture both still pictures and video from an attached camera. - -- Take a picture from webcam: - -`wacaw {{filename}}` - -- Record a video: - -`wacaw --video {{filename}} -D {{duration_in_seconds}}` - -- Take a picture with custom resolution: - -`wacaw -x {{width}} -y {{height}} {{filename}}` - -- Copy image just taken to clipboard: - -`wacaw --to-clipboard` - -- List the devices available: - -`wacaw -L` diff --git a/pages.cn/osx/whereis.md b/pages.cn/osx/whereis.md deleted file mode 100644 index 55f3998a4..000000000 --- a/pages.cn/osx/whereis.md +++ /dev/null @@ -1,7 +0,0 @@ -# whereis - -> Locate the binary, source, and manual page files for a command. - -- Locate binary, source and man pages for ssh: - -`whereis {{ssh}}` diff --git a/pages.cn/osx/xattr.md b/pages.cn/osx/xattr.md deleted file mode 100644 index 290e58b2c..000000000 --- a/pages.cn/osx/xattr.md +++ /dev/null @@ -1,23 +0,0 @@ -# xattr - -> Utility to work with extended filesystem attributes. - -- List key:value extended attributes for a given file: - -`xattr -l {{file}}` - -- Write an attribute for a given file: - -`xattr -w {{attribute_key}} {{attribute_value}} {{file}}` - -- Delete an attribute from a given file: - -`xattr -d {{com.apple.quarantine}} {{file}}` - -- Delete all extended attributes from a given file: - -`xattr -c {{file}}` - -- Recursively delete an attribute in a given directory: - -`xattr -rd {{attribute_key}} {{directory}}` diff --git a/pages.cn/osx/xcodebuild.md b/pages.cn/osx/xcodebuild.md deleted file mode 100644 index 7cc2926ca..000000000 --- a/pages.cn/osx/xcodebuild.md +++ /dev/null @@ -1,15 +0,0 @@ -# xcodebuild - -> Build Xcode projects. - -- Build workspace: - -`xcodebuild -workspace {{workspace_name.workspace}} -scheme {{scheme_name}} -configuration {{configuration_name}} clean build SYMROOT={{SYMROOT_path}}` - -- Build project: - -`xcodebuild -target {{target_name}} -configuration {{configuration_name}} clean build SYMROOT={{SYMROOT_path}}` - -- Show SDKs: - -`xcodebuild -showsdks` diff --git a/pages.cn/osx/xctool.md b/pages.cn/osx/xctool.md deleted file mode 100644 index c0b441774..000000000 --- a/pages.cn/osx/xctool.md +++ /dev/null @@ -1,15 +0,0 @@ -# xctool - -> Tool for building Xcode projects. - -- Build a single project without any workspace: - -`xctool -project {{YourProject.xcodeproj}} -scheme {{YourScheme}} build` - -- Build a project that is part of a workspace: - -`xctool -workspace {{YourWorkspace.xcworkspace}} -scheme {{YourScheme}} build` - -- Clean, build and execute all the tests: - -`xctool -workspace {{YourWorkspace.xcworkspace}} -scheme {{YourScheme}} clean build test` diff --git a/pages.cn/osx/xed.md b/pages.cn/osx/xed.md deleted file mode 100644 index 754739233..000000000 --- a/pages.cn/osx/xed.md +++ /dev/null @@ -1,15 +0,0 @@ -# xed - -> Opens files for editing in XCode. - -- Open file in XCode: - -`xed {{file1}}` - -- Open file(s) in XCode, create if it doesn't exist: - -`xed -c {{filename1}}` - -- Open a file in XCode and jump to line number 75: - -`xed -l 75 {{filename}}` diff --git a/pages.cn/osx/xsltproc.md b/pages.cn/osx/xsltproc.md deleted file mode 100644 index 071ab8eb6..000000000 --- a/pages.cn/osx/xsltproc.md +++ /dev/null @@ -1,11 +0,0 @@ -# xsltproc - -> Transform XML with XSLT to produce output (usually HTML or XML). - -- Transform an XML file with a specific XSLT stylesheet: - -`xsltproc --output {{output.html}} {{stylesheet.xslt}} {{xmlfile.xml}}` - -- Pass a value to a parameter in the stylesheet: - -`xsltproc --output {{output.html}} --stringparam {{name}} {{value}} {{stylesheet.xslt}} {{xmlfile.xml}}` diff --git a/pages.cn/osx/yank.md b/pages.cn/osx/yank.md deleted file mode 100644 index d44aed7ad..000000000 --- a/pages.cn/osx/yank.md +++ /dev/null @@ -1,19 +0,0 @@ -# yank - -> Read input from stdin and display a selection interface that allows a field to be selected and copied to the clipboard. - -- Yank using the default delimiters (\f, \n, \r, \s, \t): - -`{{sudo dmesg}} | yank` - -- Yank an entire line: - -`{{sudo dmesg}} | yank -l` - -- Yank using a specific delimiter: - -`{{echo hello=world}} | yank -d {{=}}` - -- Only yank fields matching a specific pattern: - -`{{ps ux}} | yank -g {{"[0-9]+"}}` diff --git a/pages.cn/sunos/devfsadm.md b/pages.cn/sunos/devfsadm.md deleted file mode 100644 index 27f450b42..000000000 --- a/pages.cn/sunos/devfsadm.md +++ /dev/null @@ -1,15 +0,0 @@ -# devfsadm - -> Administration command for `/dev`. Maintains the `/dev` namespace. - -- Scan for new disks: - -`devfsadm -c disk` - -- Cleanup any dangling /dev links and scan for new device: - -`devfsadm -C -v` - -- Dry-run - output what would be changed but make no modifications: - -`devfsadm -C -v -n` diff --git a/pages.cn/sunos/dmesg.md b/pages.cn/sunos/dmesg.md deleted file mode 100644 index eb3b54352..000000000 --- a/pages.cn/sunos/dmesg.md +++ /dev/null @@ -1,15 +0,0 @@ -# dmesg - -> Write the kernel messages to standard output. - -- Show kernel messages: - -`dmesg` - -- Show how much physical memory is available on this system: - -`dmesg | grep -i memory` - -- Show kernel messages 1 page at a time: - -`dmesg | less` diff --git a/pages.cn/sunos/prctl.md b/pages.cn/sunos/prctl.md deleted file mode 100644 index 286bdbe87..000000000 --- a/pages.cn/sunos/prctl.md +++ /dev/null @@ -1,16 +0,0 @@ -# prctl - -> Get or set the resource controls of running processes,. -> Tasks, and projects. - -- Examine process limits and permissions: - -`prctl {{PID}}` - -- Examine process limits and permissions in machine parseable format: - -`prctl -P {{PID}}` - -- Get specific limit for a running process: - -`prctl -n process.max-file-descriptor {{PID}}` diff --git a/pages.cn/sunos/prstat.md b/pages.cn/sunos/prstat.md deleted file mode 100644 index 6f3ebbc07..000000000 --- a/pages.cn/sunos/prstat.md +++ /dev/null @@ -1,23 +0,0 @@ -# prstat - -> Report active process statistics. - -- Examine all processes and reports statistics sorted by CPU usage: - -`prstat` - -- Examine all processes and reports statistics sorted by memory usage: - -`prstat -s rss` - -- Report total usage summary for each user: - -`prstat -t` - -- Report microstate process accounting information: - -`prstat -m` - -- Print out a list of top 5 cpu using processes every second: - -`prstat -c -n 5 -s cpu 1` diff --git a/pages.cn/sunos/runit.md b/pages.cn/sunos/runit.md deleted file mode 100644 index 841092117..000000000 --- a/pages.cn/sunos/runit.md +++ /dev/null @@ -1,11 +0,0 @@ -# runit - -> 3-stage init system. - -- Start runit's 3-stage init scheme: - -`runit` - -- Shut down runit: - -`kill --CONT {{runit_pid}}` diff --git a/pages.cn/sunos/runsv.md b/pages.cn/sunos/runsv.md deleted file mode 100644 index 8b131ae6a..000000000 --- a/pages.cn/sunos/runsv.md +++ /dev/null @@ -1,11 +0,0 @@ -# runsv - -> Start and manage a runit service. - -- Start a runit service as the current user: - -`runsv {{path/to/service}}` - -- Start a runit service as root: - -`sudo runsv {{path/to/service}}` diff --git a/pages.cn/sunos/runsvchdir.md b/pages.cn/sunos/runsvchdir.md deleted file mode 100644 index 91ee11444..000000000 --- a/pages.cn/sunos/runsvchdir.md +++ /dev/null @@ -1,7 +0,0 @@ -# runsvchdir - -> Change the directory `runsvdir` uses by default. - -- Switch `runsvdir` directories: - -`sudo runsvchdir {{/path/to/directory}}` diff --git a/pages.cn/sunos/runsvdir.md b/pages.cn/sunos/runsvdir.md deleted file mode 100644 index bc1ad17b1..000000000 --- a/pages.cn/sunos/runsvdir.md +++ /dev/null @@ -1,15 +0,0 @@ -# runsvdir - -> Run an entire directory of services. - -- Start and manage all services in a directory as the current user: - -`runsvdir {{path/to/services}}` - -- Start and manage all services in a directory as root: - -`sudo runsvdir {{path/to/services}}` - -- Start services in separate sessions: - -`runsvdir -P {{path/to/services}}` diff --git a/pages.cn/sunos/stty.md b/pages.cn/sunos/stty.md deleted file mode 100644 index 51a85fee3..000000000 --- a/pages.cn/sunos/stty.md +++ /dev/null @@ -1,23 +0,0 @@ -# stty - -> Set options for a terminal device interface. - -- Display all settings for the current terminal: - -`stty -a` - -- Set the number of rows: - -`stty rows {{rows}}` - -- Set the number of columns: - -`stty cols {{cols}}` - -- Get the actual transfer speed of a device: - -`stty -f {{path/to/device_file}} speed` - -- Reset all modes to reasonable values for the current terminal: - -`stty sane` diff --git a/pages.cn/sunos/sv.md b/pages.cn/sunos/sv.md deleted file mode 100644 index 0567e0d0c..000000000 --- a/pages.cn/sunos/sv.md +++ /dev/null @@ -1,15 +0,0 @@ -# sv - -> Control a running runsv service. - -- Start a service: - -`sudo sv up {{path/to/service}}` - -- Stop a service: - -`sudo sv down {{path/to/service}}` - -- Get service status: - -`sudo sv status {{path/to/service}}` diff --git a/pages.cn/sunos/svcadm.md b/pages.cn/sunos/svcadm.md deleted file mode 100644 index b0045e1fa..000000000 --- a/pages.cn/sunos/svcadm.md +++ /dev/null @@ -1,23 +0,0 @@ -# svcadm - -> Manipulate service instances. - -- Enable a service in the service database: - -`svcadm enable {{service_name}}` - -- Disable service: - -`svcadm disable {{service_name}}` - -- Restart a running service: - -`svcadm restart {{service_name}}` - -- Command service to re-read configuration files: - -`svcadm refresh {{service_name}}` - -- Clear a service from maintenance state and command it to start: - -`svcadm clear {{service_name}}` diff --git a/pages.cn/sunos/svccfg.md b/pages.cn/sunos/svccfg.md deleted file mode 100644 index 79605dde3..000000000 --- a/pages.cn/sunos/svccfg.md +++ /dev/null @@ -1,15 +0,0 @@ -# svccfg - -> Import, export, and modify service configurations. - -- Validate configuration file: - -`svccfg validate {{smf.xml}}` - -- Export service configurations to file: - -`svccfg export {{servicename}} > {{smf.xml}}` - -- Import/update service configurations from file: - -`svccfg import {{smf.xml}}` diff --git a/pages.cn/sunos/svcs.md b/pages.cn/sunos/svcs.md deleted file mode 100644 index e78cd9568..000000000 --- a/pages.cn/sunos/svcs.md +++ /dev/null @@ -1,23 +0,0 @@ -# svcs - -> List information about running services. - -- List all running services: - -`svcs` - -- List services that are not running: - -`svcs -vx` - -- List information about a service: - -`svcs apache` - -- Show location of service log file: - -`svcs -L apache` - -- Display end of a service log file: - -`tail $(svcs -L apache)` diff --git a/pages.cn/windows/assoc.md b/pages.cn/windows/assoc.md deleted file mode 100644 index 36af43b71..000000000 --- a/pages.cn/windows/assoc.md +++ /dev/null @@ -1,15 +0,0 @@ -# assoc - -> Display or modify file extension associations. - -- Display all associated filetypes: - -`assoc` - -- Display the associated filetype for a specific extension: - -`assoc {{.txt}}` - -- Modify the associated filetype for a specific extension: - -`assoc {{.txt}}={{txtfile}}` diff --git a/pages.cn/windows/attrib.md b/pages.cn/windows/attrib.md deleted file mode 100644 index 3942fef42..000000000 --- a/pages.cn/windows/attrib.md +++ /dev/null @@ -1,27 +0,0 @@ -# attrib - -> Displays or changes file and directory attributes. - -- Display the attributes of the files in the current directory: - -`attrib` - -- Display the attributes of the files in the current directory and sub-directories: - -`attrib /S` - -- Display the attributes of the files and folders in the current directory and sub-directories: - -`attrib /S /D` - -- Add the read-only attribute to a file: - -`attrib +R {{document.txt}}` - -- Remove the system and hidden attributes of a file: - -`attrib -S -H {{document.txt}}` - -- Add the hidden attribute to a folder: - -`attrib +H {{path\to\folder}}` diff --git a/pages.cn/windows/choco-feature.md b/pages.cn/windows/choco-feature.md deleted file mode 100644 index ebece7e12..000000000 --- a/pages.cn/windows/choco-feature.md +++ /dev/null @@ -1,15 +0,0 @@ -# choco feature - -> Interact with features with Chocolatey. - -- Display a list of available features: - -`choco feature list` - -- Enable a feature: - -`choco feature enable --name {{name}}` - -- Disable a feature: - -`choco feature disable --name {{name}}` diff --git a/pages.cn/windows/choco-info.md b/pages.cn/windows/choco-info.md deleted file mode 100644 index 94170ec0c..000000000 --- a/pages.cn/windows/choco-info.md +++ /dev/null @@ -1,19 +0,0 @@ -# choco info - -> Display detailed information about a package with Chocolatey. - -- Display information on a specific package: - -`choco info {{package}}` - -- Display information for a local package only: - -`choco info {{package}} --local-only` - -- Specify a custom source to receive packages information from: - -`choco info {{package}} --source {{source_url|alias}}` - -- Provide a username and password for authentication: - -`choco info {{package}} --user {{username}} --password {{password}}` diff --git a/pages.cn/windows/choco-install.md b/pages.cn/windows/choco-install.md deleted file mode 100644 index c2ec6ff6e..000000000 --- a/pages.cn/windows/choco-install.md +++ /dev/null @@ -1,35 +0,0 @@ -# choco install - -> Install one or more packages with Chocolatey. - -- Install one or more space-separated packages: - -`choco install {{package(s)}}` - -- Install packages from a custom configuration file: - -`choco install {{path/to/packages.config}}` - -- Install a specific "nuspec" or "nupkg" file: - -`choco install {{path/to/file}}` - -- Install a specific version of a package: - -`choco install {{package}} --version {{version}}` - -- Allow installing multiple versions of a package: - -`choco install {{package}} --allow-multiple` - -- Confirm all prompts automatically: - -`choco install {{package}} --yes` - -- Specify a custom source to receive packages from: - -`choco install {{package}} --source {{source_url|alias}}` - -- Provide a username and password for authentication: - -`choco install {{package}} --user {{username}} --password {{password}}` diff --git a/pages.cn/windows/choco-list.md b/pages.cn/windows/choco-list.md deleted file mode 100644 index 6765b7e80..000000000 --- a/pages.cn/windows/choco-list.md +++ /dev/null @@ -1,27 +0,0 @@ -# choco list - -> Display a list of packages with Chocolatey. - -- Display all available packages: - -`choco list` - -- Display all locally installed packages: - -`choco list --local-only` - -- Display a list including local programs: - -`choco list --include-programs` - -- Display only approved packages: - -`choco list --approved-only` - -- Specify a custom source to display packages from: - -`choco list --source {{source_url|alias}}` - -- Provide a username and password for authentication: - -`choco list --user {{username}} --password {{password}}` diff --git a/pages.cn/windows/choco-new.md b/pages.cn/windows/choco-new.md deleted file mode 100644 index ba59eac7f..000000000 --- a/pages.cn/windows/choco-new.md +++ /dev/null @@ -1,23 +0,0 @@ -# choco new - -> Generate new package specification files with Chocolatey. - -- Create a new package skeleton: - -`choco new {{package_name}}` - -- Create a new package with a specific version: - -`choco new {{package_name}} --version {{version}}` - -- Create a new package with a specific maintainer name: - -`choco new {{package_name}} --maintainer {{maintainer_name}}` - -- Create a new package in a custom output directory: - -`choco new {{package_name}} --output-directory {{path/to/directory}}` - -- Create a new package with specific 32-bit and 64-bit installer urls: - -`choco new {{package_name}} url="{{url}}" url64="{{url}}"` diff --git a/pages.cn/windows/choco-outdated.md b/pages.cn/windows/choco-outdated.md deleted file mode 100644 index aca0de47d..000000000 --- a/pages.cn/windows/choco-outdated.md +++ /dev/null @@ -1,19 +0,0 @@ -# choco outdated - -> Check for outdated packages with Chocolatey. - -- Display a list of outdated packages in table format: - -`choco outdated` - -- Ignore pinned packages in the output: - -`choco outdated --ignore-pinned` - -- Specify a custom source to check packages from: - -`choco outdated --source {{source_url|alias}}` - -- Provide a username and password for authentication: - -`choco outdated --user {{username}} --password {{password}}` diff --git a/pages.cn/windows/choco-pack.md b/pages.cn/windows/choco-pack.md deleted file mode 100644 index e8dccdca4..000000000 --- a/pages.cn/windows/choco-pack.md +++ /dev/null @@ -1,15 +0,0 @@ -# choco pack - -> Package a NuGet specification into a nupkg file. - -- Package a NuGet specification to a nupkg file: - -`choco pack {{path/to/specification}}` - -- Package a NuGet specification specifying the version of the resulting file: - -`choco pack {{path/to/specification}} --version {{version}}` - -- Package a NuGet specification to a specific directory: - -`choco pack {{path/to/specification}} --output-directory {{path/to/output_directory}}` diff --git a/pages.cn/windows/choco-pin.md b/pages.cn/windows/choco-pin.md deleted file mode 100644 index 59238b899..000000000 --- a/pages.cn/windows/choco-pin.md +++ /dev/null @@ -1,20 +0,0 @@ -# choco pin - -> Pin a package at a specific version with Chocolatey. -> Pinned packages are skipped automatically when upgrading. - -- Display a list of pinned packages and their versions: - -`choco pin list` - -- Pin a package at its current version: - -`choco pin add --name {{package}}` - -- Pin a package at a specific version: - -`choco pin add --name {{package}} --version {{version}}` - -- Remove a pin for a specific package: - -`choco pin remove --name {{package}}` diff --git a/pages.cn/windows/choco-search.md b/pages.cn/windows/choco-search.md deleted file mode 100644 index bf7e310d2..000000000 --- a/pages.cn/windows/choco-search.md +++ /dev/null @@ -1,27 +0,0 @@ -# choco search - -> Search for a local or remote package with Chocolatey. - -- Search for a package: - -`choco search {{query}}` - -- Search for a package locally: - -`choco search {{query}} --local-only` - -- Only include exact matches in the results: - -`choco search {{query}} --exact` - -- Confirm all prompts automatically: - -`choco search {{query}} --yes` - -- Specify a custom source to search for packages in: - -`choco search {{query}} --source {{source_url|alias}}` - -- Provide a username and password for authentication: - -`choco search {{query}} --user {{username}} --password {{password}}` diff --git a/pages.cn/windows/choco-source.md b/pages.cn/windows/choco-source.md deleted file mode 100644 index 04eb517eb..000000000 --- a/pages.cn/windows/choco-source.md +++ /dev/null @@ -1,31 +0,0 @@ -# choco source - -> Manage sources for packages with Chocolatey. - -- List currently available sources: - -`choco source list` - -- Add a new package source: - -`choco source add --name {{name}} --source {{url}}` - -- Add a new package source with credentials: - -`choco source add --name {{name}} --source {{url}} --user {{username}} --password {{password}}` - -- Add a new package source with a client certificate: - -`choco source add --name {{name}} --source {{url}} --cert {{path/to/certificate}}` - -- Enable a package source: - -`choco source enable --name {{name}}` - -- Disable a package source: - -`choco source disable --name {{name}}` - -- Remove a package source: - -`choco source remove --name {{name}}` diff --git a/pages.cn/windows/choco-uninstall.md b/pages.cn/windows/choco-uninstall.md deleted file mode 100644 index 5eec1576d..000000000 --- a/pages.cn/windows/choco-uninstall.md +++ /dev/null @@ -1,23 +0,0 @@ -# choco uninstall - -> Uninstall one or more packages with Chocolatey. - -- Uninstall one or more space-separated packages: - -`choco uninstall {{package(s)}}` - -- Uninstall a specific version of a package: - -`choco uninstall {{package}} --version {{version}}` - -- Confirm all prompts automatically: - -`choco uninstall {{package}} --yes` - -- Remove all dependencies when uninstalling: - -`choco uninstall {{package}} --remove-dependencies` - -- Uninstall all packages: - -`choco uninstall all` diff --git a/pages.cn/windows/choco-upgrade.md b/pages.cn/windows/choco-upgrade.md deleted file mode 100644 index c4eb74ca7..000000000 --- a/pages.cn/windows/choco-upgrade.md +++ /dev/null @@ -1,31 +0,0 @@ -# choco upgrade - -> Upgrade one or more packages with Chocolatey. - -- Upgrade one or more space-separated packages: - -`choco upgrade {{package(s)}}` - -- Upgrade to a specific version of a package: - -`choco upgrade {{package}} --version {{version}}` - -- Upgrade all packages: - -`choco upgrade all` - -- Upgrade all except specified comma-separated packages: - -`choco upgrade all --except "{{package(s)}}"` - -- Confirm all prompts automatically: - -`choco upgrade {{package}} --yes` - -- Specify a custom source to receive packages from: - -`choco upgrade {{package}} --source {{source_url|alias}}` - -- Provide a username and password for authentication: - -`choco upgrade {{package}} --user {{username}} --password {{password}}` diff --git a/pages.cn/windows/choco.md b/pages.cn/windows/choco.md deleted file mode 100644 index f7294122c..000000000 --- a/pages.cn/windows/choco.md +++ /dev/null @@ -1,20 +0,0 @@ -# choco - -> A command line interface for the Chocolatey package manager. -> See `choco install`, `choco upgrade` and other pages for additional information. - -- Execute Chocolatey command: - -`choco {{command}}` - -- Call general help: - -`choco -?` - -- Call help on a specific command: - -`choco {{command}} -?` - -- Check the Chocolatey version: - -`choco --version` diff --git a/pages.cn/windows/clip.md b/pages.cn/windows/clip.md deleted file mode 100644 index 6229caad3..000000000 --- a/pages.cn/windows/clip.md +++ /dev/null @@ -1,11 +0,0 @@ -# clip - -> Copy input content to the Windows clipboard. - -- Pipe command line output to the Windows clipboard: - -`{{dir}} | clip` - -- Copy the contents of a file to the Windows clipboard: - -`clip < {{path/to/file}}` diff --git a/pages.cn/windows/cls.md b/pages.cn/windows/cls.md deleted file mode 100644 index 329ddd1ec..000000000 --- a/pages.cn/windows/cls.md +++ /dev/null @@ -1,7 +0,0 @@ -# cls - -> Clears the screen. - -- Clear the screen: - -`cls` diff --git a/pages.cn/windows/cmd.md b/pages.cn/windows/cmd.md deleted file mode 100644 index 369c5f8e4..000000000 --- a/pages.cn/windows/cmd.md +++ /dev/null @@ -1,35 +0,0 @@ -# cmd - -> The Windows command interpreter. - -- Start a new instance of the command interpreter: - -`cmd` - -- Run the specified command and then exit: - -`cmd /c "{{command}}"` - -- Run the specified command and then enter an interactive shell: - -`cmd /k "{{command}}"` - -- Disable the usage of `echo` in command output: - -`cmd /q` - -- Enable or disable command extensions: - -`cmd /e:{{on|off}}` - -- Enable or disable file or directory autocompletion: - -`cmd /f:{{on|off}}` - -- Enable or disable environment variable expansion: - -`cmd /v:{{on|off}}` - -- Force output to use unicode encoding: - -`cmd /u` diff --git a/pages.cn/windows/color.md b/pages.cn/windows/color.md deleted file mode 100644 index ace949b1e..000000000 --- a/pages.cn/windows/color.md +++ /dev/null @@ -1,15 +0,0 @@ -# color - -> Set the console foreground and background colors. - -- Set the console colors to the default values: - -`color` - -- List available color values and detailed information: - -`color /?` - -- Set the console foreground and background to a specific color: - -`color {{foreground_code}}{{background_code}}` diff --git a/pages.cn/windows/comp.md b/pages.cn/windows/comp.md deleted file mode 100644 index 394028ad5..000000000 --- a/pages.cn/windows/comp.md +++ /dev/null @@ -1,36 +0,0 @@ -# comp - -> Compare the contents of two files or sets of files. -> Use wildcards (*) to compare sets of files. - -- Compare files interactively: - -`comp` - -- Compare two specified files: - -`comp {{path/to/file_1}} {{path/to/file_2}}` - -- Compare two sets of files: - -`comp {{path/to/directory_1/*}} {{path/to/directory_2/*}}` - -- Display differences in decimal format: - -`comp /d {{path/to/file_1}} {{path/to/file_2}}` - -- Display differences in ASCII format: - -`comp /a {{path/to/file_1}} {{path/to/file_2}}` - -- Display line numbers for differences: - -`comp /l {{path/to/file_1}} {{path/to/file_2}}` - -- Compare files case-insensitively: - -`comp /c {{path/to/file_1}} {{path/to/file_2}}` - -- Compare only the first 5 lines of each file: - -`comp /n={{5}} {{path/to/file_1}} {{path/to/file_2}}` diff --git a/pages.cn/windows/del.md b/pages.cn/windows/del.md deleted file mode 100644 index 17aea63f9..000000000 --- a/pages.cn/windows/del.md +++ /dev/null @@ -1,31 +0,0 @@ -# del - -> Delete one or more files. - -- Delete one or more space-separated files or patterns: - -`del {{file_pattern}}` - -- Prompt for confirmation before deleting each file: - -`del {{file_pattern}} /p` - -- Force the deletion of read-only files: - -`del {{file_pattern}} /f` - -- Recursively delete file(s) from all subdirectories: - -`del {{file_pattern}} /s` - -- Do not prompt when deleting files based on a global wildcard: - -`del {{file_pattern}} /q` - -- Display the help and list available attributes: - -`del /?` - -- Delete files based on specified attributes: - -`del {{file_pattern}} /a {{attribute}}` diff --git a/pages.cn/windows/dir.md b/pages.cn/windows/dir.md deleted file mode 100644 index 28ed2f153..000000000 --- a/pages.cn/windows/dir.md +++ /dev/null @@ -1,19 +0,0 @@ -# dir - -> List directory contents. - -- Show the contents of the current directory: - -`dir` - -- Show the contents of a given directory: - -`dir {{path/to/directory}}` - -- Show the contents of the current directory, including hidden ones: - -`dir /A` - -- Show the contents of a given directory, including hidden ones: - -`dir {{path/to/directory}} /A` diff --git a/pages.cn/windows/doskey.md b/pages.cn/windows/doskey.md deleted file mode 100644 index 0176b53a2..000000000 --- a/pages.cn/windows/doskey.md +++ /dev/null @@ -1,31 +0,0 @@ -# doskey - -> Manage macros, windows commands and command lines. - -- List available macros: - -`doskey /macros` - -- Create a new macro: - -`doskey {{name}} = "{{command}}"` - -- Create a new macro for a specific executable: - -`doskey /exename={{executable}} {{name}} = "{{command}}"` - -- Remove a macro: - -`doskey {{name}} =` - -- Display all commands that are stored in memory: - -`doskey /history` - -- Save macros to a file for portability: - -`doskey /macros > {{macinit}}` - -- Load macros from a file: - -`doskey /macrofile = {{macinit}}` diff --git a/pages.cn/windows/driverquery.md b/pages.cn/windows/driverquery.md deleted file mode 100644 index 52d0377c2..000000000 --- a/pages.cn/windows/driverquery.md +++ /dev/null @@ -1,31 +0,0 @@ -# driverquery - -> Display information about installed device drivers. - -- Display a list of all installed device drivers: - -`driverquery` - -- Display a list of drivers in the specified format: - -`driverquery /fo {{table|list|csv}}` - -- Display a list of drivers with a column to indicate if they are signed: - -`driverquery /si` - -- Exclude the header in the output list: - -`driverquery /nh` - -- Display a list of drivers for a remote machine: - -`driverquery /s {{hostname}} /u {{username}} /p {{password}}` - -- Display a list of drivers with verbose information: - -`driverquery /v` - -- Display detailed usage information: - -`driverquery /?` diff --git a/pages.cn/windows/eventcreate.md b/pages.cn/windows/eventcreate.md deleted file mode 100644 index 482133544..000000000 --- a/pages.cn/windows/eventcreate.md +++ /dev/null @@ -1,20 +0,0 @@ -# eventcreate - -> Create custom entries in the event log. -> Event IDs can be any number between 1 and 1000. - -- Create a new event with a given id (1-1000) in the log: - -`eventcreate /t {{success|error|warning|information}} /id {{id}} /d "{{message}}"` - -- Create an event in a specific event log: - -`eventcreate /l {{log_name}} /t {{type}} /id {{id}} /d "{{message}}"` - -- Create an event with a specific source: - -`eventcreate /so {{source_name}} /t {{type}} /id {{id}} /d "{{message}}"` - -- Create an event in a remote machine's event log: - -`eventcreate /s {{hostname}} /u {{username}} /p {{password}} /t {{type}} /id {{id}} /d "{{message"}}` diff --git a/pages.cn/windows/exit.md b/pages.cn/windows/exit.md deleted file mode 100644 index f456015e3..000000000 --- a/pages.cn/windows/exit.md +++ /dev/null @@ -1,15 +0,0 @@ -# exit - -> Quit the current CMD instance or the current batch file. - -- Quit the current CMD instance: - -`exit` - -- Quit the current batch script: - -`exit /b` - -- Quit using a specific exit code: - -`exit {{exit_code}}` diff --git a/pages.cn/windows/expand.md b/pages.cn/windows/expand.md deleted file mode 100644 index 506a175f2..000000000 --- a/pages.cn/windows/expand.md +++ /dev/null @@ -1,23 +0,0 @@ -# expand - -> Uncompress one or more Windows Cabinet files. - -- Uncompress a single-file Cabinet file to the specified directory: - -`expand {{path/to/file.cab}} {{path/to/directory}}` - -- Display the list of files in a source Cabinet file: - -`expand {{path/to/file.cab}} {{path/to/directory}} -d` - -- Uncompress all files from the Cabinet file: - -`expand {{path/to/file.cab}} {{path/to/directory}} -f:*` - -- Uncompress a specific file from a Cabinet file: - -`expand {{path/to/file.cab}} {{path/to/directory}} -f:{{file}}` - -- Ignore the directory structure when uncompressing, and add them to a single directory: - -`expand {{path/to/file.cab}} {{path/to/directory}} -i` diff --git a/pages.cn/windows/find.md b/pages.cn/windows/find.md deleted file mode 100644 index 5279c621b..000000000 --- a/pages.cn/windows/find.md +++ /dev/null @@ -1,19 +0,0 @@ -# find - -> Find a specified string in one or more files. - -- Find lines that contain a specified string: - -`find {{string}} {{path/to/file_or_directory}}` - -- Display lines that do not contain the specified string: - -`find {{string}} {{path/to/file_or_directory}} /v` - -- Display the count of lines that contain the specified string: - -`find {{string}} {{path/to/file_or_directory}} /c` - -- Display line numbers with the list of lines: - -`find {{string}} {{path/to/file_or_directory}} /n` diff --git a/pages.cn/windows/findstr.md b/pages.cn/windows/findstr.md deleted file mode 100644 index 76d08e131..000000000 --- a/pages.cn/windows/findstr.md +++ /dev/null @@ -1,35 +0,0 @@ -# findstr - -> Find specified text within one or more files. - -- Find space-separated string(s) in all files: - -`findstr "{{query}}" *` - -- Find space-separated string(s) in all files recur[s]ively: - -`findstr /s "{{query}}" *` - -- Find strings using a case-insensitive search: - -`findstr /i "{{query}}" *"` - -- Find strings in all files using regular expressions: - -`findstr /r "{{expression}}" *` - -- Find a literal string (containing spaces) in all text files: - -`findstr /c:"{{query}}" *.txt` - -- Find only lines that match the query e[x]actly: - -`findstr /x "{{query}}" *` - -- Display the line number before each matching line: - -`findstr /n "{{query}}" *` - -- Display only the filenames that contain a match: - -`findstr /m "{{query}}" *` diff --git a/pages.cn/windows/finger.md b/pages.cn/windows/finger.md deleted file mode 100644 index ceb6914b3..000000000 --- a/pages.cn/windows/finger.md +++ /dev/null @@ -1,20 +0,0 @@ -# finger - -> Return information about one or more users on a specified system. -> The remote system must be running the Finger service. - -- Display information about a specific user: - -`finger {{user}}@{{host}}` - -- Display information about all users on the specified host: - -`finger @{{host}}` - -- Display information in a longer format: - -`finger {{user}}@{{host}} -l` - -- Display help information: - -`finger /?` diff --git a/pages.cn/windows/fondue.md b/pages.cn/windows/fondue.md deleted file mode 100644 index aa0102efb..000000000 --- a/pages.cn/windows/fondue.md +++ /dev/null @@ -1,15 +0,0 @@ -# fondue - -> A command line installer for optional Windows features. - -- Enable a specific Windows feature: - -`fondue /enable-feature:{{feature}}` - -- Hide all output messages to the user: - -`fondue /enable-feature:{{feature}} /hide-ux:all` - -- Specify a caller process name for error reporting: - -`fondue /enable-feature:{{feature}} /caller-name:{{name}}` diff --git a/pages.cn/windows/forfiles.md b/pages.cn/windows/forfiles.md deleted file mode 100644 index 4eecd5b83..000000000 --- a/pages.cn/windows/forfiles.md +++ /dev/null @@ -1,27 +0,0 @@ -# forfiles - -> Select one or more files to execute a specified command on. - -- Search for files in the current directory: - -`forfiles` - -- Search for files in a specific directory: - -`forfiles /p {{path/to/directory}}` - -- Run the specified command for each file: - -`forfiles /c "{{command}}"` - -- Search for files using a specific glob mask: - -`forfiles /m {{glob_pattern}}` - -- Search for files recursively: - -`forfiles /s` - -- Search for files older than 5 days: - -`forfiles /d {{+5}}` diff --git a/pages.cn/windows/ftp.md b/pages.cn/windows/ftp.md deleted file mode 100644 index 4bfae50c1..000000000 --- a/pages.cn/windows/ftp.md +++ /dev/null @@ -1,35 +0,0 @@ -# ftp - -> Interactively transfer files between a local and remote FTP server. - -- Connect to a remote FTP server interactively: - -`ftp {{host}}` - -- Log in as an anonymous user: - -`ftp -A {{host}}` - -- Disable automatic login upon initial connection: - -`ftp -n {{host}}` - -- Run a file containing a list of FTP commands: - -`ftp -s:{{path/to/file}} {{host}}` - -- Download multiple files (glob expression): - -`mget {{*.png}}` - -- Upload multiple files (glob expression): - -`mput {{*.zip}}` - -- Delete multiple files on the remote server: - -`mdelete {{*.txt}}` - -- Display detailed help: - -`ftp --help` diff --git a/pages.cn/windows/getmac.md b/pages.cn/windows/getmac.md deleted file mode 100644 index 36df01f73..000000000 --- a/pages.cn/windows/getmac.md +++ /dev/null @@ -1,27 +0,0 @@ -# getmac - -> Display the MAC addresses of a system. - -- Display the MAC addresses for the current system: - -`getmac` - -- Display the details in a specific format: - -`getmac /fo {{table|list|csv}}` - -- Exclude the header in the output list: - -`getmac /nh` - -- Display the MAC addresses for a remote machine: - -`getmac /s {{hostname}} /u {{username}} /p {{password}}` - -- Display the MAC addresses with verbose information: - -`getmac /v` - -- Display detailed usage information: - -`getmac /?` diff --git a/pages.cn/windows/ipconfig.md b/pages.cn/windows/ipconfig.md deleted file mode 100644 index 9fb16b5f7..000000000 --- a/pages.cn/windows/ipconfig.md +++ /dev/null @@ -1,23 +0,0 @@ -# ipconfig - -> Display and manage the network configuration of Windows. - -- Show a list of network adapters: - -`ipconfig` - -- Show a detailed list of network adapters: - -`ipconfig /all` - -- Renew the IP addresses for a network adapter: - -`ipconfig /renew {{adapter}}` - -- Free up the IP addresses for a network adapter: - -`ipconfig /release {{adapter}}` - -- Remove all data from the DNS cache: - -`ipconfig /flushdns` diff --git a/pages.cn/windows/iscc.md b/pages.cn/windows/iscc.md deleted file mode 100644 index 77ed56a10..000000000 --- a/pages.cn/windows/iscc.md +++ /dev/null @@ -1,16 +0,0 @@ -# iscc - -> Compiler for Inno Setup installers. -> It compiles an Inno Setup scripts into an Windows installer executable. - -- Compile an Inno Setup script: - -`iscc {{path/to/file.iss}}` - -- Quietly compile an Inno Setup installer: - -`iscc /Q {{path/to/file.iss}}` - -- Compile a signed Inno Setup installer: - -`iscc /S={{name}}={{command}} {{path/to/file.iss}}` diff --git a/pages.cn/windows/logoff.md b/pages.cn/windows/logoff.md deleted file mode 100644 index c62c83857..000000000 --- a/pages.cn/windows/logoff.md +++ /dev/null @@ -1,15 +0,0 @@ -# logoff - -> Terminate a login session. - -- Terminate the current session: - -`logoff` - -- Terminate a session by its name or id: - -`logoff {{session_name|session_id}}` - -- Terminate a session on a specific server connected through RDP: - -`logoff {{session_name|session_id}} /server:{{servername}}` diff --git a/pages.cn/windows/mkdir.md b/pages.cn/windows/mkdir.md deleted file mode 100644 index 65dabbb01..000000000 --- a/pages.cn/windows/mkdir.md +++ /dev/null @@ -1,11 +0,0 @@ -# mkdir - -> Creates a directory. - -- Create a directory: - -`mkdir {{directory_name}}` - -- Recursively create a nested directory tree: - -`mkdir {{path/to/sub_directory_name}}` diff --git a/pages.cn/windows/mklink.md b/pages.cn/windows/mklink.md deleted file mode 100644 index a728f1d7f..000000000 --- a/pages.cn/windows/mklink.md +++ /dev/null @@ -1,19 +0,0 @@ -# mklink - -> Create symbolic links. - -- Create a symbolic link to a file: - -`mklink {{path/to/link}} {{path/to/source_file}}` - -- Create a symbolic link to a directory: - -`mklink /d {{path/to/link}} {{path/to/source_directory}}` - -- Create a hard link to a file: - -`mklink /h {{path/to/link}} {{path/to/source_file}}` - -- Create a directory junction: - -`mklink /j {{path/to/link}} {{path/to/source_file}}` diff --git a/pages.cn/windows/more.md b/pages.cn/windows/more.md deleted file mode 100644 index 2d1b019e4..000000000 --- a/pages.cn/windows/more.md +++ /dev/null @@ -1,31 +0,0 @@ -# more - -> Display paginated output from stdin or a file. - -- Display paginated output from stdin: - -`{{echo test}} | more` - -- Display paginated output from one or more files: - -`more {{path/to/file}}` - -- Convert tabs to the specified number of spaces: - -`more {{path/to/file}} /t{{spaces}}` - -- Clear the screen before displaying the page: - -`more {{path/to/file}} /c` - -- Display the output starting at line 5: - -`more {{path/to/file}} +{{5}}` - -- Enable extended interactive mode (see help for usage): - -`more {{path/to/file}} /e` - -- Display full usage information: - -`more /?` diff --git a/pages.cn/windows/msg.md b/pages.cn/windows/msg.md deleted file mode 100644 index 102270bc1..000000000 --- a/pages.cn/windows/msg.md +++ /dev/null @@ -1,23 +0,0 @@ -# msg - -> Send a message to a specific user or session. - -- Send a message to a specified user or session: - -`msg {{username|session_name|session_id}} {{message}}` - -- Send a message from stdin: - -`echo "{{message}}" | msg {{username|session_name|session_id}}` - -- Send a message to a specific server: - -`msg /server:{{server_name}} {{username|session_name|session_id}}` - -- Send a message to all users of the current machine: - -`msg *` - -- Set a delay in seconds for a message: - -`msg /time:{{seconds}}` diff --git a/pages.cn/windows/path.md b/pages.cn/windows/path.md deleted file mode 100644 index 67180dc23..000000000 --- a/pages.cn/windows/path.md +++ /dev/null @@ -1,19 +0,0 @@ -# path - -> Display or set the search path for executable files. - -- Display the current path: - -`path` - -- Set the path to one or more semicolon-separated directories: - -`path {{path/to/directory(s)}}` - -- Append a new directory to the original path: - -`path {{path/to/directory}};%path%` - -- Set command prompt to only search the current directory for executables: - -`path ;` diff --git a/pages.cn/windows/pathping.md b/pages.cn/windows/pathping.md deleted file mode 100644 index 052151c34..000000000 --- a/pages.cn/windows/pathping.md +++ /dev/null @@ -1,35 +0,0 @@ -# pathping - -> A trace route tool combining features of `ping` and `tracert`. - -- Ping and trace the route to a host: - -`pathping {{hostname}}` - -- Do not perform reverse lookup of ip-address to hostname: - -`pathping {{hostname}} -n` - -- Specify the maximum number of hops to search for the target (the default is 30): - -`pathping {{hostname}} -h {{max_hops}}` - -- Specify the milliseconds to wait between pings (the default is 240): - -`pathping {{hostname}} -p {{time}}` - -- Specify the number of queries per hop (the default is 100): - -`pathping {{hostname}} -q {{queries}}` - -- Force IPV4 usage: - -`pathping {{hostname}} -4` - -- Force IPV6 usage: - -`pathping {{hostname}} -6` - -- Display detailed usage information: - -`pathping /?` diff --git a/pages.cn/windows/popd.md b/pages.cn/windows/popd.md deleted file mode 100644 index b4ff0870f..000000000 --- a/pages.cn/windows/popd.md +++ /dev/null @@ -1,7 +0,0 @@ -# popd - -> Changes the current directory to the directory stored by the `pushd` command. - -- Switch to directory at the top of the stack: - -`popd` diff --git a/pages.cn/windows/print.md b/pages.cn/windows/print.md deleted file mode 100644 index bc20303bc..000000000 --- a/pages.cn/windows/print.md +++ /dev/null @@ -1,11 +0,0 @@ -# print - -> Print a text file to a printer. - -- Print a text file to the default printer: - -`print {{path/to/file}}` - -- Print a text file to a specific printer: - -`print /d:{{printer}} {{path/to/file}}` diff --git a/pages.cn/windows/pushd.md b/pages.cn/windows/pushd.md deleted file mode 100644 index bdce0068d..000000000 --- a/pages.cn/windows/pushd.md +++ /dev/null @@ -1,8 +0,0 @@ -# pushd - -> Place a directory on a stack so it can be accessed later. -> See also `popd` to switch back to original directory. - -- Switch to directory and push it on the stack: - -`pushd {{directory}}` diff --git a/pages.cn/windows/pwlauncher.md b/pages.cn/windows/pwlauncher.md deleted file mode 100644 index 2bd7ee7f4..000000000 --- a/pages.cn/windows/pwlauncher.md +++ /dev/null @@ -1,11 +0,0 @@ -# pwlauncher - -> A command line tool for managing the Windows To Go startup options. - -- Display the current Windows To Go status: - -`pwlauncher` - -- Enable or disable the Windows To Go startup options: - -`pwlauncher /{{enable|disable}}` diff --git a/pages.cn/windows/rdpsign.md b/pages.cn/windows/rdpsign.md deleted file mode 100644 index 06a01cca9..000000000 --- a/pages.cn/windows/rdpsign.md +++ /dev/null @@ -1,23 +0,0 @@ -# rdpsign - -> A tool for signing Remote Desktop Protocol (RDP) files. - -- Sign an RDP file: - -`rdpsign {{path/to/file.rdp}}` - -- Sign an RDP file using a specific sha256 hash: - -`rdpsign {{path/to/file.rdp}} /sha265 {{hash}}` - -- Enable quiet output: - -`rdpsign {{path/to/file.rdp}} /q` - -- Display verbose warnings, messages and statuses: - -`rdpsign {{path/to/file.rdp}} /v` - -- Test the signing by displaying the output to stdout without updating the file: - -`rdpsign {{path/to/file.rdp}} /l` diff --git a/pages.cn/windows/reg-add.md b/pages.cn/windows/reg-add.md deleted file mode 100644 index 3be3c6b88..000000000 --- a/pages.cn/windows/reg-add.md +++ /dev/null @@ -1,23 +0,0 @@ -# reg add - -> Add new keys and their values to the registry. - -- Add a new registry key: - -`reg add {{key_name}}` - -- Add a new value under a specific key: - -`reg add {{key_name}} /v {{value}}` - -- Add a new value with specific data: - -`reg add {{key_name}} /d {{data}}` - -- Add a new value to a key with a specific data type: - -`reg add {{key_name}} /t {{type}}` - -- Forcefully overwrite the existing registry value without a prompt: - -`reg add {{key_name}} /f` diff --git a/pages.cn/windows/reg-compare.md b/pages.cn/windows/reg-compare.md deleted file mode 100644 index b159eb5c6..000000000 --- a/pages.cn/windows/reg-compare.md +++ /dev/null @@ -1,23 +0,0 @@ -# reg compare - -> Compare keys and their values in the registry. - -- Compare all values under a specific key with a second key: - -`reg compare {{first_key_name}} {{second_key_name}}` - -- Compare a specific value under two keys: - -`reg compare {{first_key_name}} {{second_key_name}} /v {{value}}` - -- Compare all sub keys and values for two keys: - -`reg compare {{first_key_name}} {{second_key_name}} /s` - -- Only output the matches between the specified keys: - -`reg compare {{first_key_name}} {{second_key_name}} /os` - -- Output the differences and matches between the specified keys: - -`reg compare {{first_key_name}} {{second_key_name}} /oa` diff --git a/pages.cn/windows/reg-copy.md b/pages.cn/windows/reg-copy.md deleted file mode 100644 index 19484c3da..000000000 --- a/pages.cn/windows/reg-copy.md +++ /dev/null @@ -1,15 +0,0 @@ -# reg copy - -> Copy keys and their values in the registry. - -- Copy a registry key to a new registry location: - -`reg copy {{old_key_name}} {{new_key_name}}` - -- Copy a registry key recursively to a new registry location: - -`reg copy {{old_key_name}} {{new_key_name}} /s` - -- Forcefully copy a registry key without a prompt: - -`reg copy {{old_key_name}} {{new_key_name}} /f` diff --git a/pages.cn/windows/reg-delete.md b/pages.cn/windows/reg-delete.md deleted file mode 100644 index 1ce8e9420..000000000 --- a/pages.cn/windows/reg-delete.md +++ /dev/null @@ -1,19 +0,0 @@ -# reg delete - -> Delete keys or their values from the registry. - -- Delete a specific registry key: - -`reg delete {{key_name}}` - -- Delete a value under a specific key: - -`reg delete {{key_name}} /v {{value}}` - -- Delete all values recursively under the specified key: - -`reg delete {{key_name}} /va` - -- Forcefully delete all values recursively under a key without a prompt: - -`reg delete {{key_name}} /f /va` diff --git a/pages.cn/windows/reg-export.md b/pages.cn/windows/reg-export.md deleted file mode 100644 index dc029f321..000000000 --- a/pages.cn/windows/reg-export.md +++ /dev/null @@ -1,11 +0,0 @@ -# reg export - -> Export the specified sub keys and values into a file. - -- Export all sub keys and values of a specific key: - -`reg export {{key_name}} {{path/to/file.reg}}` - -- Force overwriting of an existing file without prompt: - -`reg export {{key_name}} {{path/to/file.reg}} /y` diff --git a/pages.cn/windows/reg-flags.md b/pages.cn/windows/reg-flags.md deleted file mode 100644 index ef38ea06e..000000000 --- a/pages.cn/windows/reg-flags.md +++ /dev/null @@ -1,19 +0,0 @@ -# reg flags - -> Display or set flags on registry keys. - -- Display current flags for a specific key: - -`reg flags {{key_name}} query` - -- Display help and available flag types: - -`reg flags /?` - -- Set specified space-separated flags, and unset unmentioned flags, for a specific key: - -`reg flags {{key_name}} set {{flag_names}}` - -- Set specified flags for a specific key and its sub keys: - -`reg flags {{key_name}} set {{flag_names}} /s` diff --git a/pages.cn/windows/reg-import.md b/pages.cn/windows/reg-import.md deleted file mode 100644 index f6a260abc..000000000 --- a/pages.cn/windows/reg-import.md +++ /dev/null @@ -1,7 +0,0 @@ -# reg import - -> Import all available keys, subkeys, and values from a file. - -- Import all keys, subkeys and values from a file: - -`reg import {{path/to/file.reg}}` diff --git a/pages.cn/windows/reg-load.md b/pages.cn/windows/reg-load.md deleted file mode 100644 index 16d84f6fe..000000000 --- a/pages.cn/windows/reg-load.md +++ /dev/null @@ -1,8 +0,0 @@ -# reg load - -> Load saved sub keys into a different sub key in the registry. -> This is intended for troubleshooting and temporary keys. - -- Load a backup file into the specified key: - -`reg load {{key_name}} {{path/to/file}}` diff --git a/pages.cn/windows/reg-query.md b/pages.cn/windows/reg-query.md deleted file mode 100644 index 1fc52ba85..000000000 --- a/pages.cn/windows/reg-query.md +++ /dev/null @@ -1,23 +0,0 @@ -# reg query - -> Display the values of keys and sub keys in the registry. - -- Display all values of a key: - -`reg query {{key_name}}` - -- Display a specific value of a key: - -`reg query {{key_name}} /v {{value}}` - -- Display all values of a key and its sub keys: - -`reg query {{key_name}} /s` - -- Search for keys and values matching a specific pattern: - -`reg query {{key_name}} /f "{{query_pattern}}"` - -- Display a value of a key matching a specified data type: - -`reg query {{key_name}} /t {{type}}` diff --git a/pages.cn/windows/reg-restore.md b/pages.cn/windows/reg-restore.md deleted file mode 100644 index f294c29ea..000000000 --- a/pages.cn/windows/reg-restore.md +++ /dev/null @@ -1,8 +0,0 @@ -# reg restore - -> Restore a key and its values from a backup file. -> See `reg-save` for more information. - -- Overwrite a specified key with data from a backup file: - -`reg restore {{key_name}} {{path/to/file}}` diff --git a/pages.cn/windows/reg-save.md b/pages.cn/windows/reg-save.md deleted file mode 100644 index 7f120eadf..000000000 --- a/pages.cn/windows/reg-save.md +++ /dev/null @@ -1,11 +0,0 @@ -# reg save - -> Save a registry key, its sub keys and values to a file. - -- Save a registry key, its sub keys and values to a specific file: - -`reg save {{key_name}} {{path/to/file}}` - -- Forcefully overwrite an existing file without a prompt: - -`reg save {{key_name}} {{path/to/file}} /y` diff --git a/pages.cn/windows/reg-unload.md b/pages.cn/windows/reg-unload.md deleted file mode 100644 index 23d769d48..000000000 --- a/pages.cn/windows/reg-unload.md +++ /dev/null @@ -1,7 +0,0 @@ -# reg unload - -> Remove data from the registry that was loaded using the `reg load` command. - -- Remove data from the registry for a specified key: - -`reg unload {{key_name}}` diff --git a/pages.cn/windows/reg.md b/pages.cn/windows/reg.md deleted file mode 100644 index abd48916e..000000000 --- a/pages.cn/windows/reg.md +++ /dev/null @@ -1,16 +0,0 @@ -# reg - -> A command line interface for managing keys and their values in the Windows registry. -> See `reg-query`, `reg-add` and other pages for additional information. - -- Execute registry commands: - -`reg {{command}}` - -- Display general information and list all available commands: - -`reg /?` - -- Call help on a specific command: - -`reg {{command}} /?` diff --git a/pages.cn/windows/repair-bde.md b/pages.cn/windows/repair-bde.md deleted file mode 100644 index 320229599..000000000 --- a/pages.cn/windows/repair-bde.md +++ /dev/null @@ -1,35 +0,0 @@ -# repair-bde - -> Attempt to repair or decrypt a damaged BitLocker-encrypted volume. - -- Attempt to repair a specified volume: - -`repair-bde {{C:}}` - -- Attempt to repair a specified volume and output to another volume: - -`repair-bde {{C:}} {{D:}}` - -- Attempt to repair a specified volume using the provided recovery key file: - -`repair-bde {{C:}} -RecoveryKey {{path/to/file.bek}}` - -- Attempt to repair a specified volume using the provided numerical recovery password: - -`repair-bde {{C:}} -RecoveryPassword {{password}}` - -- Attempt to repair a specified volume using the provided password: - -`repair-bde {{C:}} -Password {{password}}` - -- Attempt to repair a specified volume using the provided key package: - -`repair-bde {{C:}} -KeyPackage {{path/to/directory}}` - -- Log all output to a specific file: - -`repair-bde {{C:}} -LogFile {{path/to/file}}` - -- Display all available options: - -`repair-bde /?` diff --git a/pages.cn/windows/rmdir.md b/pages.cn/windows/rmdir.md deleted file mode 100644 index 5246e51f3..000000000 --- a/pages.cn/windows/rmdir.md +++ /dev/null @@ -1,15 +0,0 @@ -# rmdir - -> Remove a directory and its contents. - -- Remove an empty directory: - -`rmdir {{path/to/directory}}` - -- Remove a directory and its contents recursively: - -`rmdir {{path/to/directory}} /s` - -- Remove a directory and its contents recursively without prompting: - -`rmdir {{path/to/directory}} /s /q` diff --git a/pages.cn/windows/scoop.md b/pages.cn/windows/scoop.md deleted file mode 100644 index c0c923688..000000000 --- a/pages.cn/windows/scoop.md +++ /dev/null @@ -1,35 +0,0 @@ -# scoop - -> A command-line installer for Windows. - -- Install a package: - -`scoop install {{package}}` - -- Remove a package: - -`scoop uninstall {{package}}` - -- Update all installed packages: - -`scoop update *` - -- List installed packages: - -`scoop list` - -- Display information about a package: - -`scoop info {{package}}` - -- Search for a package: - -`scoop search {{package}}` - -- List all known buckets (a bucket is an application repository): - -`scoop bucket known` - -- Add a bucket by its alias or a Git repository URL: - -`scoop bucket add {{bucket}}` diff --git a/pages.cn/windows/set.md b/pages.cn/windows/set.md deleted file mode 100644 index b7d98619d..000000000 --- a/pages.cn/windows/set.md +++ /dev/null @@ -1,19 +0,0 @@ -# set - -> Display or set environment variables for the current instance of CMD. - -- List all current environment variables: - -`set` - -- Set an environment variable to a specific value: - -`set {{name}}={{value}}` - -- List environment variables starting with the specified string: - -`set {{name}}` - -- Prompt the user for a value for the specified variable: - -`set /p {{name}}={{prompt_string}}` diff --git a/pages.cn/windows/sfc.md b/pages.cn/windows/sfc.md deleted file mode 100644 index 48f84ab71..000000000 --- a/pages.cn/windows/sfc.md +++ /dev/null @@ -1,31 +0,0 @@ -# sfc - -> Scans the integrity of Windows system files. - -- Display information about the usage of the command: - -`sfc` - -- Scan all system files and, if possible, repair any problems: - -`sfc /scannow` - -- Scan all system files without attempting to repair any: - -`sfc /verifyonly` - -- Scan a specific file and, if possible, repair any problems: - -`sfc /scanfile={{path/to/file}}` - -- Scan a specific file without attempting to repair it: - -`sfc /verifyfile={{path/to/file}}` - -- When repairing offline, specify the boot directory: - -`sfc /offbootdir={{path/to/dir}}` - -- When repairing offline, specify the Windows directory: - -`sfc /offwindir={{path/to/dir}}` diff --git a/pages.cn/windows/shutdown.md b/pages.cn/windows/shutdown.md deleted file mode 100644 index d87cc01fd..000000000 --- a/pages.cn/windows/shutdown.md +++ /dev/null @@ -1,35 +0,0 @@ -# shutdown - -> A tool for shutting down, restarting or logging off a machine. - -- Shutdown the current machine: - -`shutdown /s` - -- Restart the current machine: - -`shutdown /r` - -- Hibernate the current machine: - -`shutdown /h` - -- Log off the current machine: - -`shutdown /l` - -- Specify a timeout in seconds to wait before shutting down: - -`shutdown /s /t {{seconds}}` - -- Specify a comment for the shutdown reason: - -`shutdown /s /c "{{reason}}"` - -- Abort a shutdown sequence whose timeout is yet to expire: - -`shutdown /a` - -- Shutdown a remote machine: - -`shutdown /m {{\\hostname}}` diff --git a/pages.cn/windows/sigverif.md b/pages.cn/windows/sigverif.md deleted file mode 100644 index f2f0b22b0..000000000 --- a/pages.cn/windows/sigverif.md +++ /dev/null @@ -1,7 +0,0 @@ -# sigverif - -> A GUI signature verification tool for checking system files. - -- Open the File Signature Verification interface: - -`sigverif` diff --git a/pages.cn/windows/subst.md b/pages.cn/windows/subst.md deleted file mode 100644 index b273cbb3e..000000000 --- a/pages.cn/windows/subst.md +++ /dev/null @@ -1,15 +0,0 @@ -# subst - -> Associates a path with a virtual drive letter. - -- List active associations: - -`subst` - -- Add an association: - -`subst {{Z:}} {{C:\Python2.7}}` - -- Remove an association: - -`subst {{Z:}} /d` diff --git a/pages.cn/windows/systeminfo.md b/pages.cn/windows/systeminfo.md deleted file mode 100644 index e51965814..000000000 --- a/pages.cn/windows/systeminfo.md +++ /dev/null @@ -1,19 +0,0 @@ -# systeminfo - -> Display operating system configuration for a local or remote machine. - -- Display system configuration for the local machine: - -`systeminfo` - -- Display system configuration in a specified output format: - -`systeminfo /fo {{table|list|csv}}` - -- Display system configuration for a remote machine: - -`systeminfo /s {{remote_name}} /u {{username}} /p {{password}}` - -- Display detailed usage information: - -`systeminfo /?` diff --git a/pages.cn/windows/taskkill.md b/pages.cn/windows/taskkill.md deleted file mode 100644 index cef32c314..000000000 --- a/pages.cn/windows/taskkill.md +++ /dev/null @@ -1,27 +0,0 @@ -# taskkill - -> Terminate a process by its process id or name. - -- Terminate a process by its id: - -`taskkill /pid {{process_id}}` - -- Terminate a process by its name: - -`taskkill /im {{process_name}}` - -- Forcefully terminate a specified process: - -`taskkill /pid {{process_id}} /f` - -- Terminate a process and its child processes: - -`taskkill /im {{process_name}} /t` - -- Terminate a process on a remote machine: - -`taskkill /pid {{process_id}} /s {{remote_name}}` - -- Display information about the usage of the command: - -`taskkill /?` diff --git a/pages.cn/windows/tasklist.md b/pages.cn/windows/tasklist.md deleted file mode 100644 index b28ac073b..000000000 --- a/pages.cn/windows/tasklist.md +++ /dev/null @@ -1,23 +0,0 @@ -# tasklist - -> Display a list of currently running processes on a local or remote machine. - -- Display currently running processes: - -`tasklist` - -- Display running processes in a specified output format: - -`tasklist /fo {{table|list|csv}}` - -- Display running processes using the specified `.exe` or `.dll` file name: - -`tasklist /m {{module_pattern}}` - -- Display processes running on a remote machine: - -`tasklist /s {{remote_name}} /u {{username}} /p {{password}}` - -- Display services using each process: - -`tasklist /svc` diff --git a/pages.cn/windows/title.md b/pages.cn/windows/title.md deleted file mode 100644 index 600954699..000000000 --- a/pages.cn/windows/title.md +++ /dev/null @@ -1,7 +0,0 @@ -# title - -> Set the title of the command prompt window. - -- Set the title of the current command prompt window: - -`title {{new_title}}` diff --git a/pages.cn/windows/tree.md b/pages.cn/windows/tree.md deleted file mode 100644 index 4f18e513f..000000000 --- a/pages.cn/windows/tree.md +++ /dev/null @@ -1,19 +0,0 @@ -# tree - -> Display a graphical tree of the directory structure for a path. - -- Display the tree for the current directory: - -`tree` - -- Display the tree for a specific directory: - -`tree {{path/to/directory}}` - -- Display the tree for a directory including files: - -`tree {{path/to/directory}} /f` - -- Display the tree using ASCII characters instead of extended characters: - -`tree {{path/to/directory}} /a` diff --git a/pages.cn/windows/type.md b/pages.cn/windows/type.md deleted file mode 100644 index 67c1c840d..000000000 --- a/pages.cn/windows/type.md +++ /dev/null @@ -1,7 +0,0 @@ -# type - -> Display the contents of a file. - -- Display the contents of a specific file: - -`type {{path/to/file}}` diff --git a/pages.cn/windows/tzutil.md b/pages.cn/windows/tzutil.md deleted file mode 100644 index addff5b7b..000000000 --- a/pages.cn/windows/tzutil.md +++ /dev/null @@ -1,15 +0,0 @@ -# tzutil - -> A tool for displaying or configuring the system time zone. - -- Get the current time zone: - -`tzutil /g` - -- Display a list of available time zones: - -`tzutil /l` - -- Set the system time zone to the specific value: - -`tzutil /s {{timezone_id}}` diff --git a/pages.cn/windows/units.md b/pages.cn/windows/units.md deleted file mode 100644 index ab4d9e104..000000000 --- a/pages.cn/windows/units.md +++ /dev/null @@ -1,23 +0,0 @@ -# units - -> Provide the conversion between two units of measure. - -- Run in interactive mode: - -`units` - -- Show the conversion between two simple units: - -`units {{quarts}} {{tablespoons}}` - -- Convert between units with quantities: - -`units {{15 pounds}} {{kilograms}}` - -- Show the conversion between two compound units: - -`units {{"meters / second"}} {{"inches / hour"}}` - -- Show the conversion between units with different dimensions: - -`units {{"acres"}} {{"ft^2"}}` diff --git a/pages.cn/windows/ver.md b/pages.cn/windows/ver.md deleted file mode 100644 index efd00ed3b..000000000 --- a/pages.cn/windows/ver.md +++ /dev/null @@ -1,7 +0,0 @@ -# ver - -> Display the current Windows or MS-DOS version number. - -- Display the current version number: - -`ver` diff --git a/pages.cn/windows/vol.md b/pages.cn/windows/vol.md deleted file mode 100644 index 9e2439c9f..000000000 --- a/pages.cn/windows/vol.md +++ /dev/null @@ -1,11 +0,0 @@ -# vol - -> Display information about volumes. - -- Display the label and serial number for the current drive: - -`vol` - -- Display the label and serial number for a specific volume: - -`vol {{D:}}` diff --git a/pages.cn/windows/where.md b/pages.cn/windows/where.md deleted file mode 100644 index ae9f053f8..000000000 --- a/pages.cn/windows/where.md +++ /dev/null @@ -1,20 +0,0 @@ -# where - -> Display the location of files that match the search pattern. -> Defaults to current work directory and paths in the PATH environment variable. - -- Display the location of file pattern: - -`where {{file_pattern}}` - -- Display the location of file pattern including file size and date: - -`where /T {{file_pattern}}` - -- Recursively search for file pattern at specified path: - -`where /R {{path/to/directory}} {{file_pattern}}` - -- Display only the error code for the location of file pattern: - -`where /Q {{file_pattern}}` diff --git a/pages.cn/windows/whoami.md b/pages.cn/windows/whoami.md deleted file mode 100644 index e784ab8ad..000000000 --- a/pages.cn/windows/whoami.md +++ /dev/null @@ -1,23 +0,0 @@ -# whoami - -> Display details about the current user. - -- Display the username of the current user: - -`whoami` - -- Display the groups that the current user is a member of: - -`whoami /groups` - -- Display the privileges of the current user: - -`whoami /priv` - -- Display the user principal name (UPN) of the current user: - -`whoami /upn` - -- Display the logon id of the current user: - -`whoami /logonid` diff --git a/pages.cn/windows/xcopy.md b/pages.cn/windows/xcopy.md deleted file mode 100644 index a30792c85..000000000 --- a/pages.cn/windows/xcopy.md +++ /dev/null @@ -1,35 +0,0 @@ -# xcopy - -> Copy files and directory trees. - -- Copy the file(s) to the specified destination: - -`xcopy {{path/to/file_or_folder}} {{path/to/destination}}` - -- List files that will be copied before copying: - -`xcopy {{path/to/file_or_folder}} {{path/to/destination}} /p` - -- Copy the directory structure only, excluding files: - -`xcopy {{path/to/file_or_folder}} {{path/to/destination}} /t` - -- Include empty directories when copying: - -`xcopy {{path/to/file_or_folder}} {{path/to/destination}} /e` - -- Keep the source ACL in the destination: - -`xcopy {{path/to/file_or_folder}} {{path/to/destination}} /o` - -- Allow resuming when network connection is lost: - -`xcopy {{path/to/file_or_folder}} {{path/to/destination}} /z` - -- Disable the prompt when the file exists in the destination: - -`xcopy {{path/to/file_or_folder}} {{path/to/destination}} /y` - -- Display detailed usage information: - -`xcopy /?`