[xubuntu-users] Why no default mount?
Ralf Mardorf
ralf.mardorf at rocketmail.com
Sat May 7 09:46:53 UTC 2016
This script should work to auto-mount everything, no 1 vs 12 issue,
unneeded dirs shouldn't appear in /mnt, just exotic file systems such
as ufs aren't covered, but even including those is possible.
$ cat amount
#!/bin/dash
for i in $(lsblk -r |awk '{ print $1 }'|grep -v md |grep -v loop |grep [[:digit:]]|sort|uniq); do
mkdir -p /mnt/$i
mount /dev/$i /mnt/$i
case $? in
0) ;;
*) rmdir /mnt/$i;;
esac
done
exit
More information about the xubuntu-users
mailing list