
Unix Toolbox (2008) - rodrigo975
http://cb.vu/unixtoolbox.xhtml
======
JdeBP
Some errors, just from the first few sections alone.

From section 1:

* "man hier" is out of date, alas. [https://unix.stackexchange.com/a/567405/5132](https://unix.stackexchange.com/a/567405/5132)

* If one is going to have a Linux/FreeBSD/Solaris split, one needs to apply it to section 1. "lsbrelease" is a Linux-based operating system only command.

* Debian now includes /etc/os-release . Interestingly, so too does DragonFlyBSD (but not FreeBSD).

* "last reboot" has been supposedly superseded in systemd operating systems, by "journalctl -b".

* "atacontrol" was superseded by "camcontrol" in FreeBSD back in 2012. [https://www.freebsd.org/releases/9.0R/relnotes-detailed.html...](https://www.freebsd.org/releases/9.0R/relnotes-detailed.html#AEN1308)

* Not even everyone has /var/log/messages any more, or /var/log/warn . Even Debian has, just last month, made the systemd journal its primary on-disc storage.

* Use "vipw" to avoid having to remember to recompile master.passwd . It respects $EDITOR .

* Most Linux operating systems do not use run levels _at all_ now. [http://jdebp.uk./FGA/run-levels-are-history.html](http://jdebp.uk./FGA/run-levels-are-history.html)

In section 2:

* The ps flags are 30 years out of date for the BSDs. BSD switched ps to use getopt() at the start of the 1990s, and they've officially started with a minus sign all of that time since.

* The better trace program on FreeBSD, and the only one on OpenBSD, is the original BSD ktrace/kdump .

In section 3:

* FreeBSD partitioning is done with "gpart".

I stopped there. There are probably some howlers under installation and
shells, given how outdated some of the other stuff was. Debian and Ubuntu
changed /bin/sh to the Debian Almquist shell a decade and a bit ago. FreeBSD
replaced pkg with pkg-ng in version 9. These are two very common errors that I
see.

~~~
JadeNB
A lot of these seem to be issues with out-of-date information, which is not
unreasonable for a 12-year-old document.

~~~
JdeBP
Dated 2016, revision 14.5, if you look.

------
dang
A thread from 2015:
[https://news.ycombinator.com/item?id=10022729](https://news.ycombinator.com/item?id=10022729)

2010:
[https://news.ycombinator.com/item?id=1411075](https://news.ycombinator.com/item?id=1411075)

~~~
anonsivalley652
Thank you @dang for your tireless, thankless modding and curation.

:prayer hands emoji here:

~~~
request_id
He must have something that automatically pastes dates of already posted urls
in his view of the site

------
MichaelMoser123
Is there a tool that returns linux system information in json format, that
works for most kernel versions and / is actively supported? i think it would
be easier to pipe through jq in order to get a desired value, rather then pipe
through grep/awk/sed.

~~~
bkq
There's jc [1], that can return the JSON output of standard Linux CLI tools.

[1] -
[https://github.com/kellyjonbrazil/jc](https://github.com/kellyjonbrazil/jc)

~~~
fizixer
Off-topic: Whenever I start thinking about json (or xml) I get lost in the
turtle tower of metadata.

Like 'jc ls' gives json output with following entry format: { "filename":
"[actual-filename-string]" }

Then I start asking: why not simply { "[actual-filename-string]" } ?

But then why stop at keyword value pairs? Why not:

{ "keyword": "filename", "value": "[actual-filename-string]" }

But then why not:

{ { "metakeyword": "keyword", "metavalue": "filename" }, { "metakeyword":
"value", "metavalue": "[actual-filename-string]" } }

And so on.

Surely I can't be the only one. Would love to have this discussed, where to
draw the line (and why), what's the utility, and so on.

~~~
Xophmeister

        { "[actual-filename-string]" }
    

...isn't valid JSON. As for going up the metatower, my personal take on this
would be to strive for brevity. That is, what's the least structure we can get
away with to unambiguously serialise what is needed? In most(?) cases, this is
probably best:

    
    
        { "filename": "whatever", "foo": "bar", "etc": "etc" }
    

However, _maybe_ there are instances where:

    
    
        [
          { "attribute": "filename", "value": "whatever" },
          { "attribute": "foo", "value": "bar" },
          { "attribute": "etc", "value": "etc" }
        ]
    

...is more appropriate. If, for example, you need to encode a flexible schema,
rather than a fixed one.

~~~
swiley
If brevity is what you want then what’s wrong with the default field record ls
output? It’s even a regular language!

------
dredmorbius
For fun: [http://cb.vu](http://cb.vu)

------
tomrod
I've needed this for a long time!

One word: anyone know why it Firefox mobile can't scale the page text up? No
issue on Brave/Chrome mobile.

------
saagarjha
I spy some Windows ;)

~~~
Koshkin
Probably worth reading, then.

