Is it possible to rename a volume label with extension without installing / renaming / unmounting / mounting?

I know that the following will work:

hdiutil attach old.sparsebundle -mountroot . diskutil rename old_label new_label hdiutil detach old_label hdiutil attach old.sparsebundle -mountroot . 

This causes the old_label to be mounted as new_label, but it does not elegantly mount it to rename it, and then disconnects it and mounts it for the label to take effect.

Is there another way?

+4
source share

Source: https://habr.com/ru/post/1380978/


All Articles