JdeBP

@JdeBP@tty0.social

This is specifically for the command-line and system tools stuff.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

andrew_chou, (edited ) to FreeBSD
@andrew_chou@toot.cafe avatar

no idea how far this will reach but let's try:

if I were to start learning more about one of the listed BSD operating systems, which would you recommend? Guessing the answer could be different if we're talking about daily desktop usage vs server, so maybe clarify your answer via a reply if you can (fwiw, probably more interested in daily desktop usage, but open to whatever too).

#FreeBSD #OpenBSD #NetBSD

JdeBP,

@andrew_chou

Given that you said "learn about" and not "use", and given that you said that you had MacOS, I'd say learn FreeBSD first, then NetBSD, then OpenBSD.

It's worth learning them all.

But is the closest to what you have in MacOS, with there being somewhat of a common heritage from many years ago; will expand your horizons from that, and then is the furthest away from MacOS with very different ideas about almost everything and different abstractions.

nixCraft, (edited ) to linux
@nixCraft@mastodon.social avatar

The #Linux or #Unix terminal 😂👩🏻‍💻

JdeBP,
cks, to random
@cks@mastodon.social avatar

Blog post: You should delete the 'User-Agent' header from outgoing email https://utcc.utoronto.ca/~cks/space/blog/spam/RemoveUserAgentHeader
tl;dr: on today's Internet, why would you want to tell other people what mail client you use, and by implication what platform? Strip this out in your mail submission server, and if you can set your mail clients to do it regardless of your mail submission server.

