mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-19 18:50:23 +00:00
Update cheatsheets
This commit is contained in:
@@ -10,12 +10,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Discard all sectors on a device, removing all data:
|
||||
|
||||
`blkdiscard /dev/{{device}}`
|
||||
`blkdiscard {{/dev/device}}`
|
||||
|
||||
- Securely discard all blocks on a device, removing all data:
|
||||
|
||||
`blkdiscard --secure /dev/{{device}}`
|
||||
`blkdiscard --secure {{/dev/device}}`
|
||||
|
||||
- Discard the first 100 MB of a device:
|
||||
|
||||
`blkdiscard --length {{100MB}} /dev/{{device}}`
|
||||
`blkdiscard --length {{100MB}} {{/dev/device}}`
|
||||
|
||||
@@ -10,23 +10,23 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Request the identification info of a given device:
|
||||
|
||||
`sudo hdparm -I /dev/{{device}}`
|
||||
`sudo hdparm -I {{/dev/device}}`
|
||||
|
||||
- Get the Advanced Power Management level:
|
||||
|
||||
`sudo hdparm -B /dev/{{device}}`
|
||||
`sudo hdparm -B {{/dev/device}}`
|
||||
|
||||
- Set the Advanced Power Management value (values 1-127 permit spin-down, and values 128-254 do not):
|
||||
|
||||
`sudo hdparm -B {{1}} /dev/{{device}}`
|
||||
`sudo hdparm -B {{1}} {{/dev/device}}`
|
||||
|
||||
- Display the device's current power mode status:
|
||||
|
||||
`sudo hdparm -C /dev/{{device}}`
|
||||
`sudo hdparm -C {{/dev/device}}`
|
||||
|
||||
- Force a drive to immediately enter standby mode (usually causes a drive to spin down):
|
||||
|
||||
`sudo hdparm -y /dev/{{device}}`
|
||||
`sudo hdparm -y {{/dev/device}}`
|
||||
|
||||
- Put the drive into idle (low-power) mode, also setting its standby timeout:
|
||||
|
||||
|
||||
@@ -16,11 +16,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Case-insensitively search only on blank and alphanumeric characters:
|
||||
|
||||
`look -{{f|-ignore-case}} -{{d|-alphanum}} {{prefix}} {{path/to/file}}`
|
||||
`look {{-f|--ignore-case}} {{-d|--alphanum}} {{prefix}} {{path/to/file}}`
|
||||
|
||||
- Specify a string [t]ermination character (space by default):
|
||||
- Specify a string termination character (space by default):
|
||||
|
||||
`look -{t|-terminate} {{,}}`
|
||||
`look {{-t|--terminate}} {{,}}`
|
||||
|
||||
- Search in `/usr/share/dict/words` (`--ignore-case` and `--alphanum` are assumed):
|
||||
|
||||
@@ -28,4 +28,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Search in `/usr/share/dict/web2` (`--ignore-case` and `--alphanum` are assumed):
|
||||
|
||||
`look -{{a|-alternative}} {{prefix}}`
|
||||
`look {{-a|--alternative}} {{prefix}}`
|
||||
|
||||
@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Attach a file to a given loop device:
|
||||
|
||||
`sudo losetup /dev/{{loop}} /{{path/to/file}}`
|
||||
`sudo losetup {{/dev/loop}} /{{path/to/file}}`
|
||||
|
||||
- Attach a file to a new free loop device and scan the device for partitions:
|
||||
|
||||
@@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Attach a file to a read-only loop device:
|
||||
|
||||
`sudo losetup --read-only /dev/{{loop}} /{{path/to/file}}`
|
||||
`sudo losetup --read-only {{/dev/loop}} /{{path/to/file}}`
|
||||
|
||||
- Detach all loop devices:
|
||||
|
||||
@@ -30,4 +30,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Detach a given loop device:
|
||||
|
||||
`sudo losetup -d /dev/{{loop}}`
|
||||
`sudo losetup -d {{/dev/loop}}`
|
||||
|
||||
@@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Set a filesystem label:
|
||||
|
||||
`mlabel -i /dev/{{sda}} ::"{{new_label}}"`
|
||||
`mlabel -i {{/dev/sda}} ::"{{new_label}}"`
|
||||
|
||||
@@ -15,12 +15,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Record ("burn") an audio-only disc:
|
||||
|
||||
`wodim dev=/dev/{{optical_drive}} -audio {{track*.cdaudio}}`
|
||||
`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}}`
|
||||
`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}}`
|
||||
`wodim -tao dev={{/dev/optical_drive}} -data {{file.iso}}`
|
||||
|
||||
@@ -22,4 +22,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Define capture device:
|
||||
|
||||
`zbarcam /dev/{{video_device}}`
|
||||
`zbarcam {{/dev/video_device}}`
|
||||
|
||||
Reference in New Issue
Block a user