D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

[LUG]Re: unix philosophy - is recorded and explained(!)

 

There are books which got me started with “the unix user toolkit”.
But that was back in the later 1990’s.
One which sticks in my mind is

A Student's Guide to UNIX
Harley Hahn

which takes you through these things.

That is as if you were given an account on a unix machine - eg. Linux - and you now 
have to work out how to get done the work you have to do.

So I’ll leave it at that, for others to give up-to-date recommendations.

Perhaps do get books and settle, getting the general idea, turnign to the computer 
to try things and try ideas.

Then there were the “O’Reilly books”.

All good.

Best wishes,
Rich S


> On 9 May 2023, at 19:44, Roland Tarver via list <list@xxxxxxxxxxxxx> wrote:
> 
> On Fri, May 5, 2023 at 11:01 AM Gordon Henderson <gordon+lug@xxxxxxxxxx> wrote:
>> 
>> On Mon, 1 May 2023, rds_met wrote:
>> 
>>> Hi there
>>> 
>>> I stumbled on this Wikipedia page
>>> 
>>> https://en.wikipedia.org/wiki/Unix_philosophy
>>> "Unix philosophy"
>>> 
>>> while making some links explaining "awk" to the uninitiated.
>>> It's good isn't it?!
>> 
>> It was good... It started to get less good round about the mid 80s...
>> 
>> Take the "Do one thing well" part...
>> 
>> The 'ls' command used to just output the filenames, one per line and do
>> nothing else.
>> 
>> (It still does that if it recognises that output is not a terminal - try:
>> ls | cat)
>> 
>> So you wanted the filenames sorted?
>> 
>>   ls | sort
>> 
>> Want them in columns?
>> 
>>   ls | sort | pr -4
>> 
>> Paged:
>> 
>>   ls | sort | pr -4 | more
>> 
>> and so on.
>> 
>> Today, ls has been expanded, bloated, some may say, so it has all the
>> options in one command. Less is more, as they said.
>> 
>> Similarly some may remember searching the file system for files containing
>> e.g. stdio.h with:
>> 
>>   find . -type t -name \*.c  -exec fgrep stdio.h {} /dev/null \;
>> 
>> or as we might work out what we do today is 'bloat' the grep command to do
>> the recursive find and print the filename.. (fgrep -r -l stdio.h) and who
>> cares about the filename filtering...
>> 
>> And theres me using fgrep rather than grep as fgrep used to be faster. Oh
>> well.
>> 
>> But then we've paid for the faster cpu, faster IO and more memory, so
>> might as well use it...
>> 
>> My first Unix experience was in 1980 on a PDP-11/40 with 128KB of core
>> memory. It was nice and due to the contraints we had to work like the
>> above with piped small commands - I don't consider that time the "glory
>> days" but I appreciate what we did with the contraints, but do I want to
>> go back to it? Well for day to day use, no, not really.
>> 
>> For hobby/fun use? Well... Yes which is why I've developed just such a
>> system running on a 16-bit CPU... Although it's not Unix, nor C, but maybe
>> a step back, so Multi-tasking, but single user and BCPL rather than C.
>> What we do for a bit of retro fun...
>> 
>> Gordon
> 
> Gordon, you need to write a book! Capture that knowledge.
> 
> Cheers roly (now in Scotland!)
> --
> The Mailing List for the Devon & Cornwall LUG
> FAQ: https://www.dcglug.org.uk/faq/

--
The Mailing List for the Devon & Cornwall LUG
FAQ: https://www.dcglug.org.uk/faq/