文件目录的复制,这样可以使用COPY过来的文件的属性和原来的是一样的。链接文件也会拷贝过来:
# cd /opt
# find . –print –depth |cpio –pdm /test
如果只是做目录的同步可以按上面的操作进行,只用非根(/)和非/usr目录的情形。
五、 磁盘分区操作
如果要对磁盘各片进行大小的调整可以按下面的操作方法进行操作。指定各个磁盘片的大小,如果要使用整个磁盘的话可以将除了片s2之外的所有片的空间都置为0就可以了。在使用片的时候可以直接使用s2就可以达到使用整个磁盘空间的目的了。不过,建议还是留一部分小的空间用供状态数据库使用。
# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c1t0d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf789b07,0
1. c1t1d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf788acc,0
2. c1t2d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf789ae9,0
3. c1t3d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf787f27,0
4. c1t4d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf789b34,0
5. c1t5d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf789a49,0
Specify disk (enter its number): 3
selecting c1t3d0
[disk formatted]
FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
repair - repair a defective sector
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
inquiry - show vendor, product and revision
volname - set 8-character volume name
!<cmd> - execute <cmd>, then return
quit
format> p
PARTITION MENU:
0 - change `0' partition
1 - change `1' partition
2 - change `2' partition
3 - change `3' partition
4 - change `4' partition
5 - change `5' partition
6 - change `6' partition
7 - change `7' partition
select - select a predefined table
modify - modify a predefined partition table
name - name the current table
print - display the current table
label - write partition map and label to the disk
!<cmd> - execute <cmd>, then return
quit
partition> modify
Select partitioning base:
0. Current partition table (original)
1. All Free Hog
Choose base (enter number) [0]? 0
Do you wish to continue creating a new partition
table based on above table[yes]? yes
Free Hog partition[6]? 6 #注释:从第6个盘片上取空间用于新的盘片
Enter size of partition '0' [262899b, 91c, 128.37mb, 0.13gb]:
Enter size of partition '1' [262899b, 91c, 128.37mb, 0.13gb]:
Enter size of partition '3' [0b, 0c, 0.00mb, 0.00gb]:
Enter size of partition '4' [0b, 0c, 0.00mb, 0.00gb]:
Enter size of partition '5' [70514712b, 24408c, 34431.01mb, 33.62gb]:
Enter size of partition '7' [43335b, 15c, 21.16mb, 0.02gb]: