-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Description
Summary
This reveals some additional differences in output compared to GNU du when links and targets are passed as arguments.
One difference was already mentioned in #10241.
- Two hard links are passed as arguments, the -L option does not change the behavior.
# Preparation
mkdir dir1
dd if=/dev/random of=dir1/file count=1
ln dir1/file dir1/link
# GNU dd
$ du dir1/file dir1/link
4 dir1/file
# coreutils dd
$ coreutils du dir1/file dir1/link
4 dir1/file
4 dir1/link
- When both a symlink and its target are included in the arguments.
# Preparation
mkdir dir2
dd if=/dev/random of=dir2/file count=1
ln -s file dir2/link
# GNU dd
du -L dir2/file dir2/link
4 dir2/file
du dir2/file dir2/link
4 dir2/file
0 dir2/link
# coreutils dd
coreutils du -L dir2/file dir2/link
4 dir2/file
4 dir2/link
coreutils du dir2/file dir2/link # it prints the same as GNU du does
4 dir2/file
0 dir2/link
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels