CentOS disk management commands

Source: Internet
Author: User
CentOS disk management command dfdiskfree displays disk information df [-aHhiklmPT] [-- block-sze = & lt; block size & gt;] [-t file system type] [-x file system type] parameter:-a or all contains all file system CentOS disk management commands

Df disk free

  • Display disk information
  • Df [-aHhiklmPT] [-- block-sze = <区块大小> ] [-T file system type] [-x file system type]
  • Parameters:
  • -A or all contains all file systems
  • -H: display information in a readable manner
  • -H or-si is the same as-h, but the calculation is 1024 bytes rather
  • -I: displays iNode node information.
  • -L only display the local file system

Dirs.

  • Show directory records
  • Parameters
  • -L display directory completion records similar to pwd

Du disk usage

  • Display directory or file size
  • Parameters:
  • -A: displays the file size in the directory.
  • -B: The number of bytes of the displayed directory or file is large.
  • -H: display information in a readable manner
  • -M: displays information in MB.

Mkdir

  • Create a directory and set permissions
  • Parameters:
  • -M: notifies you to set directory permissions when creating directories.
  • -P recursively create a directory

Mount

  • Interpret the content of an archive into an archive system, and then place it on a location in the directory.
  • -V: Display the program version
  • -H: displays auxiliary information
  • -V displays the proofreading information, which is usually used with-f for debugging.
  • -F is usually used with-a. it will generate a route for each mount action. The responsible system can speed up mounting when a large number of NFS file systems need to be mounted.
  • -T specifies the type of the file system, which is usually not required. Mount automatically selects the correct type.
  • -O remount: remount a mounted file system in different ways
  • Example
  • Mount/dev/hda1 in read-only mode under/mnt
  • # Mount-o ro/dev/hda1/mnt

Pwd

  • Display Working directory

Quota

  • Displays the space used by the disk and its limits.
  • Run this command to check the new disk space limit and used space.
  • Parameters
  • -G: list the group quota.
  • -Q: only list the parts that exceed the limit.
  • -U: list the disk space limits of users.
  • -V displays the quota of storage devices attached to all systems by users or groups.

Quotacheck

  • Check disk space and restrictions
  • After executing this command, the system scans the mounted partitions and generates quota. user and quota. group in the file system of each partition. set the disk quota for users and groups.

Quotaoff

  • Disable disk quota
  • Run this command to disable the disk quota of users and groups.
  • Syntax: quotaoff [-aguv] [file system...]
  • Parameters:
  • -A: disable all partitions added with the quota settings in fstab.
  • -G: disable the disk quota of the group.
  • -U: disable the user's disk quota.

Quotaon

  • Enable disk space limit.
  • Quotaon [-aguv] [file system...]
  • Parameters:
  • -When a is enabled in the/ect/fstab file, the partition space added to the quota settings is limited.
  • -G: enable the disk space limit of the group.
  • -U enables the user's disk space limit.

Repquota

  • Check the disk quota limit status
  • Repquota [-aguv] [file system...]
  • Execute the repquota command to report disk space restrictions and clearly know how much space each user or group has used.
  • Parameters:
  • -A is listed in the/etc/fstab file, which shows the usage of partitions added to the quota settings, including users and groups.
  • -G lists the disk space limits of all groups.
  • -U: list the disk space limits of all users.

Edquota

  • Edit the quota of a user or group.
  • Edquota [-p <源用户名称> ] [-Ug] [user or group name...]
  • By default, edquota uses vi to edit the quota settings of users or groups.
  • Parameters:
  • -U sets the user's quota, which is a preset parameter.
  • -G: set the quota of the group.
  • -P <源用户名称> Apply the quota settings of the source user to other users or groups.
  • -T: Set the grace period.

Stat

  • Displays inode content.
  • Stat [file or directory]
Related Article

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.