Chinaunix首页 | 论坛 | 博客
  • 博客访问: 239355
  • 博文数量: 91
  • 博客积分: 2010
  • 博客等级: 大尉
  • 技术积分: 955
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-12 09:38
文章分类

全部博文(91)

文章存档

2017年(1)

2011年(1)

2008年(15)

2007年(74)

我的朋友

分类: LINUX

2007-08-23 16:49:43

fdisk:
 /sbin/fdisk this is the real path.version redhat 9.0
 only superuser have the permission to running the command
 frequently used commands
  a toggle(触发器,系紧) the bootable on/off for a primary partition
 d delete a partition.you are prompted for the partition number to delete.if you delete a logical partition when higher numbered logical partitions exist.the partition numbers are decremented(减少,减少量,渐减) to keep logical partition numbers contiguous.
  l list the known partion types. a table of partition types is printed
  m display the primary help menu for those commands
  n add a new partition.you are prompted for the partition type(primary,extended,or logical),for primary and extended partitions,you are asked for the partition(1-4).for logical partitions.the next logical partiton number is selected automatically.
  p display the partition table as it exists in memory.this depiction wil differ from the actual partition table on disk if change have not been saved.
  t change a partition's system ID,this is an octal number that indicates the type of filesystem the partition is to contain. linux ext2 partitions are type 83,and linux swap partition are type 82.
  w write(save) the partition table to disk and exit. no changes are saved until the w command is issued.
  example
  #/sbin/fsck /dev/hdc
  command (m for help) :p
  .....
  command (m for help) :q
  example 2
  #/sbin/fsck /dev/hdc
  command (m for help) :n
  e extended
  p primary partition(1-4)
  p
  partiton number(1-4):1
  first cylinder(..):
  using default value
  last cylinder or +size or sizeM or +sizeK(..):300M
  command (m for help) :a
  partition number(1-4):1
  command (m for help) :n
  e extended
  p primary partition(1-4)
  e
  partition number(1-4):2
  first cylinder(..):
   using default value
   last cylinder or +size or sizeM or +sizeK(..):
   use the default value
   command (m for help) :n
   command action
    1 logical(5 or over)
    p primary partition(1-4)
    1
    first cylinder(..):
   using default value
   last cylinder or +size or sizeM or +sizeK(..):+200M
   command (m for help) :n
   command action
    1 logical(5 or over)
    p primary partition(1-4)
    1
    first cylinder(..):
   using default value
   last cylinder or +size or sizeM or +sizeK(..):+200M
   command (m for help) :t
   partition number(1-6):6
   hex code(type L to list codes):82
   change system type of partition 6 to 82(linux swap)
   command (m for help) :n
   command action
    1 logical(5 or over)
    p primary partition(1-4)
    1
    first cylinder(..):
   using default value
   last cylinder or +size or sizeM or +sizeK(..):
   use the default value
   command (m for help) :p
   ,.......
   command (m for help) :w
   #
   note the use of default for the partition start cylinders(柱面) and for end cylinder selections, indicated by in the example. other partition sizes are specified in megabytes using responses such as +128M
   
mkfs
 /sbin/mkfs this is the real path
make a filesystem of type fstype on device.the fs-type is either ext2 or msdos.
 -c check device for bad blocks(mke2fs and mkdosfs)
 -L label set the volume label for the filesystem(mke2fs only)
 -n tabel set the 11-character volume label for the filesystem(mkdosfs only)
 -q uses mkfs in quiet mode.resulting in very little output(mke2fs only)
 -v used to enter vervose mode(mke2fs and mkdosfs)
example /sbin/mikfs -t ext2 -L rootfs -cv /dev/hda3
 create an ext2 filesystem labeled rootfs on exiting partiong /dev/hda3.checking for bad blocks and with full verbose output.
 
mkswap
  note the command I can'
t find on my pc(version is redhat 9.0)
  description:
 prepare a partition for use an swap space. this command can also set up swap space in a file on another filesystem.
example:
 $mkswap /dev/hda5

阅读(775) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~