On Wed 11 Mar 2020 at 13:57:37 (+0100), to...@tuxteam.de wrote: > On Wed, Mar 11, 2020 at 08:41:08AM -0400, Greg Wooledge wrote: > > On Wed, Mar 11, 2020 at 01:21:17PM +0100, to...@tuxteam.de wrote: > > > On Wed, Mar 11, 2020 at 01:02:59PM +0100, Albretch Mueller wrote: > > > > with your help I found a way around it (here is my silly scripting): > > > > > > > > $ sudo _DF=$(df -h) > > > > > > I don't think you need "sudo" for "df"? > > > > And a good thing, too, because that syntax is completely wrong. > > > > wooledg:~$ sudo x=$(id) > > usage: sudo -h | -K | -k | -V > > [...] > > > I think what Albretch was *trying* to do was this: > > > > _DF=$(sudo df -h) > > d'oh. Didn't catch that one. Of course it's "df" who gets to see > the "=", not the surrounding shell. Thank you for your (as usual) > sharp eye, especially in shell things.
Well, I'm glad that's all sorted. Now all I've got to figure out is the connection between df and whoami. $ whoami david $ df -h --all Filesystem Size Used Avail Use% Mounted on sysfs 0 0 0 - /sys proc 0 0 0 - /proc udev 203M 0 203M 0% /dev devpts 0 0 0 - /dev/pts tmpfs 44M 2.8M 41M 7% /run /dev/sda1 28G 9.2G 17G 36% / securityfs 0 0 0 - /sys/kernel/security tmpfs 216M 0 216M 0% /dev/shm tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 216M 0 216M 0% /sys/fs/cgroup cgroup2 0 0 0 - /sys/fs/cgroup/unified cgroup 0 0 0 - /sys/fs/cgroup/systemd pstore 0 0 0 - /sys/fs/pstore bpf 0 0 0 - /sys/fs/bpf cgroup 0 0 0 - /sys/fs/cgroup/cpuset cgroup 0 0 0 - /sys/fs/cgroup/memory cgroup 0 0 0 - /sys/fs/cgroup/net_cls,net_prio cgroup 0 0 0 - /sys/fs/cgroup/rdma cgroup 0 0 0 - /sys/fs/cgroup/devices cgroup 0 0 0 - /sys/fs/cgroup/blkio cgroup 0 0 0 - /sys/fs/cgroup/perf_event cgroup 0 0 0 - /sys/fs/cgroup/cpu,cpuacct cgroup 0 0 0 - /sys/fs/cgroup/freezer cgroup 0 0 0 - /sys/fs/cgroup/pids systemd-1 - - - - /proc/sys/fs/binfmt_misc hugetlbfs 0 0 0 - /dev/hugepages debugfs 0 0 0 - /sys/kernel/debug mqueue 0 0 0 - /dev/mqueue /dev/sdb4 29G 45M 28G 1% /ya /dev/sda2 28G 7.5G 19G 29% /wasps /dev/sdb5 29G 45M 28G 1% /yb /dev/dm-0 399G 25G 354G 7% /home /dev/dm-1 399G 356G 24G 94% /agoghome tmpfs 44M 0 44M 0% /run/user/1000 binfmt_misc 0 0 0 - /proc/sys/fs/binfmt_misc $ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 465.8G 0 disk ├─sda1 8:1 0 28G 0 part / ├─sda2 8:2 0 27.8G 0 part /wasps ├─sda3 8:3 0 406.1G 0 part │ └─luks-cf12acf3-e36b-4b12-9973-8df97bcc0f2f 253:0 0 406G 0 crypt /home └─sda4 8:4 0 4G 0 part [SWAP] sdb 8:16 0 465.8G 0 disk ├─sdb1 8:17 0 3M 0 part ├─sdb2 8:18 0 496M 0 part ├─sdb3 8:19 0 500M 0 part ├─sdb4 8:20 0 29.3G 0 part /ya ├─sdb5 8:21 0 29.3G 0 part /yb └─sdb6 8:22 0 406.2G 0 part └─luks-98f15f4c-e3fc-45f3-aa15-3774e012e996 253:1 0 406.2G 0 crypt /agoghome sr0 11:0 1 1024M 0 rom $ df -h --all | grep -e 'Filesystem ' -e $(whoami) Filesystem Size Used Avail Use% Mounted on $ Cheers, David.