In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Disk partition script
Request
1. List all disks on the current system, let the user choose, and support Q to exit the script. If the user chooses incorrectly, let the user select again. 2. After the user selects it, the mount directory is automatically created. Auto mount #! / bin/bashecho "the disks exist list:" fdisk-l | grep 'disk / dev/sd [a murz]' / / list all disks echo "= =" PS3= "chose which disk you want to create:" / / Please select the disk select VAR in `disk / dev/sd* that you want to create | grep-o'sd [bMuz]'| Uniq` quit do case $VAR in/ / circular sda) Fdisk-l / dev/sda break Sd [bmerz]) # create partitions echo "n p w" | fdisk / dev/$VAR # make filesystem mkfs.xfs-I size=512 / dev/$ {VAR} "1" & > / dev/null / / format # mount the system mkdir-p / data/$ {VAR} "1" & > / dev/null / / Creative Mount point to / dev/null directory / / automatically mount echo-e "/ dev/$ {VAR}" 1 "/ data/$ {VAR}" 1 "xfs defaults 0\ n" > > / etc/fstab mount-a & > / dev/null break ; quit) break;; *) echo "wrong disk,please check again";; esacdone
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.