[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Add --dereference option to df
From: |
Pádraig Brady |
Subject: |
Re: Add --dereference option to df |
Date: |
Wed, 15 May 2013 15:19:07 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
On 05/15/2013 02:55 PM, Ondrej Oprala wrote:
> Hi, this patch adds the --dereference option to df, so if a symlink is
> specified
> as an argument to df (possibly /dev/disk/by-uuid/*), df outputs info about the
> filesystem the symlinked file is on instead. Now, I realize the option's name
> is
> a bit misleading, since the arguments are stat-ed anyway, but IMHO that's
> exactly
> what it looks like from a user's perspective.
I don't get this sorry.
Well the naming is very confusing since symlinks are already deferenced?
Also I don't see a change for your stated example:
$ df -L /dev/disk/by-uuid/3030-3030
Filesystem 1K-blocks Used Available Use% Mounted on
udev 1454732 0 1454732 0% /dev
$ df $(realpath /dev/disk/by-uuid/3030-3030)
Filesystem 1K-blocks Used Available Use% Mounted on
udev 1454732 0 1454732 0% /dev
If I do create a symlink to a different FS,
I'm not sure I get results you're expecting?
$ ln -nsf /dev/shm shm
$ src/df shm
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 1464412 6292 1458120 1% /dev/shm
$ src/df -L shm
Filesystem 1K-blocks Used Available Use% Mounted on
udev 1464412 6292 1458120 1% /dev
thanks,
Pádraig.