Linux OPS note day6--basic commands

Source: Internet
Author: User

Create a hard disk

cd/dev/

Fdisk-l: Viewing the capacity of a disk partition

Fdisk-l/dev/sda/: View the capacity of the first SCSI hard disk partition

Fdisk-l/dev/hdb/: View the capacity of the second IDE hard disk partition

Man fdisk

ll/proc/: Storage process, hard disk information

Cat/proc/partition: Viewing hard disk partitions

DF: Viewing partitions

df-th: View partition size, in m/g units

Du-sh *: Check the size of all files in the directory

New Hard disk

In VMware:

Hardware--HDD--add

Fdisk-l: See if you are creating a new hard disk

ll/dev/sd*: View all partitions of the first hard drive

Fdisk/dev/sdb: View the second partition of the first hard drive

Fdisk/dev/sdb

Then press the following parameters and actions:

M (man)--p (view)--n (new partition)--p--1--enter--+5g--enter--p

Then create a new extended partition:

N--e--4--enter--enter (press ENTER to default all remaining disk space size to the extended partition)

Fdisk-l (see if new partition for new hard drive is built)

To create a new logical partition in an extended partition:

Fdisk/dev/sdb

p--n--l--enter--+5g--enter--

N--l--enter--enter--enter--p--w

The extended partition is not displayed, divided into a primary partition, two logical partitions.

Mkfs.ext (Press the TAB key)

MKFS.EXT4 (centos6 default to EXT4, Format command MKFS.EXT4)

MKFS.EXT4/DEV/SDB1: Format the first partition of a second SCSI disk

Mkdir/mnt/sdb1

Mount/dev/sdb1/mnt/sdb1

Df-th: You can view new partition of new hard disk

This article is from the "On-the-way" blog, make sure to keep this source http://flakel.blog.51cto.com/10590546/1681741

Linux OPS note day6--basic commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.