Solved /usr/local/9, pbd and /h

I am looking around FreeBSD and i found a directory named 9 in /usr/local directory.
ls reveals subdirectories: bin etc lib share

I see some command handling apps like awk, cat, date, echo et cetera. I also see a program named pbd. I searched for pbd and couldn't find anything. I serached more and found it associated with pwd:

pbd - prints the base name of the working (current) directory

I played around with the console to see if i could get pbd to do something without an error and i got it to print the basename in front of my username. see pbd.jpg attachment.

fine. so it printed the wd basename but i have to invoke it as a full path: /usr/local/9/bin/pbd
I guess 9 is not in my path and pbd doesn't have an environment variable.

However, i played around some more and found a strange glitch in the console. I meant to type /home && .usr/local/9/bin/pbd but i only typed /h, yet the command worked. see pbd2.jpeg attachment

so my questions are:
why is the directory named 9?

I wonder why i cannot use pbd directly (no such file or directory error).
How is pbd to be used?

I also wonder how /h worked in the first place. Perhaps the system code has a glitch.
does anyone have an explanation?

Thanks for reading,
John (= new to Unix and FreeBSD)
 

Attachments

  • pbd.jpg
    pbd.jpg
    52.1 KB · Views: 27
  • pbd2.jpg
    pbd2.jpg
    33.3 KB · Views: 24
The files inside 9/bin belong to the base system, so I don't think it is a fatfingered port.

I would move it away and see whether anything malfunctions. If not, nuke it later.
 
The files inside 9/bin belong to the base system, so I don't think it is a fatfingered port.
OP mentioned /usr/local, that's not part of the base system. It's also not uncommon for packages to keep their own collection of "system folders" like bin, etc and the likes. (OpenJDK, Go, Cyrus, etc. all do this as well)
 
I am sorry for the late reply, my son has school tomorrow and i'm trying to get him focused after the Easter holiday break. Anyway, i want to Thank everyone for replying. You are wonderful people and very helpful to newbies. I am a stupid Windows only user and i have alot to learn about this system. Thank you for your understanding :)

ShelLuser Thank you! I forgot about pkg which. Dangit! I need to memorize that command option. I ran the command on ascii program and the result was the following: ascii was installed by package 9base. screen capture attached.

VladiBG Bullseye! That is the program reported by pkg which. Thank you very much.

I love this community <3 Very nice and helpful people. I truly appreciate you!

I hope that you have a pleasant day,
John
 

Attachments

  • pkgwhich.jpg
    pkgwhich.jpg
    40.5 KB · Views: 23
Back
Top