What is the difference between du and df in linux?

王林
Release: 2020-07-18 17:49:42
forward
4916 people have browsed it

What is the difference between du and df in linux?

The difference is as follows:

(Recommended tutorial: linux tutorial)

du command displays the size of the directory or file.

df Displays information about the file system where each is located. The default is to display all file systems.

The file system allocates some of the disk blocks to record some of its own data, such as i nodes, disk distribution maps, indirect blocks, super blocks, etc. This data is invisible to most user-level programs and is often called Meta Data.

The du command is a user-level program that does not consider Meta Data, while the df command looks at the disk allocation map of the file system and considers Meta Data.

The df command obtains the real file system data, while the du command only views part of the file system.

The above is the detailed content of What is the difference between du and df in linux?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:juejin.im
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!