[svlug] question re: label ext3 external drive using tune2fs
Robert Citek
robert.citek at gmail.com
Thu Jan 3 12:01:37 PST 2008
On Jan 3, 2008 12:53 PM, Daniel Gimpelevich
<daniel at gimpelevich.san-francisco.ca.us> wrote:
> On Thu, 03 Jan 2008 10:13:48 -0600, Robert Citek wrote:
> > As far as I know there
> > is no e2label equivalent for UUID, e.g. e2uuid.
>
> As well there shouldn't be. The UUID is not supposed to change on the fly.
Wish you would have told me before I wrote this.
e2uuid () {
# (c) 2008 - Robert Citek - released under GPL
if [ $# -eq 1 ] ; then
sudo tune2fs -l $1 | awk -F': *' '/UUID/ {print $2}'
elif [ $# -eq 2 ] ; then
sudo tune2fs -U $2 $1
else
echo Usage: e2uuid device [uuid]
fi
}
Regards,
- Robert
More information about the svlug
mailing list