(I don't know how you do this in common mail clients, like Thunderbird.)

JdeBP,

@cks

You might find https://datatracker.ietf.org/doc/html/draft-melnikov-email-user-agent-00 helpful, for its list of MUAs, and amusing, in that the security and privacy concerns were "TBD".

And the collection of how-tos starts with https://unix.stackexchange.com/q/539561/5132 .

JdeBP,

@cks

It looks like it would be a 1-line patch to new-inject and ofmipd in DJB's mess822. Just drop the header in the very same way that they already drop "Bcc:".

Erwin Hoffmann could probably be persuaded to add it to s/qmail.

@cazabon

nixCraft, to linux
@nixCraft@mastodon.social avatar
  1. Open your , or terminal

  2. Type the following:
    python -m calendar

or

cal

  1. Enjoy!
JdeBP,

@nixCraft

Or

ncal -y -w

Or even

ncal -3 -w

mholt, to random

Well, I inadvertently discovered a zero-day RCE in acme.sh and got a Chinese CA to shut down overnight: https://github.com/acmesh-official/acme.sh/issues/4659

JdeBP,

@Migueldeicaza @mholt @film_girl

I should have kept track of whoever it was commenting the other week about how many machine instructions and conversions to and from machine-readable form it takes to increment a variable by 1.

_math() {
_m_opts="$@"
printf "%s" "$(($_m_opts))"
}

...

_request_retry_times=$(_math "$_request_retry_times" + 1)

RL_Dane, (edited ) to random
@RL_Dane@fosstodon.org avatar

Hey -y peeps (),

Is there a script somewhere (Perl, preferably, or Python, or even a compiled program) that performs
blah |sort |uniq -c |sort -n
in an efficient manner using a dictionary?
Because sorting everything just to get a count with uniq -c seems very slow and wasteful.

SOLUTION, thanks to JdeBP@tty0.social:
awk '{x[$0]++;} END {for(k in x) {print x[k],k;}}'

JdeBP,

@RL_Dane

The traditional better method than sort|uniq is of course

awk '!x[$0]++'

which everyone doing text processing should learn.

So starting from that you can easily arrive at

awk '{x[$0]++;} END {for(k in x) {print x[k],k;}}'

whose output you just need to sort.

JdeBP, to random

Arise, spirit of Charles Cazabon!

https://news.ycombinator.com/item?id=36080564

@cazabon

JdeBP,

@cazabon Sit back and bask in the glory? (-:

https://news.ycombinator.com/item?id=14224019

JdeBP, to random

@zwol

You're on Hacker News again. There are more comments this time than last time. (-:

https://news.ycombinator.com/item?id=36060031

RL_Dane, to random
@RL_Dane@fosstodon.org avatar

I love you, , but 14 seconds to resume from S3 sleep on my stinkpad X200 (and no option for S1 or S2) is starting to get on my nerves.

Just upgraded to 13.2-RELEASE, too.
Still 14 seconds to resume when opening the lid, but with the added benefit of just rebooting when trying to resume with the power button now.

UPDATE: No more reboot when resuming from S3, that seems to have fixed itself, so that's good, but I have no leads on the slowness of resume.

JdeBP,

@RL_Dane @hamishdehmer

I stick to what I said about them 5 years ago. (-:

https://news.ycombinator.com/item?id=17586058

https://news.ycombinator.com/item?id=23546256

With the minor note that the root login shell on finally changed in 2021. I wonder how many books that obsoleted. It had been the C shell for a long time.

JdeBP,

@RL_Dane @hamishdehmer It's Hacker News. It's famously devoid of client-side scripting, or of any sort of complex stuff that you couldn't see in those WWW browsers, or even of pictures. (-: Even displaying a Mastodon post challenges a WWW browser more. Something is wrong somewhere.

cks, to random
@cks@mastodon.social avatar

This is my expression when local (and exclusive) flock() locks on a Linux NFS server don't conflict with POSIX locks obtained over NFS through lockd/NLM/etc. Because these NFS locks may be from flock() on clients.

Augh. This is robot logic and it means 'don't run anything on your NFS servers'.

JdeBP,

@synlogic @cks

The fact that we are still fighting this after some 35 years of people talking about and locks, says something.

JdeBP,
JdeBP,

@josephholsten

Interesting. Another one. At this rate I'm going to have to factor out a list so that I don't keep laboriously repeating the names.

It's worth your having a HISTORY section on your manual page. Speaking from experience of reading HISTORY sections, 20 years from now, people will quietly thank you.

I've tried to do that myself. e.g. http://jdebp.info/Softwares/djbwares/guide/commands/easter.xml#History


@ska @synlogic @cks

JdeBP,

@josephholsten

The interoperability problems are significant. H. Peter Anvin's flock(1) uses flock(2), whereas you are using fcntl(2).

Ironically, this means that is your worst nightmare, because and the BSDs guarantee that those two will (locally) interlock, whereas Linux doesn't and the world has thus got two tools on Linux that don't interlock.

That's going to be a StackExchange answer somewhen.


@ska @synlogic @cks

JdeBP,
pixelherodev, to random

> effort to rewrite sudo in rust

Why would someone go to so much effort to not use doas??

JdeBP,

@RL_Dane @pixelherodev

in the ports tree is the portable one maintained by Jesse Smith.

Per https://github.com/slicer69/doas/issues/15 you are right, and the people who claim that it works on Linux are in fact using a non-OpenBSD fork made by Duncan Overbruck that outright deleted the OpenBSD code in 2019, isn't actually portable any more despite the README, and substitutes a timestamp file for the missing necessary kernel security feature that Linux lacks.

https://github.com/Duncaen/OpenDoas/commit/74449f015ff7a72300be5a27680d2c70af309328

JdeBP,

@RL_Dane @pixelherodev

As you can see from the README and the diff that I gave to you, xe took the portable version, stripped out all of the bits that were conditionally compiled for anything other than Linux, substituted in Linux shadow password and PAM libraries, and added in the file-based timestamp mechanism from sudo.

Worse: This is the official flavour of . The portable one that didn't go back to sudo under the covers is relegated to the AUR.

Toasterson, to random
@Toasterson@chaos.social avatar

Reading this Essay today makes me want a couple more featues in SMF. MacOSX is really a different beast of an OS with interesting capabilities all blocked because it is proprietary. might had some looks into OSX too?

https://blog.darknedgy.net/technology/2020/05/02/0/index.html

JdeBP,

@Toasterson

You want SMF to have more features? Which ones, if so?

Or you want some more of the features that are in SMF to be added to some other system? Which ones, and why?

JdeBP,

@Toasterson

Converting systemd unit files to things suitable for SMF?

Speaking as the only person in the world who has written a unit converter, to my knowledge: this is not a trivial task.

See https://jdebp.uk/Softwares/nosh/guide/commands/convert-systemd-units.xml

@ska has just written up a page on unit file conversions, and xe points out, as I do, that there are architectural mismatches in some areas.

See https://skarnet.org/software/s6/unit-conversion.html

RL_Dane, to linux
@RL_Dane@fosstodon.org avatar

Very minor, but one thing does better than is provide a graphical mouse cursor in text mode (fb).

Kinda cool.

JdeBP,

@RL_Dane @traecer I must remember to put that on the to-do list.

JdeBP,

@RL_Dane @traecer

Adding a pixel-wise mouse pointer to console-fb-realizer:

http://jdebp.info/Softwares/nosh/guide/commands/console-fb-realizer.xml

Mind you, it can handle fonts with the full Unicode range, box cursor shapes, multiple underline styles, and does far more of the ECMA-48 and ITU T.416 attribute and colour systems than either of the Linux or FreeBSD kernel terminal emulators, so where I lag in not having a pixel-wise mouse pointer sprite I am ahead in other areas. (-:

JdeBP,

@RL_Dane @traecer

That's basically the idea, yes. If you've heard of or the old that used to be part of (but was quietly removed from it several years ago, with far less fanfare than when it was originally added) it's the same sort of idea, but structured significantly differently to and more flexibly than those two.

http://jdebp.info/Softwares/nosh/user-vt-screenshots.html

http://jdebp.info/Softwares/nosh/guide/user-virtual-terminals.html

I have version 1.41 in development, delayed because of a planet-wide pandemic and Brexit. (-:

cks, to random
@cks@mastodon.social avatar

So Fedora 38 has chosen to break fgrep and egrep, to the fun of everyone who has them in scripts, especially scripts in crontab entries.

$ fgrep fred /dev/null
fgrep: warning: fgrep is obsolescent; using grep -F

Adding output to standard error is an incompatible change. And this is happening only because the GNU Grep people are <redacted because I cannot think of quite the right phrase>.

JdeBP,

@penguin42 @cks

That's the thing. The GNU egrep and fgrep already are shell scripts. Paul Eggert added this change to those shell scripts.

https://debbugs.gnu.org/cgi/bugreport.cgi?msg=17;att=1;bug=49996;filename=0001-egrep-fgrep-now-obsolete.patch

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • ngwrru68w68
  • everett
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • rosin
  • GTA5RPClips
  • Durango
  • Youngstown
  • slotface
  • khanakhh
  • kavyap
  • DreamBathrooms
  • provamag3
  • tacticalgear
  • osvaldo12
  • tester
  • cubers
  • cisconetworking
  • mdbf
  • ethstaker
  • modclub
  • Leos
  • anitta
  • normalnudes
  • megavids
  • lostlight
  • All magazines