diff --git a/pages/common/badblocks.md b/pages/common/badblocks.md index 3a6ed0365c..3c421fc1a7 100644 --- a/pages/common/badblocks.md +++ b/pages/common/badblocks.md @@ -5,24 +5,24 @@ - Search a disk for bad blocks by using a non-destructive read-only test: -`sudo badblocks {{/dev/sda}}` +`sudo badblocks {{/dev/sdX}}` - Search an unmounted disk for bad blocks with a non-destructive read-write test: -`sudo badblocks -n {{/dev/sda}}` +`sudo badblocks -n {{/dev/sdX}}` - Search an unmounted disk for bad blocks with a destructive write test: -`sudo badblocks -w {{/dev/sda}}` +`sudo badblocks -w {{/dev/sdX}}` - Search an unmounted disk for bad blocks with a destructive write test and show verbose status: -`sudo badblocks -svw {{/dev/sda}}` +`sudo badblocks -svw {{/dev/sdX}}` - Search an unmounted disk in destructive mode and output found blocks to a file: -`sudo badblocks -o {{/path/to/file}} -w {{/dev/sda}}` +`sudo badblocks -o {{path/to/file}} -w {{/dev/sdX}}` - Search an unmounted disk in destructive mode with improved speed using 4K block size and 64K block count: -`sudo badblocks -w -b {{4096}} -c {{65536}} {{/dev/sda}}` +`sudo badblocks -w -b {{4096}} -c {{65536}} {{/dev/sdX}}` diff --git a/pages/common/borg.md b/pages/common/borg.md index ea20af3cfd..e6ef5a425f 100644 --- a/pages/common/borg.md +++ b/pages/common/borg.md @@ -6,27 +6,27 @@ - Initialise a (local) repository: -`borg init {{/path/to/repo_directory}}` +`borg init {{path/to/repo_directory}}` - Backup a directory into the repository, creating an archive called "Monday": -`borg create --progress {{/path/to/repo_directory}}::{{Monday}} {{/path/to/source_directory}}` +`borg create --progress {{path/to/repo_directory}}::{{Monday}} {{path/to/source_directory}}` - List all archives in a repository: -`borg list {{/path/to/repo_directory}}` +`borg list {{path/to/repo_directory}}` - Extract a specific directory from the "Monday" archive in a remote repository, excluding all *.ext files: -`borg extract {{user}}@{{host}}:{{/path/to/repo_directory}}::{{Monday}} {{path/to/target_directory}} --exclude '{{*.ext}}'` +`borg extract {{user}}@{{host}}:{{path/to/repo_directory}}::{{Monday}} {{path/to/target_directory}} --exclude '{{*.ext}}'` - Prune a repository by deleting all archives older than 7 days, listing changes: -`borg prune --keep-within {{7d}} --list {{/path/to/repo_directory}}` +`borg prune --keep-within {{7d}} --list {{path/to/repo_directory}}` - Mount a repository as a FUSE filesystem: -`borg mount {{/path/to/repo_directory}}::{{Monday}} {{/path/to/mountpoint}}` +`borg mount {{path/to/repo_directory}}::{{Monday}} {{path/to/mountpoint}}` - Display help on creating archives: diff --git a/pages/common/chroot.md b/pages/common/chroot.md index e01eb5febe..7055c1d71d 100644 --- a/pages/common/chroot.md +++ b/pages/common/chroot.md @@ -4,7 +4,7 @@ - Run command as new root directory: -`chroot {{/path/to/new/root}} {{command}}` +`chroot {{path/to/new/root}} {{command}}` - Specify user and group (ID or name) to use: diff --git a/pages/common/fd.md b/pages/common/fd.md index 1c65f30553..d13b548d1d 100644 --- a/pages/common/fd.md +++ b/pages/common/fd.md @@ -18,7 +18,7 @@ - Find files in a specific directory: -`fd {{pattern}} {{path/to/dir}}` +`fd {{pattern}} {{path/to/directory}}` - Include ignored and hidden files in the search: diff --git a/pages/common/goimports.md b/pages/common/goimports.md index 82a51f5394..966d5b0783 100644 --- a/pages/common/goimports.md +++ b/pages/common/goimports.md @@ -17,4 +17,4 @@ - Set the import prefix string after 3rd-party packages (comma-separated list): -`goimports -local {{/path/to/package}} {{file}}.go` +`goimports -local {{path/to/package}} {{file}}.go` diff --git a/pages/common/hangups.md b/pages/common/hangups.md index 70c99c15f4..360d506bc5 100644 --- a/pages/common/hangups.md +++ b/pages/common/hangups.md @@ -13,4 +13,4 @@ - Set a refresh token for hangups: -`hangups --token-path {{/path/to/token}}` +`hangups --token-path {{path/to/token}}` diff --git a/pages/common/lwp-request.md b/pages/common/lwp-request.md index 1243a36ecd..3764d27ac1 100644 --- a/pages/common/lwp-request.md +++ b/pages/common/lwp-request.md @@ -10,7 +10,7 @@ - Upload a file with a POST request: -`cat {{/path/to/file}} | lwp-request -m POST {{http://example.com/some/path}}` +`cat {{path/to/file}} | lwp-request -m POST {{http://example.com/some/path}}` - Make a request with a custom user agent: diff --git a/pages/common/lz4.md b/pages/common/lz4.md index fe20a48128..bf25352048 100644 --- a/pages/common/lz4.md +++ b/pages/common/lz4.md @@ -17,7 +17,7 @@ - Package and compress a directory and its contents: -`tar cvf - {{path/to/dir}} | lz4 - {{dir.tar.lz4}}` +`tar cvf - {{path/to/directory}} | lz4 - {{dir.tar.lz4}}` - Decompress and unpack a directory and its contents: diff --git a/pages/common/mosh.md b/pages/common/mosh.md index aa6b22b7a0..759f235d49 100644 --- a/pages/common/mosh.md +++ b/pages/common/mosh.md @@ -10,7 +10,7 @@ - Connect to a remote server with a specific identity (private key): -`mosh --ssh="ssh -i {{/path/to/key_file}}" {{username}}@{{remote_host}}` +`mosh --ssh="ssh -i {{path/to/key_file}}" {{username}}@{{remote_host}}` - Connect to a remote server using a specific port: @@ -26,4 +26,4 @@ - Usage when `mosh-server` binary is outside standard path: -`mosh --server={{/path/to/bin/}}mosh-server {{remote_host}}` +`mosh --server={{path/to/bin/}}mosh-server {{remote_host}}` diff --git a/pages/common/nasm.md b/pages/common/nasm.md index 90c3507894..479dfba23e 100644 --- a/pages/common/nasm.md +++ b/pages/common/nasm.md @@ -21,4 +21,4 @@ - 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}}` +`nasm -i {{path/to/include_dir/}} {{source.asm}}` diff --git a/pages/common/nextflow.md b/pages/common/nextflow.md index aa589b77e6..c595842622 100644 --- a/pages/common/nextflow.md +++ b/pages/common/nextflow.md @@ -13,7 +13,7 @@ - Run with a given work directory for intermediate files, save execution report: -`nextflow run {{workflow}} -work-dir {{/path/to/directory}} -with-report {{report.html}}` +`nextflow run {{workflow}} -work-dir {{path/to/directory}} -with-report {{report.html}}` - Show details of previous runs in current directory: diff --git a/pages/common/pax.md b/pages/common/pax.md index 16daf6d0ba..6a0c7e612c 100644 --- a/pages/common/pax.md +++ b/pages/common/pax.md @@ -24,4 +24,4 @@ - Copy to a directory, while keeping the original metadata; `target/` must exist: -`pax -rw {{path/to/file1}} {{path/to/dir1}} {{path/to/dir2}} {{target/}}` +`pax -rw {{path/to/file1}} {{path/to/directory1}} {{path/to/directory2}} {{target/}}` diff --git a/pages/common/qemu-img.md b/pages/common/qemu-img.md index 966794806f..653ccc70d4 100644 --- a/pages/common/qemu-img.md +++ b/pages/common/qemu-img.md @@ -20,4 +20,4 @@ - Convert a VMWare .vmdk disk image to a KVM .qcow2 disk image: -`qemu-img convert -O qcow2 {{/path/to/file/foo.vmdk}} {{/path/to/file/foo.qcow2}}` +`qemu-img convert -O qcow2 {{path/to/file/foo.vmdk}} {{path/to/file/foo.qcow2}}` diff --git a/pages/common/srm.md b/pages/common/srm.md index a628751611..2d1d4a529a 100644 --- a/pages/common/srm.md +++ b/pages/common/srm.md @@ -2,18 +2,19 @@ > Securely remove files or directories. > Overwrites the existing data one or multiple times. Drop in replacement for rm. +> More information: . - Remove a file after a single-pass overwriting with random data: -`srm -s {{/path/to/file}}` +`srm -s {{path/to/file}}` - Remove a file after seven passes of overwriting with random data: -`srm -m {{/path/to/file}}` +`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/directory}}` +`srm -r -s {{path/to/directory}}` - Prompt before every removal: diff --git a/pages/common/unzip.md b/pages/common/unzip.md index 50fe0d8a8c..7c30e376c7 100644 --- a/pages/common/unzip.md +++ b/pages/common/unzip.md @@ -8,7 +8,7 @@ - Extract zip files(s) to given path: -`unzip {{compressed_file(s)}} -d {{/path/to/put/extracted_file(s)}}` +`unzip {{compressed_file(s)}} -d {{path/to/put/extracted_file(s)}}` - List the contents of a zip file without extracting: diff --git a/pages/common/zip.md b/pages/common/zip.md index e4d6c6ff05..0d77f27289 100644 --- a/pages/common/zip.md +++ b/pages/common/zip.md @@ -4,23 +4,23 @@ - Package and compress a directory and its contents, [r]ecursively: -`zip -r {{compressed.zip}} {{/path/to/dir}}` +`zip -r {{compressed.zip}} {{path/to/directory}}` - E[x]clude unwanted files from being added to the compressed archive: -`zip -r {{compressed.zip}} {{path/to/dir}} -x {{path/to/exclude}}` +`zip -r {{compressed.zip}} {{path/to/directory}} -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}}` +`zip -r -{{9}} {{compressed.zip}} {{path/to/directory}}` - Package and compress multiple directories and files: -`zip -r {{compressed.zip}} {{/path/to/dir1 /path/to/dir2 /path/to/file}}` +`zip -r {{compressed.zip}} {{path/to/directory1}} {{path/to/directory2}} {{path/to/file}}` - Create an encrypted archive (user will be prompted for a password): -`zip -e -r {{compressed.zip}} {{path/to/dir}}` +`zip -e -r {{compressed.zip}} {{path/to/directory}}` - Add files to an existing zip file: @@ -32,4 +32,4 @@ - 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}}` +`zip -r -s {{3g}} {{compressed.zip}} {{path/to/directory}}` diff --git a/pages/common/zoxide.md b/pages/common/zoxide.md index b53c547560..6662c9b3c2 100644 --- a/pages/common/zoxide.md +++ b/pages/common/zoxide.md @@ -18,11 +18,11 @@ - Add a directory or increment its rank: -`zoxide add {{path/to/dir}}` +`zoxide add {{path/to/directory}}` - Remove a directory from `zoxide`'s database: -`zoxide remove {{path/to/dir}}` +`zoxide remove {{path/to/directory}}` - Generate shell configuration for command aliases (`z`, `za`, `zi`, `zq`, `zr`): diff --git a/pages/linux/imgp.md b/pages/linux/imgp.md index 028dd4b458..5bf3d60506 100644 --- a/pages/linux/imgp.md +++ b/pages/linux/imgp.md @@ -4,7 +4,7 @@ - Convert single images and/or whole directories containing valid image formats: -`imgp -x {{1366x1000}} {{path/to/dir}} {{path/to/file}}` +`imgp -x {{1366x1000}} {{path/to/directory}} {{path/to/file}}` - Scale an image by 75% and overwrite the source image to a target resolution: diff --git a/pages/linux/ltrace.md b/pages/linux/ltrace.md index 6aefa204d6..a51c6d4af3 100644 --- a/pages/linux/ltrace.md +++ b/pages/linux/ltrace.md @@ -1,6 +1,7 @@ # ltrace > Display dynamic library calls of a process. +> More information: . - Print (trace) library calls of a program binary: @@ -8,12 +9,12 @@ - Count library calls. Print a handy summary at the bottom: -`ltrace -c {{/path/to/program}}` +`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}}` +`ltrace -e malloc+free-@libc.so* {{path/to/program}}` - Write to file instead of terminal: -`ltrace -o {{file}} {{/path/to/program}}` +`ltrace -o {{file}} {{path/to/program}}` diff --git a/pages/linux/mdadm.md b/pages/linux/mdadm.md index 51e20cef0a..7e1db52ffe 100644 --- a/pages/linux/mdadm.md +++ b/pages/linux/mdadm.md @@ -1,27 +1,28 @@ # mdadm > RAID management utility. +> More information: . - Create array: -`mdadm --create {{/path/to/raid_device_file}} --level {{raid_level}} --raid-devices {{number_of_disks}} {{/path/to/disk_device_file}}` +`mdadm --create {{/dev/md/MyRAID}} --level {{raid_level}} --raid-devices {{number_of_disks}} {{/dev/sdXN}}` - Stop array: -`mdadm -S {{/path/to/raid_device_file}}` +`mdadm --stop {{/dev/md0}}` - Mark disk as failed: -`mdadm {{/path/to/raid_device_file}} -f {{/path/to/disk_device_file}}` +`mdadm --fail {{/dev/md0}} {{/dev/sdXN}}` - Remove disk: -`mdadm {{/path/to/raid_device_file}} -r {{/path/to/disk_device_file}}` +`mdadm --remove {{/dev/md0}} {{/dev/sdXN}}` - Add disk to array: -`mdadm {{/path/to/raid_device_file}} -a {{/path/to/disk_device_file}}` +`mdadm --assemble {{/dev/md0}} {{/dev/sdXN}}` - Show RAID info: -`mdadm -D {{/path/to/raid_device_file}}` +`mdadm --detail {{/dev/md0}}` diff --git a/pages/linux/runsvchdir.md b/pages/linux/runsvchdir.md index 91ee114441..0516aa4c37 100644 --- a/pages/linux/runsvchdir.md +++ b/pages/linux/runsvchdir.md @@ -1,7 +1,8 @@ # runsvchdir > Change the directory `runsvdir` uses by default. +> More information: . - Switch `runsvdir` directories: -`sudo runsvchdir {{/path/to/directory}}` +`sudo runsvchdir {{path/to/directory}}` diff --git a/pages/linux/unshadow.md b/pages/linux/unshadow.md index 44de83dccd..804a61c365 100644 --- a/pages/linux/unshadow.md +++ b/pages/linux/unshadow.md @@ -9,4 +9,4 @@ - Combine two arbitrary shadow and password files: -`sudo unshadow {{/path/to/passwd}} {{/path/to/shadow}}` +`sudo unshadow {{path/to/passwd}} {{path/to/shadow}}` diff --git a/pages/linux/useradd.md b/pages/linux/useradd.md index 5e7690ebfb..77159dc41b 100644 --- a/pages/linux/useradd.md +++ b/pages/linux/useradd.md @@ -12,7 +12,7 @@ - Create new user with specified shell: -`useradd --shell {{/path/to/shell}} {{name}}` +`useradd --shell {{path/to/shell}} {{name}}` - Create new user belonging to additional groups (mind the lack of whitespace): diff --git a/pages/linux/usermod.md b/pages/linux/usermod.md index 7c47f8b207..300cb6231d 100644 --- a/pages/linux/usermod.md +++ b/pages/linux/usermod.md @@ -12,4 +12,4 @@ - Create a new home directory for a user and move their files to it: -`usermod -m -d {{/path/to/home}} {{user}}` +`usermod -m -d {{path/to/home}} {{user}}` diff --git a/pages/osx/codesign.md b/pages/osx/codesign.md index 3441ea62a5..d41a54457a 100644 --- a/pages/osx/codesign.md +++ b/pages/osx/codesign.md @@ -4,8 +4,8 @@ - Sign an application with a certificate: -`codesign -s "{{My Company Name}}" {{/path/to/App.app}}` +`codesign -s "{{My Company Name}}" {{path/to/App.app}}` - Verify the certificate of an application: -`codesign -v {{/path/to/App.app}}` +`codesign -v {{path/to/App.app}}` diff --git a/pages/osx/runsvchdir.md b/pages/osx/runsvchdir.md index 91ee114441..18e671a634 100644 --- a/pages/osx/runsvchdir.md +++ b/pages/osx/runsvchdir.md @@ -4,4 +4,4 @@ - Switch `runsvdir` directories: -`sudo runsvchdir {{/path/to/directory}}` +`sudo runsvchdir {{path/to/directory}}` diff --git a/pages/sunos/runsvchdir.md b/pages/sunos/runsvchdir.md index 91ee114441..18e671a634 100644 --- a/pages/sunos/runsvchdir.md +++ b/pages/sunos/runsvchdir.md @@ -4,4 +4,4 @@ - Switch `runsvdir` directories: -`sudo runsvchdir {{/path/to/directory}}` +`sudo runsvchdir {{path/to/directory}}` diff --git a/pages/windows/sfc.md b/pages/windows/sfc.md index f662e92137..d4f0302ad5 100644 --- a/pages/windows/sfc.md +++ b/pages/windows/sfc.md @@ -25,8 +25,8 @@ - When repairing offline, specify the boot directory: -`sfc /offbootdir={{path/to/dir}}` +`sfc /offbootdir={{path/to/directory}}` - When repairing offline, specify the Windows directory: -`sfc /offwindir={{path/to/dir}}` +`sfc /offwindir={{path/to/directory}}`