[root@mars ~]# vim /usr/bin/repwis #!/bin/bash for i in `awk -F ':''{print $3}' /etc/group` do echo GID is $i if [ 0 != $i ] ; then find /usr -size -10M -gid $i -execcp -a {} /root/myfiles \; fi done [root@mars ~]# chmod 755 /usr/bin/repwis
[root@venus ~]# fdisk /dev/vdb Welcome to fdisk (util-linux 2.32.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Device does not contain a recognized partition table. Created a new DOS disklabel with disk identifier 0xcad347a4. Command (m forhelp): n Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p): p Partition number (1-4, default 1): 敲回车即可 First sector (2048-41943039, default 2048): 敲回车即可 Last sector, +sectors or +size{K,M,G,T,P} (2048-41943039, default 41943039): +756M Created a new partition 1 of type'Linux' and of size 756 MiB. Command (m forhelp): w The partition table has been altered. Calling ioctl() to re-read partition table. Syncing disks. [root@venus ~]# mkswap /dev/vdb1 Setting up swapspace version 1, size = 756 MiB (792719360 bytes) no label, UUID=5b0302b3-2a08-45a0-ada3-7e6461e2689e [root@venus ~]# swapon /dev/vdb1 [root@venus ~]# vim /etc/fstab # # /etc/fstab # Created by anaconda on Tue Jul 21 05:03:40 2020 # # Accessible filesystems, by reference, are maintained under '/dev/disk/'. # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info. # # After editing this file, run 'systemctl daemon-reload' to update systemd # units generated from this file. # /dev/mapper/rhel-root / xfs defaults 0 0 UUID=2db66eb4-d9c1-4522-8fab-ac074cd3ea0b /boot xfs defaults 0 0 /dev/mapper/rhel-swap swap swap defaults 0 0 /dev/cdrom /media/cdrom iso9660 defaults 0 0 /dev/vdb1 swap swap defaults 0 0
[root@venus ~]# fdisk /dev/vdb Welcome to fdisk (util-linux 2.32.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command.Command (m forhelp): n Partition type p primary (1 primary, 0 extended, 3 free) e extended (container for logical partitions) Select (default p): p Partition number (2-4, default 2): 敲回车即可 First sector (1550336-41943039, default 1550336): 敲回车即可 Last sector, +sectors or +size{K,M,G,T,P} (1550336-41943039, default 41943039): 敲回车即可 Created a new partition 2 of type'Linux' and of size 19.3 GiB. Command (m forhelp): w The partition table has been altered. Syncing disks. [root@venus ~]# pvcreate /dev/vdb2 [root@venus ~]# vgcreate -s 16M qagroup /dev/vdb2 [root@venus ~]# lvcreate -l 60 -n qa qagroup [root@venus ~]# mkfs.ext3 /dev/qagroup/qa [root@venus ~]# vim /etc/fstab # # /etc/fstab # Created by anaconda on Tue Jul 21 05:03:40 2020 # # Accessible filesystems, by reference, are maintained under '/dev/disk/'. # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info. # # After editing this file, run 'systemctl daemon-reload' to update systemd # units generated from this file. # /dev/mapper/rhel-root / xfs defaults 0 0 UUID=2db66eb4-d9c1-4522-8fab-ac074cd3ea0b /boot xfs defaults 0 0 /dev/mapper/rhel-swap swap swap defaults 0 0 /dev/cdrom /media/cdrom iso9660 defaults 0 0 /dev/vdb1 swap swap defaults 0 0 /dev/qagroup/qa /mnt/qa ext3 defaults 0 0 [root@venus ~]# mount -a