Merge pull request #231 from Like-all/master

linux: shuf
waldyrious/alt-syntax
Romain Prieto 2014-09-11 07:18:31 +10:00
commit ac75bbf85d
2 changed files with 22 additions and 3 deletions

View File

@ -12,15 +12,15 @@
- mark disk as failed
`mdadm {{/path/to/raid_device_file}} -f {/path/to/disk_device_file{}}`
`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{}}`
`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{}}`
`mdadm {{/path/to/raid_device_file}} -a {{/path/to/disk_device_file}}`
- show RAID info

19
pages/linux/shuf.md Normal file
View File

@ -0,0 +1,19 @@
# shuf
> generate random permutations
- randomize the order of lines in a file and output the result
`shuf {{filename}}`
- only output the first n entries of the result
`shuf -n {{n}} {{filename}}`
- write output to another file
`shuf -o {{another_filename}} {{filename}}`
- generate random numbers in range
`shuf -i {{low}}-{{high}}`