![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems . |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Version labeling is out of control | iBot | UNIX and Linux RSS News | 0 | 06-07-2008 09:40 AM |
| Automatic monitor disk-space | anuradha | Filesystems, Disks and Memory | 3 | 01-15-2008 03:37 PM |
| FDA says no new labeling for nanotech products - Washington Post | iBot | UNIX and Linux RSS News | 0 | 07-25-2007 04:00 PM |
| Automatic monitor disk-space | nfbeerse | Shell Programming and Scripting | 3 | 03-01-2004 04:16 AM |
| automatic su | omran | Shell Programming and Scripting | 1 | 08-19-2002 05:03 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Automatic disk labeling
First post
...Here is a script for automatic labeling of previously unlabeled disks. Other methods exist (format -f cmd_file), but I like this because it's all in one place. Code:
#!/bin/ksh
#----------------------
# format_label
# Automatic labeling of previously unlabeled disks
# 2006.08.31 ken.wachtler
#----------------------
# Enter a list of disks, as format's banner would report them
Disks="
c4t50060482CCAB2987d27
c4t50060482CCAB2987d28
c4t50060482CCAB2987d29
c4t50060482CCAB2987d30
c4t50060482CCAB2987d31
c4t50060482CCAB2987d32
c4t50060482CCAB2987d33
c4t50060482CCAB2987d34
c4t50060482CCAB2987d35
c4t50060482CCAB2987d36
c4t50060482CCAB2987d37
c4t50060482CCAB2987d38
c4t50060482CCAB2987d39
c4t50060482CCAB2987d40
c4t50060482CCAB2987d41
c4t50060482CCAB2987d42
c4t50060482CCAB2987d43
c4t50060482CCAB2987d44
c4t50060482CCAB2987d45
c4t50060482CCAB2987d46
c4t50060482CCAB2987d47
c4t50060482CCAB2987d48
c4t50060482CCAB2987d49
c4t50060482CCAB2987d50
c4t50060482CCAB2987d51
c4t50060482CCAB2987d52
c4t50060482CCAB2987d53
c4t50060482CCAB2987d54
c4t50060482CCAB2987d55
c4t50060482CCAB2987d56
c4t50060482CCAB2987d57
c4t50060482CCAB2987d58
c4t50060482CCAB2987d59
c4t50060482CCAB2987d60
c4t50060482CCAB2987d61
c4t50060482CCAB2987d62
"
for d in $Disks ; do
# write label
printf "label\nyes\nquit\n" | format -d $d
# check label
printf "\n\n${d}\n\n"
prtvtoc /dev/dsk/${d}s0 | egrep '^P |^ '
echo "<cr> to cont: "
read a
done
Last edited by blowtorch; 09-25-2006 at 10:19 PM.. Reason: to add code tags |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|