diff --git a/pages/linux/mdadm.md b/pages/linux/mdadm.md index 783117baaf..c089b248a3 100644 --- a/pages/linux/mdadm.md +++ b/pages/linux/mdadm.md @@ -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 diff --git a/pages/linux/shuf.md b/pages/linux/shuf.md new file mode 100644 index 0000000000..bdf3e75bba --- /dev/null +++ b/pages/linux/shuf.md @@ -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}}`