What's the difference between du and df? [duplicate]
Clash Royale CLAN TAG#URR8PPP
up vote
4
down vote
favorite
This question already has an answer here:
Why are there so many different ways to measure disk usage?
4 answers
Why is there a discrepancy in disk usage reported by df and du? [duplicate]
2 answers
I would like to know exactly what du
and df
mean.
The following is an example of the output of the df
command.
Filesystem Size Used Avail Use% Mounted on
ubi0:rootfs 435M 424M 12M 98% /
devtmpfs 88M 4.0K 88M 1% /dev
tmpfs 248M 0 248M 0% /dev/shm
tmpfs 248M 8.4M 240M 4% /run
tmpfs 248M 0 248M 0% /sys/fs/cgroup
tmpfs 248M 0 248M 0% /tmp
tmpfs 248M 72K 248M 1% /var/volatile
And here's the output of du
(run in the /
directory)
$ du -sh home
255M home
$ du -sh usr
264M usr
I thought that ubi0:rootfs
included /home
and /usr
, but the sum of them, 519M, is larger than the ubi0:rootfs
size, 435M.
The result of the free
command is as follows.
total used free shared buff/cache available
Mem: 495M 55M 50M 8.4M 389M 420M
Swap: 0B 0B 0B
At first I thought the difference is due to ramdisk, but the free
command shows RAM is not used so much.
What is the exact difference between du
and df
(or is the /usr
dir special)?
linux disk-usage disk ram
marked as duplicate by Kusalananda, Romeo Ninov, EightBitTony, terdon⦠Dec 15 '17 at 11:36
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |Â
up vote
4
down vote
favorite
This question already has an answer here:
Why are there so many different ways to measure disk usage?
4 answers
Why is there a discrepancy in disk usage reported by df and du? [duplicate]
2 answers
I would like to know exactly what du
and df
mean.
The following is an example of the output of the df
command.
Filesystem Size Used Avail Use% Mounted on
ubi0:rootfs 435M 424M 12M 98% /
devtmpfs 88M 4.0K 88M 1% /dev
tmpfs 248M 0 248M 0% /dev/shm
tmpfs 248M 8.4M 240M 4% /run
tmpfs 248M 0 248M 0% /sys/fs/cgroup
tmpfs 248M 0 248M 0% /tmp
tmpfs 248M 72K 248M 1% /var/volatile
And here's the output of du
(run in the /
directory)
$ du -sh home
255M home
$ du -sh usr
264M usr
I thought that ubi0:rootfs
included /home
and /usr
, but the sum of them, 519M, is larger than the ubi0:rootfs
size, 435M.
The result of the free
command is as follows.
total used free shared buff/cache available
Mem: 495M 55M 50M 8.4M 389M 420M
Swap: 0B 0B 0B
At first I thought the difference is due to ramdisk, but the free
command shows RAM is not used so much.
What is the exact difference between du
and df
(or is the /usr
dir special)?
linux disk-usage disk ram
marked as duplicate by Kusalananda, Romeo Ninov, EightBitTony, terdon⦠Dec 15 '17 at 11:36
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
What filesystem?
â muru
Dec 15 '17 at 7:46
The fs is ubifs installed on NAND.
â user8257918
Dec 15 '17 at 8:34
In that case, you should check ubifs docs to see if classic tools likedf
anddu
can even produce meaningful values for it. This is not the case for some modern filesystems, like btrfs, for example. Otherwise you'd be trying to make sense out of garbage output.
â muru
Dec 15 '17 at 8:37
1
Directory "/home" can contain hardlinks to files in "/usr"?
â LXA
Dec 15 '17 at 8:40
What do you get withdu -shc home usr
(that is one du invocation for both)? Whatdu
implementation is it?
â Stéphane Chazelas
Dec 15 '17 at 11:22
add a comment |Â
up vote
4
down vote
favorite
up vote
4
down vote
favorite
This question already has an answer here:
Why are there so many different ways to measure disk usage?
4 answers
Why is there a discrepancy in disk usage reported by df and du? [duplicate]
2 answers
I would like to know exactly what du
and df
mean.
The following is an example of the output of the df
command.
Filesystem Size Used Avail Use% Mounted on
ubi0:rootfs 435M 424M 12M 98% /
devtmpfs 88M 4.0K 88M 1% /dev
tmpfs 248M 0 248M 0% /dev/shm
tmpfs 248M 8.4M 240M 4% /run
tmpfs 248M 0 248M 0% /sys/fs/cgroup
tmpfs 248M 0 248M 0% /tmp
tmpfs 248M 72K 248M 1% /var/volatile
And here's the output of du
(run in the /
directory)
$ du -sh home
255M home
$ du -sh usr
264M usr
I thought that ubi0:rootfs
included /home
and /usr
, but the sum of them, 519M, is larger than the ubi0:rootfs
size, 435M.
The result of the free
command is as follows.
total used free shared buff/cache available
Mem: 495M 55M 50M 8.4M 389M 420M
Swap: 0B 0B 0B
At first I thought the difference is due to ramdisk, but the free
command shows RAM is not used so much.
What is the exact difference between du
and df
(or is the /usr
dir special)?
linux disk-usage disk ram
This question already has an answer here:
Why are there so many different ways to measure disk usage?
4 answers
Why is there a discrepancy in disk usage reported by df and du? [duplicate]
2 answers
I would like to know exactly what du
and df
mean.
The following is an example of the output of the df
command.
Filesystem Size Used Avail Use% Mounted on
ubi0:rootfs 435M 424M 12M 98% /
devtmpfs 88M 4.0K 88M 1% /dev
tmpfs 248M 0 248M 0% /dev/shm
tmpfs 248M 8.4M 240M 4% /run
tmpfs 248M 0 248M 0% /sys/fs/cgroup
tmpfs 248M 0 248M 0% /tmp
tmpfs 248M 72K 248M 1% /var/volatile
And here's the output of du
(run in the /
directory)
$ du -sh home
255M home
$ du -sh usr
264M usr
I thought that ubi0:rootfs
included /home
and /usr
, but the sum of them, 519M, is larger than the ubi0:rootfs
size, 435M.
The result of the free
command is as follows.
total used free shared buff/cache available
Mem: 495M 55M 50M 8.4M 389M 420M
Swap: 0B 0B 0B
At first I thought the difference is due to ramdisk, but the free
command shows RAM is not used so much.
What is the exact difference between du
and df
(or is the /usr
dir special)?
This question already has an answer here:
Why are there so many different ways to measure disk usage?
4 answers
Why is there a discrepancy in disk usage reported by df and du? [duplicate]
2 answers
linux disk-usage disk ram
edited Dec 15 '17 at 8:42
Zanna
2,4311023
2,4311023
asked Dec 15 '17 at 7:43
user8257918
29114
29114
marked as duplicate by Kusalananda, Romeo Ninov, EightBitTony, terdon⦠Dec 15 '17 at 11:36
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Kusalananda, Romeo Ninov, EightBitTony, terdon⦠Dec 15 '17 at 11:36
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
What filesystem?
â muru
Dec 15 '17 at 7:46
The fs is ubifs installed on NAND.
â user8257918
Dec 15 '17 at 8:34
In that case, you should check ubifs docs to see if classic tools likedf
anddu
can even produce meaningful values for it. This is not the case for some modern filesystems, like btrfs, for example. Otherwise you'd be trying to make sense out of garbage output.
â muru
Dec 15 '17 at 8:37
1
Directory "/home" can contain hardlinks to files in "/usr"?
â LXA
Dec 15 '17 at 8:40
What do you get withdu -shc home usr
(that is one du invocation for both)? Whatdu
implementation is it?
â Stéphane Chazelas
Dec 15 '17 at 11:22
add a comment |Â
What filesystem?
â muru
Dec 15 '17 at 7:46
The fs is ubifs installed on NAND.
â user8257918
Dec 15 '17 at 8:34
In that case, you should check ubifs docs to see if classic tools likedf
anddu
can even produce meaningful values for it. This is not the case for some modern filesystems, like btrfs, for example. Otherwise you'd be trying to make sense out of garbage output.
â muru
Dec 15 '17 at 8:37
1
Directory "/home" can contain hardlinks to files in "/usr"?
â LXA
Dec 15 '17 at 8:40
What do you get withdu -shc home usr
(that is one du invocation for both)? Whatdu
implementation is it?
â Stéphane Chazelas
Dec 15 '17 at 11:22
What filesystem?
â muru
Dec 15 '17 at 7:46
What filesystem?
â muru
Dec 15 '17 at 7:46
The fs is ubifs installed on NAND.
â user8257918
Dec 15 '17 at 8:34
The fs is ubifs installed on NAND.
â user8257918
Dec 15 '17 at 8:34
In that case, you should check ubifs docs to see if classic tools like
df
and du
can even produce meaningful values for it. This is not the case for some modern filesystems, like btrfs, for example. Otherwise you'd be trying to make sense out of garbage output.â muru
Dec 15 '17 at 8:37
In that case, you should check ubifs docs to see if classic tools like
df
and du
can even produce meaningful values for it. This is not the case for some modern filesystems, like btrfs, for example. Otherwise you'd be trying to make sense out of garbage output.â muru
Dec 15 '17 at 8:37
1
1
Directory "/home" can contain hardlinks to files in "/usr"?
â LXA
Dec 15 '17 at 8:40
Directory "/home" can contain hardlinks to files in "/usr"?
â LXA
Dec 15 '17 at 8:40
What do you get with
du -shc home usr
(that is one du invocation for both)? What du
implementation is it?â Stéphane Chazelas
Dec 15 '17 at 11:22
What do you get with
du -shc home usr
(that is one du invocation for both)? What du
implementation is it?â Stéphane Chazelas
Dec 15 '17 at 11:22
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
What filesystem?
â muru
Dec 15 '17 at 7:46
The fs is ubifs installed on NAND.
â user8257918
Dec 15 '17 at 8:34
In that case, you should check ubifs docs to see if classic tools like
df
anddu
can even produce meaningful values for it. This is not the case for some modern filesystems, like btrfs, for example. Otherwise you'd be trying to make sense out of garbage output.â muru
Dec 15 '17 at 8:37
1
Directory "/home" can contain hardlinks to files in "/usr"?
â LXA
Dec 15 '17 at 8:40
What do you get with
du -shc home usr
(that is one du invocation for both)? Whatdu
implementation is it?â Stéphane Chazelas
Dec 15 '17 at 11:22