Attach(1)ing different copies of the same
dmg file create in
/Volumes folders representing each image. Let the first image be called
Image; the subsequents will receive an incrementing number in their tail, e.g.
Image 2 and so on.
Image 1 and then attaching another instance will recycle the the numerical id, so that my last image will actually be
This means that I cannot rely on
ls(1)'s output (by default sorted lexicographically) to determine the last mounted image. I don't seem to have more success with
ls -U or
diskutil's output either.
I may very well be missing something. Is there any way to reliably determine in
bash the latest mounted image? Thank you.