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