Get the App
SLTechnology News&Howtos  ›  Servers  › 

Linux to check the usage of native disks

Shulou Source: shulou.com Published: 2022-06-02 01:03:17 09月13日 Update

This article will explain in detail about linux viewing the use of local disks. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

1. View the free space of disk files 1. Brief introduction of the df command

The function of the df command in linux is to check the disk space usage of the file system of the linux server. You can use this command to get information such as how much space the hard disk is occupied and how much space is left.

2. Command format:

Df+ [options] + [File]

3. Use examples

View the current directory disk usage:

Df-h

View the disk usage of the specified directory:

Df-h / data/ II. Specific view of folder occupancy 1. Introduction to the du command

The du command in Linux is used to display the size of the directory or file, and du displays the disk space occupied by the specified directory or file.

2. Command format:

Du [- abcDhHklmsSx] [- L

Tags: Disk command file situation space directory local machine content size folder article more format knowledge introduction article good information function server Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Shulou Tech Info OPPO Reno MariaDB Linux