Does command du use dnf?

Hello,
I was reading the thread /boot is full where the OP used the command
du -sm /boot/efi /boot/grub2 /boot/loader /boot/lost+found
I copied this into the terminal and saw this:

du -sm /boot/efi /boot/grub2 /boot/loader /boot/lost+found
[sudo] password for jan: 
sudo: dnf: command not found

The man page for command du says nothing about the use of dnf, which I think would be strange if it did.
I tried it by using:

du -sm /boot/efi
sudo: dnf: command not found

But that didn’t change anything. I thought it could be caused by the fact that /boot/loader is not a directory but a link.
Or is this a bug?

On regular Fedora 43,

the command you posted du -sm /boot/efi /boot/grub2 /boot/loader /boot/lost+found returns

[user@fedora ~]$ du -sm /boot/efi /boot/grub2 /boot/loader /boot/lost+found
du: cannot read directory '/boot/efi': Permission denied
1	/boot/efi
du: cannot read directory '/boot/grub2': Permission denied
1	/boot/grub2
du: cannot read directory '/boot/loader/entries': Permission denied
1	/boot/loader
du: cannot read directory '/boot/lost+found': Permission denied
1	/boot/lost+found

and du works properly.

So it looks like Kinoite has some differences - maybe du does not work as intended there?

Yes, it looks like it. But wouldn’t that be strange? I mean it is a command to see how much space on the disc, or in a directory is used. Seems to me to be a normal Linux command, nothing having to do with dnf.

If Kinoite is normal, it is a new normal, so unsurprising that all the old commands don’t work - especially ones involving file systems.

What are the replacements for du ?

I like the software baobab to look at file structures - does that work on Kinoite?

I suspect that du is some alias or whatever in your shell.

What gives:

  • /bin/du -sm /boot/efi
  • rpm -qf /bin/du

If you are using bash: type du

I feel so stupid right now.

I have created aliases in .bashrc for commands I sometimes use, or better used in the regular KDE edition. One of them is du which stands for sudo dnf uninstall. Because of using Kinoite I don’t use these at the moment and I forgot all about them. I will change the .bashrc file so these aliases don’t work anymore.
Thank you so much @francismontagnac .

1 Like

I do the same, but the caveat is that you should be careful and never create an alias that supercedes a system command (unless the intent is ensure the system command is never used unintentionally or to enhance the command such as is done by default for grep on Workstation)

$ alias grep
alias grep='grep --color=auto'

The alias command can tell you all the aliases that are defined for your user.