Blog: 2023-07-18

From razwiki
Revision as of 18:37, 18 July 2023 by Razzi (talk | contribs)
Jump to navigation Jump to search

List installed debian packages by size

dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n

link

But what are the units here? kilobytes? probably. But would be nice to have units. Powershell style structured output could be useful here.

Nice browser of installed packages: dpkg --list

Journalctl shows all messages you can see by default: journalctl

Tail messages with journalctl with -f for follow:

journalctl -f

Thinking about recursive git clones. also how some command line tools are pretty much like functions, and how therefore a programming environment could be built up function by function rather than pulling in a huge package like python. But batteries included makes for a lot of ease

After struggling a bit with trying to display from a line of a file to the end (in this case "Description:" to match apt show) I was reminded of a terminal feature I heard of, where it would automatically page outputs such that you'd see the first lines of output from a command, or the whole output if it fit on a screen. I think that was a plan 9 feature. Ended up going with a 2-part command - use grep to find the start line, then use tail to start from that line, to the end

This process was made much more cumbersome by having multiple package versions report their info... I'd like <coded>apt show to only show the installed version (are multiple versions installed for these packages?)