Random volume labels

Stuart Sears stuart at sjsears.com
Wed Apr 13 22:10:59 UTC 2005


On Wednesday 13 April 2005 19:34, Mark Knecht wrote:
> On 4/13/05, Rick Stevens <rstevens at vitalstream.com> wrote:
> > Mark Knecht wrote:
> > > On 4/12/05, Mark Knecht <markknecht at gmail.com> wrote:
> > >>Hi,
> > >>   I'm looking around for a simple command that will tell me any
> > >>volume labels on a set of 1394 drive partitions.
> > >>
> > >>   Any recommendations?
> > >>
> > >>thanks,
> > >>Mark
> > >
> > > Hi,
> > >    Sorry for answering my own post. I found tune2fs works for at
> > > least ext2/3 partitions.
> >
> > As will e2label.
personally I use e2label as part of a short script, rather than running 
it on individual partitions...
something like this (usually saved as /root/bin/listlabels.sh)
#-----SCRIPT------#
#/bin/bash
for part in `fdisk -l | grep '^/dev' | cut -d' ' -f1`; do
echo $part = `e2label $part 2>/dev/null`
done
#-----/SCRIPT------#

[root at behemoth ~]# listlabels.sh
/dev/hda1 = /boot
/dev/hda2 =
/dev/hda3 = /home1
/dev/hda4 =
/dev/hda5 =
/dev/hda6 =
/dev/sdb1 = external


Stuart
-- 
Stuart Sears RHCE, RHCX, RTFM, ASAP
Curiosity killed the cat, but satisfaction brought her back.




More information about the Redhat-install-list mailing list