Linux Disk Management commands

Source: Internet
Author: User
Tags disk usage

Linux Disk Management commands

DF Disk Free

    • Displays information about the disk
    • DF [-ahhiklmpt] [--block-sze=< chunk size;] [-t file system type] [-X File system type]
    • Parameters:
    • -A or all contains all file systems
    • -h displays information in a high-readability way
    • -H or-si is the same as-H, but is calculated to be 1000bytes instead of 1024
    • -I display inode node information
    • -L Show only the local file system

Dirs.

    • Show Catalog Records
    • Parameters
    • -L display directory completion record similar to PWD

Du disk usage

    • Show directory or File size
    • Parameters:
    • -a displays the file size in the directory
    • -B Displays the directory or file size when it is in byte units
    • -h displays information in a high-readability way
    • -m displays information in units of M.

Mkdir

    • Create a directory and set permissions
    • Parameters:
    • -m notify permission to set directory when directory is established
    • -p recursively Create a directory

Mount

    • Interpret the contents of a file as a file system, and then hang it on top of a directory.
    • -V Displays the program version
    • -H Display Secondary information
    • -V Displays proofing information, usually with-F for debugging
    • -F is usually used with-a, and he generates a stroke for each mount action. The system can speed up the hanging action when it needs to hang a large number of NFS file systems.
    • -t specifies the type of the file system, which is usually not required. Mount will automatically select the correct form.
    • -O remount to mount a mounted file system in a different way
    • Example
    • Hang/dev/hda1 under/mnt with read-only mode
    • #mount-O ro/dev/hda1/mnt

Pwd

    • Show working directory

Quota

    • Displays the space and restrictions that the disk has used
    • Execute this instruction to check the new to disk space limit and how much space has been used
    • Parameters
    • -G Lists group quota limits
    • -Q lists only those parts that are out of limits
    • -U lists the user's disk space limit
    • -V Displays the quota limit for users or groups of storage devices on all mounted systems

Quotacheck

    • Check disk usage space and limitations
    • After executing the instruction, the Mount partition is scanned, the Quota.user and Quota.group are generated under the file system of the partition, and the disk quotas for the users and groups are set.

Quotaoff

    • To turn off disk quota limits
    • Execute this command to turn off disk quota limits for users and groups
    • Syntax: quotaoff[-aguv][file system ...]
    • Parameters:
    • -A closes all partition restrictions that are added to the quota setting in Fstab
    • -G Close Group disk quota limit
    • -U turn off the user's disk quota limit

Quotaon

    • Turn on disk space limits.
    • quotaon[-aguv][file System ...]
    • Parameters:
    • -A opens in the/ect/fstab file, there is a space limit for the partition that joins the quota setting.
    • -G to open the group's disk space limit.
    • -U turns on the user's disk space limit.

Repquota

    • Check disk quota throttling status
    • repquota[-aguv][file System ...]
    • Execute the Repquota instruction to report the status of disk space limits and to know how much space each user or group has used.
    • Parameters:
    • -A is listed in the/etc/fstab file, with the usage status of the partitions added to the quota settings, including users and groups.
    • -g lists the disk space limits for all groups.
    • -U lists the disk space limits for all users.

Edquota

    • Edit the quota of a user or group.
    • edquota[-p< source user name >][-ug][user or group name ...]
    • Edquota presets Use VI to edit quota settings for the user or group
    • Parameters:
    • -U sets the user's quota, which is a preset parameter.
    • -G sets the quota of the group.
    • -p< source user name > apply the quota settings from the source user to another user or group.
    • -T sets the grace period.

Stat

    • Displays inode content.
    • stat[file or directory]
    • <>

      Linux Disk Management 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.