multiple pages: Unify file path syntax to indicate a 'path to' (#4816)
This commit is contained in:
@@ -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}}`
|
||||
|
@@ -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:
|
||||
|
||||
|
@@ -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:
|
||||
|
||||
|
@@ -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:
|
||||
|
||||
|
@@ -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`
|
||||
|
@@ -13,4 +13,4 @@
|
||||
|
||||
- Set a refresh token for hangups:
|
||||
|
||||
`hangups --token-path {{/path/to/token}}`
|
||||
`hangups --token-path {{path/to/token}}`
|
||||
|
@@ -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:
|
||||
|
||||
|
@@ -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:
|
||||
|
||||
|
@@ -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}}`
|
||||
|
@@ -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}}`
|
||||
|
@@ -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:
|
||||
|
||||
|
@@ -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/}}`
|
||||
|
@@ -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}}`
|
||||
|
@@ -2,18 +2,19 @@
|
||||
|
||||
> Securely remove files or directories.
|
||||
> Overwrites the existing data one or multiple times. Drop in replacement for rm.
|
||||
> More information: <http://srm.sourceforge.net/srm.html>.
|
||||
|
||||
- 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:
|
||||
|
||||
|
@@ -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:
|
||||
|
||||
|
@@ -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}}`
|
||||
|
@@ -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`):
|
||||
|
||||
|
Reference in New Issue
Block a user