Accept any path as argument
jtagcat opened this issue · 11 comments
I often do:
pwd
/home/jc
df -h .
Filesystem Size Used Avail Use% Mounted on
rpool/home 80G 286M 79G 1% /home
Using the argument as 'whatever filesystem is used on this path'.
I'm not sure I get your demand. Aren't you OK with lfs .
or lfs any/path
?
$ lfs .
no disk was found - try
lfs -a
$ lfs -a .
no disk was found - try
lfs -a
This looks like a bug. Can you output lfs
?
/home/jc $ lfs
┌─────────────────────────────────────────────────────┬─────┬─────┬────┬─────────┬────┬────┬───────────────┐
│ filesystem │type │disk │used│ use% │free│size│mount point │
├─────────────────────────────────────────────────────┼─────┼─────┼────┼─────────┼────┼────┼───────────────┤
│/dev/mapper/luks-5450red-acting-this-cute-uid-heref99│btrfs│crypt│341G│34% █▊ │658G│998G│/ │
│/dev/mapper/livec │ext4 │crypt│2.8G│36% █▉ │4.9G│7.7G│/media/jc/livec│
│/dev/sda2 │ext4 │ SSD │330M│32% █▋ │693M│1.0G│/boot │
│/dev/sda1 │vfat │ SSD │ 15M│ 2% ▏ │613M│628M│/boot/efi │
└─────────────────────────────────────────────────────┴─────┴─────┴────┴─────────┴────┴────┴───────────────┘
$ df -h .
Failisüsteem Maht Kasut Vaba Kas% Haagitud
/dev/mapper/luks-5450red-acting-this-cute-uid-heref99 930G 317G 613G 35% /home
Why did df
change compared to the first post ?
Can you please output lfs -j -a
and lsblk
too ?
Why did df change compared to the first post ?
was example from other thing
$ lfs -j -a
[
{
"bound": false,
"dev": {
"major": 0,
"minor": 21
},
"disk": null,
"fs": "proc",
"fs-label": null,
"fs-type": "proc",
"id": 22,
"mount-point": "/proc",
"stats": {
"available": "0",
"bavail": 0,
"bfree": 0,
"blocks": 0,
"bsize": 4096,
"inodes": null,
"size": "0",
"used": "0",
"used-percent": "0%"
}
},
{
"bound": false,
"dev": {
"major": 0,
"minor": 22
},
"disk": null,
"fs": "sysfs",
"fs-label": null,
"fs-type": "sysfs",
"id": 23,
"mount-point": "/sys",
"stats": {
"available": "0",
"bavail": 0,
"bfree": 0,
"blocks": 0,
"bsize": 4096,
"inodes": null,
"size": "0",
"used": "0",
"used-percent": "0%"
}
},
{
"bound": false,
"dev": {
"major": 0,
"minor": 5
},
"disk": null,
"fs": "devtmpfs",
"fs-label": null,
"fs-type": "devtmpfs",
"id": 24,
"mount-point": "/dev",
"stats": {
"available": "4.2M",
"bavail": 1024,
"bfree": 1024,
"blocks": 1024,
"bsize": 4096,
"inodes": {
"avail": 130502,
"files": 131072,
"free": 130502,
"used-percent": "0%"
},
"size": "4.2M",
"used": "0",
"used-percent": "0%"
}
},
{
"bound": false,
"dev": {
"major": 0,
"minor": 6
},
"disk": null,
"fs": "securityfs",
"fs-label": null,
"fs-type": "securityfs",
"id": 25,
"mount-point": "/sys/kernel/security",
"stats": {
"available": "0",
"bavail": 0,
"bfree": 0,
"blocks": 0,
"bsize": 4096,
"inodes": null,
"size": "0",
"used": "0",
"used-percent": "0%"
}
},
{
"bound": false,
"dev": {
"major": 0,
"minor": 23
},
"disk": null,
"fs": "tmpfs",
"fs-label": null,
"fs-type": "tmpfs",
"id": 26,
"mount-point": "/dev/shm",
"stats": {
"available": "8.3G",
"bavail": 2022304,
"bfree": 2022304,
"blocks": 2023414,
"bsize": 4096,
"inodes": {
"avail": 2023392,
"files": 2023414,
"free": 2023392,
"used-percent": "0%"
},
"size": "8.3G",
"used": "4.5M",
"used-percent": "0%"
}
},
{
"bound": false,
"dev": {
"major": 0,
"minor": 24
},
"disk": null,
"fs": "devpts",
"fs-label": null,
"fs-type": "devpts",
"id": 27,
"mount-point": "/dev/pts",
"stats": {
"available": "0",
"bavail": 0,
"bfree": 0,
"blocks": 0,
"bsize": 4096,
"inodes": null,
"size": "0",
"used": "0",
"used-percent": "0%"
}
},
{
"bound": false,
"dev": {
"major": 0,
"minor": 25
},
"disk": null,
"fs": "tmpfs",
"fs-label": null,
"fs-type": "tmpfs",
"id": 28,
"mount-point": "/run",
"stats": {
"available": "3.3G",
"bavail": 808904,
"bfree": 808904,
"blocks": 809366,
"bsize": 4096,
"inodes": {
"avail": 818052,
"files": 819200,
"free": 818052,
"used-percent": "0%"
},
"size": "3.3G",
"used": "1.9M",
"used-percent": "0%"
}
},
{
"bound": false,
"dev": {
"major": 0,
"minor": 26
},
"disk": null,
"fs": "cgroup2",
"fs-label": null,
"fs-type": "cgroup2",
"id": 29,
"mount-point": "/sys/fs/cgroup",
"stats": {
"available": "0",
"bavail": 0,
"bfree": 0,
"blocks": 0,
"bsize": 4096,
"inodes": null,
"size": "0",
"used": "0",
"used-percent": "0%"
}
},
{
"bound": false,
"dev": {
"major": 0,
"minor": 27
},
"disk": null,
"fs": "pstore",
"fs-label": null,
"fs-type": "pstore",
"id": 30,
"mount-point": "/sys/fs/pstore",
"stats": {
"available": "0",
"bavail": 0,
"bfree": 0,
"blocks": 0,
"bsize": 4096,
"inodes": null,
"size": "0",
"used": "0",
"used-percent": "0%"
}
},
{
"bound": false,
"dev": {
"major": 0,
"minor": 28
},
"disk": null,
"fs": "efivarfs",
"fs-label": null,
"fs-type": "efivarfs",
"id": 31,
"mount-point": "/sys/firmware/efi/efivars",
"stats": {
"available": "0",
"bavail": 0,
"bfree": 0,
"blocks": 0,
"bsize": 4096,
"inodes": null,
"size": "0",
"used": "0",
"used-percent": "0%"
}
},
{
"bound": false,
"dev": {
"major": 0,
"minor": 29
},
"disk": null,
"fs": "bpf",
"fs-label": null,
"fs-type": "bpf",
"id": 32,
"mount-point": "/sys/fs/bpf",
"stats": {
"available": "0",
"bavail": 0,
"bfree": 0,
"blocks": 0,
"bsize": 4096,
"inodes": null,
"size": "0",
"used": "0",
"used-percent": "0%"
}
},
{
"bound": false,
"dev": {
"major": 0,
"minor": 32
},
"disk": {
"crypted": true,
"ram": false,
"removable": false,
"rotational": false,
"type": "crypt"
},
"fs": "/dev/mapper/luks-5450red-acting-this-cute-uid-heref99",
"fs-label": null,
"fs-type": "btrfs",
"id": 64,
"mount-point": "/",
"stats": {
"available": "651G",
"bavail": 158880223,
"bfree": 159139715,
"blocks": 243770368,
"bsize": 4096,
"inodes": null,
"size": "998G",
"used": "348G",
"used-percent": "35%"
}
},
{
"bound": false,
"dev": {
"major": 0,
"minor": 20
},
"disk": null,
"fs": "selinuxfs",
"fs-label": null,
"fs-type": "selinuxfs",
"id": 34,
"mount-point": "/sys/fs/selinux",
"stats": {
"available": "0",
"bavail": 0,
"bfree": 0,
"blocks": 0,
"bsize": 4096,
"inodes": null,
"size": "0",
"used": "0",
"used-percent": "0%"
}
},
{
"bound": false,
"dev": {
"major": 0,
"minor": 37
},
"disk": null,
"fs": "systemd-1",
"fs-label": null,
"fs-type": "autofs",
"id": 33,
"mount-point": "/proc/sys/fs/binfmt_misc",
"stats": {
"available": "0",
"bavail": 0,
"bfree": 0,
"blocks": 0,
"bsize": 4096,
"inodes": null,
"size": "0",
"used": "0",
"used-percent": "0%"
}
},
{
"bound": false,
"dev": {
"major": 0,
"minor": 19
},
"disk": null,
"fs": "mqueue",
"fs-label": null,
"fs-type": "mqueue",
"id": 36,
"mount-point": "/dev/mqueue",
"stats": {
"available": "0",
"bavail": 0,
"bfree": 0,
"blocks": 0,
"bsize": 4096,
"inodes": null,
"size": "0",
"used": "0",
"used-percent": "0%"
}
},
{
"bound": false,
"dev": {
"major": 0,
"minor": 7
},
"disk": null,
"fs": "debugfs",
"fs-label": null,
"fs-type": "debugfs",
"id": 35,
"mount-point": "/sys/kernel/debug",
"stats": {
"available": "0",
"bavail": 0,
"bfree": 0,
"blocks": 0,
"bsize": 4096,
"inodes": null,
"size": "0",
"used": "0",
"used-percent": "0%"
}
},
{
"bound": false,
"dev": {
"major": 0,
"minor": 38
},
"disk": null,
"fs": "hugetlbfs",
"fs-label": null,
"fs-type": "hugetlbfs",
"id": 37,
"mount-point": "/dev/hugepages",
"stats": {
"available": "0",
"bavail": 0,
"bfree": 0,
"blocks": 0,
"bsize": 2097152,
"inodes": null,
"size": "0",
"used": "0",
"used-percent": "0%"
}
},
{
"bound": false,
"dev": {
"major": 0,
"minor": 12
},
"disk": null,
"fs": "tracefs",
"fs-label": null,
"fs-type": "tracefs",
"id": 38,
"mount-point": "/sys/kernel/tracing",
"stats": {
"available": "0",
"bavail": 0,
"bfree": 0,
"blocks": 0,
"bsize": 4096,
"inodes": null,
"size": "0",
"used": "0",
"used-percent": "0%"
}
},
{
"bound": false,
"dev": {
"major": 0,
"minor": 39
},
"disk": null,
"fs": "fusectl",
"fs-label": null,
"fs-type": "fusectl",
"id": 39,
"mount-point": "/sys/fs/fuse/connections",
"stats": {
"available": "0",
"bavail": 0,
"bfree": 0,
"blocks": 0,
"bsize": 4096,
"inodes": null,
"size": "0",
"used": "0",
"used-percent": "0%"
}
},
{
"bound": false,
"dev": {
"major": 0,
"minor": 40
},
"disk": null,
"fs": "configfs",
"fs-label": null,
"fs-type": "configfs",
"id": 40,
"mount-point": "/sys/kernel/config",
"stats": {
"available": "0",
"bavail": 0,
"bfree": 0,
"blocks": 0,
"bsize": 4096,
"inodes": null,
"size": "0",
"used": "0",
"used-percent": "0%"
}
},
{
"bound": false,
"dev": {
"major": 0,
"minor": 41
},
"disk": null,
"fs": "tmpfs",
"fs-label": null,
"fs-type": "tmpfs",
"id": 89,
"mount-point": "/tmp",
"stats": {
"available": "8.2G",
"bavail": 2010305,
"bfree": 2010305,
"blocks": 2023415,
"bsize": 4096,
"inodes": {
"avail": 1048394,
"files": 1048576,
"free": 1048394,
"used-percent": "0%"
},
"size": "8.3G",
"used": "54M",
"used-percent": "1%"
}
},
{
"bound": true,
"dev": {
"major": 0,
"minor": 32
},
"disk": {
"crypted": true,
"ram": false,
"removable": false,
"rotational": false,
"type": "crypt"
},
"fs": "/dev/mapper/luks-5450red-acting-this-cute-uid-heref99",
"fs-label": null,
"fs-type": "btrfs",
"id": 93,
"mount-point": "/home",
"stats": {
"available": "651G",
"bavail": 158880223,
"bfree": 159139715,
"blocks": 243770368,
"bsize": 4096,
"inodes": null,
"size": "998G",
"used": "348G",
"used-percent": "35%"
}
},
{
"bound": false,
"dev": {
"major": 8,
"minor": 2
},
"disk": {
"crypted": false,
"ram": false,
"removable": false,
"rotational": false,
"type": "SSD"
},
"fs": "/dev/sda2",
"fs-label": null,
"fs-type": "ext4",
"id": 92,
"mount-point": "/boot",
"stats": {
"available": "693M",
"bavail": 169201,
"bfree": 186404,
"blocks": 249830,
"bsize": 4096,
"inodes": {
"avail": 65429,
"files": 65536,
"free": 65429,
"used-percent": "0%"
},
"size": "1.0G",
"used": "330M",
"used-percent": "32%"
}
},
{
"bound": false,
"dev": {
"major": 8,
"minor": 1
},
"disk": {
"crypted": false,
"ram": false,
"removable": false,
"rotational": false,
"type": "SSD"
},
"fs": "/dev/sda1",
"fs-label": null,
"fs-type": "vfat",
"id": 98,
"mount-point": "/boot/efi",
"stats": {
"available": "613M",
"bavail": 149746,
"bfree": 149746,
"blocks": 153290,
"bsize": 4096,
"inodes": null,
"size": "628M",
"used": "15M",
"used-percent": "2%"
}
},
{
"bound": false,
"dev": {
"major": 253,
"minor": 1
},
"disk": {
"crypted": true,
"ram": false,
"removable": false,
"rotational": false,
"type": "crypt"
},
"fs": "/dev/mapper/livec",
"fs-label": null,
"fs-type": "ext4",
"id": 101,
"mount-point": "/media/jc/livec",
"stats": {
"available": "4.9G",
"bavail": 1188454,
"bfree": 1289343,
"blocks": 1880545,
"bsize": 4096,
"inodes": {
"avail": 483299,
"files": 484800,
"free": 483299,
"used-percent": "0%"
},
"size": "7.7G",
"used": "2.8G",
"used-percent": "37%"
}
},
{
"bound": false,
"dev": {
"major": 0,
"minor": 44
},
"disk": null,
"fs": "binfmt_misc",
"fs-label": null,
"fs-type": "binfmt_misc",
"id": 104,
"mount-point": "/proc/sys/fs/binfmt_misc",
"stats": {
"available": "0",
"bavail": 0,
"bfree": 0,
"blocks": 0,
"bsize": 4096,
"inodes": null,
"size": "0",
"used": "0",
"used-percent": "0%"
}
},
{
"bound": false,
"dev": {
"major": 0,
"minor": 52
},
"disk": null,
"fs": "sunrpc",
"fs-label": null,
"fs-type": "rpc_pipefs",
"id": 322,
"mount-point": "/var/lib/nfs/rpc_pipefs",
"stats": {
"available": "0",
"bavail": 0,
"bfree": 0,
"blocks": 0,
"bsize": 4096,
"inodes": null,
"size": "0",
"used": "0",
"used-percent": "0%"
}
},
{
"bound": false,
"dev": {
"major": 0,
"minor": 61
},
"disk": null,
"fs": "tmpfs",
"fs-label": null,
"fs-type": "tmpfs",
"id": 1084,
"mount-point": "/run/user/1000",
"stats": {
"available": "1.7G",
"bavail": 404199,
"bfree": 404199,
"blocks": 404682,
"bsize": 4096,
"inodes": {
"avail": 404296,
"files": 404682,
"free": 404296,
"used-percent": "0%"
},
"size": "1.7G",
"used": "2.0M",
"used-percent": "0%"
}
},
{
"bound": false,
"dev": {
"major": 0,
"minor": 64
},
"disk": null,
"fs": "portal",
"fs-label": null,
"fs-type": "fuse.portal",
"id": 1291,
"mount-point": "/run/user/1000/doc",
"stats": null
},
{
"bound": false,
"dev": {
"major": 11,
"minor": 0
},
"disk": {
"crypted": false,
"ram": false,
"removable": true,
"rotational": true,
"type": "remov"
}
}
]
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 931,5G 0 disk
├─sda1 8:1 0 600M 0 part /boot/efi
├─sda2 8:2 0 1G 0 part /boot
└─sda3 8:3 0 929,9G 0 part
└─luks-5450red-acting-this-cute-uid-heref99 253:0 0 929,9G 0 crypt /home
/
mmcblk0 179:0 0 7,4G 0 disk
└─mmcblk0p1 179:1 0 7,4G 0 part
└─livec 253:1 0 7,4G 0 crypt /media/jc/livec
zram0 252:0 0 8G 0 disk [SWAP]
@jtagcat for very long log you can do a expand block https://stackoverflow.com/a/52215506/7076153
happy for you I guess... do you have by any chance a plugin that do that ? I didn't loose my time to search this for nothing you know...
I've had a look at your log (sorry for the delay).
The reason the mount isn't shown in standard is because it's a bound mount: displaying it would count some device twice.
You may display it with
lfs -a .