![]() |
James Thornton |
| Internet Business Consultant |
| Home | Blog | Bio | Projects | Contact | Latest Blog (new site): How to Get to Genius |
|---|
"Linux Gazette...making Linux just a little more fun!"
A Brief History of the 'ls' commandBy Eric Fischer
The ls command, which lists files, is one of the most essential utilities for Unix and Linux users and, not surprisingly, one of the oldest. In its earliest form it was called listf and was available on the Massachusetts Institute of Technology's Compatible Time Sharing System (CTSS) by July, 1961. By 1963, there were a few options that could be used to vary what listf would list:
In 1965, listf was extended to recognize ``*'' as a way to list all files that matched a specific pattern, with further improvements to the pattern matching in an updated version dated January 3, 1966. The 1966 version also generalized the syntax and added lots of options, including:
When CTSS was superseded by Multics, the listf command was renamed to list, which could optionally be abbreviated to ls. The early version of ls had fewer options than late versions of listf had, but still included, along with a few others:
When Bell Labs dropped out of Multics development in 1969 and work began on Unix, only the abbreviated name of list, ls, was retained. The First Edition (November 3, 1971) Unix manual documented the following options for ls, all of which are still available today:
By the Fifth Edition (manual page dated March 20, 1974) the list of options for ls had expanded to include:
The Sixth Edition (May, 1975) added one more:
In May and August, 1977, Bill Joy made some modifications of his own to ls at the University of California, Berkeley, which he subsequently distributed as part of the First Berkeley Software Distribution, 1BSD. The most dramatic difference with this version of ls was that it listed files in multiple columns rather than only listing one name per line. The options to control this new format were:
There was some controversy over whether it was appropriate to include code to print in columns as an integral part of ls or whether instead the formatting into columns should be done by a separate program into which the output of ls (or any other program) could be piped. At the beginning of 1979, Bell Labs released Seventh Edition Unix. Its version of ls did not incorporate the controversial changes, and had one new option that conflicted with a letter that Joy had also used:
A new Berkeley version of ls, dated August 26, 1980 and released with 4.0BSD, resolved the conflict by capitalizing the option to list in columns: ls -C. It also added to what the manual was by this time calling ``an unbelievable number of options:''
Another revision in 4.2BSD (July 28, 1983) removed the -m, -b, and -x options -- but not before System V Release 2 had added all three of these to its own repertoire of options. They temporarily stayed alive there, but none of the three survived POSIX standardization so the 4.2BSD version of ls is essentially ls as we know it today.
Copyright © 1999, Eric Fischer
|
|
James Thornton, jamesthornton.com>Services: Online Marketing Business |
Electric Speed: Internet Marketing Tips |