I have earlier encouraged people to share if they use GNU Parallel in
a cool way.

I did this today:

# Add all devices that are located in an external enclosure (i.e.
non-internal disks) to a RAID
# This will fail for drives already added to the RAID and that is fine
parallel -j1 mdadm --add /dev/md0 /dev/{/} :::
/sys/class/enclosure/*/*/device/block/*

# Blink all detected drives in external enclosures
parallel echo 1 \> :::
/sys/class/enclosure/*/*/device/block/sd*/../../enclosure*/locate

I think it is the first time I have run a command where you could not
substitute /foo/bar/../../ with /.


/Ole

Reply via email to