[clue-tech] Detecting media change

David L. Willson DLWillson at TheGeek.NU
Thu May 1 14:05:18 MDT 2008


> David L. Willson wrote:
> > Overkill for what I need.
> >
> > I just need to "look" at a given filesystem from a script, and determine whether I own
> > it, and whether it's the one I used yesterday.  If I own it AND it's the one I used
> > yesterday, I'll just do my normal thing.  If I don't own it, I'll scream and holler.  If
> > I own it AND it's NOT the one I used yesterday, I'll blank it and then do my normal
thing.
> >
> > I think I just wrote the script I need, minus translation into bash-ese.
> >   
> I guess you can just check the UUID, but I don't know how that might 
> work for a CD.

What would be the code to get the UUID for a given dev-node?  

current-UUID = $(ls -l /dev/disks/by-path | cut ... something) ?


More information about the clue-tech mailing list