linux命令之parted
1.parted介绍
parted是Linux系统中用于磁盘分区的工具,支持多种文件系统,如xfs、ext4、ext2、NTFS、FAT32等;parted支持现代的GPT分区方案,可以处理超过2TB的大磁盘,而传统的MBR分区方案则不支持这么大的磁盘。
2.parted用法
parted [options] [device] [command [arguments]]
device:目标磁盘,例如:/dev/sdb, /dev/sdc等;
command:具体操作,例如创建或调整分区大小等;
[root@rhel77 device]# parted --help
Usage: parted [OPTION]... [DEVICE [COMMAND [PARAMETERS]...]...]
Apply COMMANDs with PARAMETERS to DEVICE. If no COMMAND(s) are given, run in
interactive mode.
OPTIONs:
-h, --help displays this help message
-l, --list lists partition layout on all block devices
-m, --machine displays machine parseable output
-s, --script never prompts for user intervention
-v, --version displays the version
-a, --align=[none|cyl|min|opt] alignment for new partitions
COMMANDs:
align-check TYPE N check partition N for TYPE(min|opt)
alignment
help [COMMAND] print general help, or help on
COMMAND
mklabel,mktable LABEL-TYPE create a new disklabel (partition
table)
mkpart PART-TYPE [FS-TYPE] START END make a partition
name NUMBER NAME name partition NUMBER as NAME
print [devices|free|list,all|NUMBER] display the partition table,
available devices, free space, all found partitions, or a particular
partition
quit exit program
rescue START END rescue a lost partition near START
and END
resizepart NUMBER END resize partition NUMBER
rm NUMBER delete partition NUMBER
select DEVICE choose the device to edit
disk_set FLAG STATE change the FLAG on selected device
disk_toggle [FLAG] toggle the state of FLAG on selected
device
set NUMBER FLAG STATE change the FLAG on part

1508

被折叠的 条评论
为什么被折叠?



