First sync.
This commit is contained in:
10
ddi
Executable file
10
ddi
Executable file
@@ -0,0 +1,10 @@
|
||||
# DDI - Dump Disk Information
|
||||
#
|
||||
# Dumps the UUID and label of a filesystem to its / (root) directory.
|
||||
# Parses df output to find current mounts and then uses lsblk to get info.
|
||||
|
||||
for dev in `df -h | grep ^/dev | cut -d\ -f1 | cut -d/ -f3`; do
|
||||
loc=`cat /proc/mounts | grep $dev | cut -d\ -f2`
|
||||
lsblk -fn -o UUID /dev/$dev > $loc/.uuid
|
||||
lsblk -fn -o LABEL /dev/$dev > $loc/.label
|
||||
done
|
||||
Reference in New Issue
Block a user