[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#34309: coreutils v. 8.30 – Output ignores paths specified.
From: |
Bernhard Voelker |
Subject: |
bug#34309: coreutils v. 8.30 – Output ignores paths specified. |
Date: |
Mon, 4 Feb 2019 15:50:53 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
tag 34309 notabug
thanks
On 2/4/19 11:59 AM, Ricky Tigg wrote:
> bash v.4.4.23. Output ignores paths specified.Commands executed:
>
> $ df -h
> Filesystem Size Used Avail Use% Mounted on
> devtmpfs 1.9G 0 1.9G 0% /dev
> tmpfs 1.9G 90M 1.8G 5% /dev/shm
> tmpfs 1.9G 1.8M 1.9G 1% /run
> tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
> /dev/mapper/fedora-juuri 18G 7.2G 9.6G 43% /
> tmpfs 1.9G 16K 1.9G 1% /tmp
> /dev/mapper/fedora-koti 894G 6.9G 842G 1% /home
> /dev/sda1 976M 221M 689M 25% /boot
> tmpfs 374M 44K 374M 1% /run/user/1000
> /dev/sdc1 7.3G 34M 6.9G 1% /run/media/yk/USB
>
> $ df -h /run/media/
> Filesystem Size Used Avail Use% Mounted on
________________________________________^^^^^^^^^^
> tmpfs 1.9G 1.8M 1.9G 1% /run
You asked 'df' to output the file system statistics the file/directory
"/run/media" is on. As that directory is not a mount point by itself,
the tools goes up in the hierarchy and finds "/run" in the list
of mount points. That's what it prints, and the column label there-
fore correctly is "Mounted on".
If you want to see the given argument value as well, you need to
specify/add the --output=file column, e.g.:
$ df --output=source,pcent,target,file /run/user
Filesystem Use% Mounted on File
tmpfs 1% /run /run/user
> Expected result: since path '/run/media/' had been specified, a correct
> whole output would be
>
> /dev/sdc1 7.3G 34M 6.9G 1% /run/media/yk/USB
I don't understand: how would the tool know you want it to have statictics
for file system(s) mounted _below_ the given argument? It doesn't work
in that direction ... it works the other way round (see above).
As such, I'm marking this as not a bug in our software. Of course,
feel free to continue the discussion here.
Have a nice day,
Berny