site  contact  subhomenews

which utility is deprecated

July 17, 2022 — BarryK

I posted recently that Debian has deprecated the 'which' utility, that we use to find the path of an executable, or check whether it exists. This is also a busybox utility.

James (jamesbond in the forum) replied that he uses "type -p" in Fatdog. I put that one on hold, until today, running Quirky Linux 6.1.0 on my old Acer laptop, which has a Celeron M 410 32-bit CPU, wanting to determine if able to run the Limine Installer on it.

I discovered that Quirky has /usr/bin/which, a script that replaces the busybox which:

type -p "$@"

Well, fancy that, I had completely forgotten. Have placed that in woofQ, so EasyOS will now have that script.

Note, 'type' is not an executable, it is a bash builtin:

I am not surprised that I forgot. I forget so much. I can look at code I wrote several years ago, and it is a foreign language. Ditto some old technical books I wrote a very long time ago, such as "Flow Design for Embedded Systems" (2nd edition) that I wrote in 1999.    

Tags: easy