7. Disk and file Management

Source: Internet
Author: User

1. Hard Drive View data information

Fdisk-l//View details of all current disks

Fdisk-l/dev/sdb//View details of the second disk

2. Create a partition

Fdisk/dev/sdb enter this disk to create a delete partition (W save exit)

2. The system identifies the new partition (for redhat5.9)

Partprobe//load all the disks again, for the hard disk of the first partition, the error is busy, restart

3. Create file System (format)

MKFS.EXT3/DEV/SDB1//Put SDB1 into ext3, convert it into file system

4. Mount the Use

Mkdir-p/data1/game///Create a mount point

Mount/dev/sdb1/data1/game//Mount data to the data game folder

5. Verify the View

Mount | grep sdb1//Verify Mount | grep SDB//View All



Fdisk-l//1. Viewing disk information

Fdisk/dev/sdb//2. Creating a Partition

Partprobe//3. Loading partitions

MKSWAP/DEV/SDB2//4. Formatting a partition

Free-m//5. View Swap

SWAPON/DEV/SDB2//6. Extending the Swap partition

Free-m//7. View Swap

Swapon-s//8. View swap Details

SWAPOFF/DEV/SDB2//9. Unload swap

Free-m//10. View again

Df-h more intuitive viewing of capacity and partitioning

Df-ht to view types

In addition to Fdisk and parted can be partitioned

AutoFS Service




Service AutoFS stop Stop AutoFS Services

Service AutoFS start to open AutoFS services

/data/etc/auto.data//Create a folder under the data directory under the Auto.master file

Create under/etc/auto.data


LS df-h

Mount-o loop/root/desktop/linux.iso/media/Mount Image

Mount//verification or df-h//verification

Mount--bind/abc//DATA/CAD//Mount directory ABC to CAD directory



Mount-a mount all files for/etc/fstab

Umount-a uninstalling all Files of/etc/fstab

Mount of UMOUNT/DEV/SDB1 Imperial load SDB1

E2LABLE/DEV/SDA1 ABC//Modify the volume label named ABC

E2LABLE/DEV/SDA1 ""//Modify the volume label name to NULL

Mount-o Acl/dev/sdb1/data/tools set to a mount that can add permissions

Mkswap-l Swap1 Dev/sda5 Modify the volume label to SWAP5

Open/etc/fstab/file to modify boot automatically load file

This article is from the "Wsyht blog" blog, make sure to keep this source http://wsyht2015.blog.51cto.com/9014030/1790250

7. Disk and file Management

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.