I updated my Print Directory
(pd) project page
today. I added a contribution section to the webpage which
includes value-added utilities, updates, and pre-packaged
distributions. If you have a chance, take a look at my open
source project, I'd like to know what you think. There are links
to Print Directory under the "Project"
section of the "Links" on my (this) blog page.
Creating this project under freshmeat.net has been a great experience. I started writing the "pd" utility before I came to Sun, Jan 1991. I started writing it while I was working for Prime Computer (Computervision). The Prime system's used an operation system called PRIMOS, it had a directory listing utility called LD. My first exposure to UNIX was with SunOS 3.x on systems manufactured by Computervision (they had an OEM license to make Sun systems, I think the only one). Using any new OS is challenging, you might know what you want to do but you don't know how to get there. One big thing that frustrated me was UNIX's ls command. I was use to PRIMOS's LD command. It would (by default) display the full pathname of the directory being listed, tell you the number of FILES, show the FILES, tell you the number of SUB-DIRECTORIES and then show the SUB-DIRECTORIES. It was visually very easy to tell which entries, in the current directory, where files (you could edit, view or execute) versus the sub-directories (which you could list). I can't begin to tell you how many times I tried to "more" or "cat" a sub-directory or tried to "cd" to a regular file. I suffered with this problem for a little while until I got use to adding the various options to "ls", which would somehow flag the non-regular files, making it easier (just a little) to "pick-out" the sub-directories. This helped but I still wasn't happy ... I missed PRIMOS's LD command.
I decided to solve this problem myself with the help of a compiler. After figuring out which system calls and library functions gave me what I needed, I had my PRIMOS LD for UNIX. One problem ... I couldn't use "ld", UNIX already had that two-letter command taken. Some other trivial utility called the link-editor was named "ld". The PRIMOS "LD" command became the UNIX "pd" command:
There's a lot more options and features in "pd", please download the package or look at the manpage which has more output examples.
I wish I had contributed this utility to the community a long time ago. The feedback has been great. I got input from co-workers on how to improve the build / distribution process (I had to learn more about autoconf and automake). The community keeps me updated on which platforms they're running the utility on. I recently got contributions and references from people that are posting pre-compiled distributions.
I encourage everyone to consider either starting a open source project or at least contributing to one. You'll get a good felling when you contribute and it's always a great learning experience.
Creating this project under freshmeat.net has been a great experience. I started writing the "pd" utility before I came to Sun, Jan 1991. I started writing it while I was working for Prime Computer (Computervision). The Prime system's used an operation system called PRIMOS, it had a directory listing utility called LD. My first exposure to UNIX was with SunOS 3.x on systems manufactured by Computervision (they had an OEM license to make Sun systems, I think the only one). Using any new OS is challenging, you might know what you want to do but you don't know how to get there. One big thing that frustrated me was UNIX's ls command. I was use to PRIMOS's LD command. It would (by default) display the full pathname of the directory being listed, tell you the number of FILES, show the FILES, tell you the number of SUB-DIRECTORIES and then show the SUB-DIRECTORIES. It was visually very easy to tell which entries, in the current directory, where files (you could edit, view or execute) versus the sub-directories (which you could list). I can't begin to tell you how many times I tried to "more" or "cat" a sub-directory or tried to "cd" to a regular file. I suffered with this problem for a little while until I got use to adding the various options to "ls", which would somehow flag the non-regular files, making it easier (just a little) to "pick-out" the sub-directories. This helped but I still wasn't happy ... I missed PRIMOS's LD command.
I decided to solve this problem myself with the help of a compiler. After figuring out which system calls and library functions gave me what I needed, I had my PRIMOS LD for UNIX. One problem ... I couldn't use "ld", UNIX already had that two-letter command taken. Some other trivial utility called the link-editor was named "ld". The PRIMOS "LD" command became the UNIX "pd" command:
# pd / 54 Entries. 13 Files. .ICEauthority .TTauthority .Xauthority .bash_history .bashrc .dtprofile .esd_auth .fonts.cache-1 .gtkrc-1.2-gnome2 .mysql_history .profile .recently-used strcmp.d 41 Directories. .Trash .dt .gconf .gconfd .gnome .gnome2 .gnome2_private .gstreamer-0.8 .idmgr .java .mcc .metacity .mozilla .nautilus .sunw .vnc Desktop Documents TT_DB bin boot cdrom dev devices etc export home kernel lib lost+found mnt net opt platform proc sbin system tmp usr var vol
There's a lot more options and features in "pd", please download the package or look at the manpage which has more output examples.
I wish I had contributed this utility to the community a long time ago. The feedback has been great. I got input from co-workers on how to improve the build / distribution process (I had to learn more about autoconf and automake). The community keeps me updated on which platforms they're running the utility on. I recently got contributions and references from people that are posting pre-compiled distributions.
I encourage everyone to consider either starting a open source project or at least contributing to one. You'll get a good felling when you contribute and it's always a great learning experience.
Some suggestions, if I may:
1. The listing could use some colors to differentiate between the file.
2. Listing hidden files by default is annoying especially when trying to pd on a home directory. But I made alias pd='pd -n dot'. So it doesn't bother me any more, but you might consider listing the hidden files only if it is explicity requested through an option.
Let me know if you make any more improvements to the program. It will also help people like me if you can document your learning experience with autoconf and automake.
Thanks for sharing.
Posted by Amjidanutpan Ramanujam on May 20, 2005 at 04:31 PM CDT #
You're color idea is great. It's one of those things that's on my "todo" list (I have an ever-growing TODO list ... good topic for a different blog entry). I did look at the different colorized versions of "ls" but that's about as far as I got. Anybody else out there want to do some "coloring between the lines", this is an open source project.
Not showing the hidden files by default was a decision I made way back in the beginning. The PRIMOS system didn't really have "hidden" files so I decided to always show them (maybe I was really doing it rebel against the fact that "ls" didn't show them by default). You implemented the most popular way to hide the hidden files. The "-n dot" option was added just for this reason. Another option is that you could modify the source and/or build process to always hide the hidden file.
I'll post updated here and on freshmeat.net as the project evolves.
Thanks for reading the blog, downloading the code and using it.
Posted by Scott Fehrman on May 20, 2005 at 10:32 PM CDT #
Posted by Denny Watkins on December 08, 2005 at 09:37 AM CST #
I don't think Computervision was the only OEM. I have seen (beautifully designed) OEM Sun hardware from German typesetting company Berthold Ag, for instance...
Posted by Toby on November 19, 2007 at 08:19 AM CST #
Toby,
I didn't know there was another OEM ... thanks for the information. My knowledge of OEM's was what they told me while I was at Computervision/Prime and from what I read in the the two Sun books ... "Sunburst, The Ascent od Sun Microsystems" by Mark Hall and John Barry ... "High Noon, The Inside Story of Scott McNealy and the Rise of Sun Microsystems" by Karen Southwick.
Posted by Scott Fehrman on November 19, 2007 at 10:09 AM CST #