Author Topic: What is a good site to learn linux codes and such?  (Read 3361 times)

<Speed Racer>

  • Guest
What is a good site to learn linux codes and such?
« on: 7 December 2001, 08:24 »
What is a good site to learn linux codes and such?

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
What is a good site to learn linux codes and such?
« Reply #1 on: 7 December 2001, 10:21 »
quote:
Originally posted by <Speed Racer>:
What is a good site to learn linux codes and such?


This is probably going to be a MUCH longer answer to your question than you were expecting, sorry if that is the case.  Maybe it will help someone...

I'll try and help although I am not sure what you mean by "linux codes".  If you mean programming and you aren't currently familiar with any type of programming it might be best to start with some basic system programming and some comparisons between Win* and *NIX/Linux (assuming you are already familiar with Win*).  Linux comes with many languages ranging from basic shell scripts to C++ and graphical Development environments for KDE ("kdevelop" is similar in many ways to Visual* in MS).

Now on the basic level you have to compare the "shells" between Win* and Linux. A "shell" provides the basic command interpereter and has a number of built in commands. In DOS and all versions of Windows the "shell" is COMMAND.COM.  In NT/2000/XP a more enhanced shell is included called "CMD.EXE".  In *NIX/Linux you are not limited to a single shell like in Win*.  There are several different shells with different built in commands and you pick which shell you want as your default "login shell" (what sort of built in commands and syntax you want available at a shell/command prompt) and all of them provide a heap more functionality than COMMAND.COM and CMD.EXE.  Most Linux distros use "bash" as the default shell although you have many more shells to choose from like "ksh", "csh", "sh", "ash", and on and on.

COMMAND.COM in DOS/Windows has built in commands like "DIR", "ECHO", "FOR", "SET", "GOTO", "PATH" and a few more (but not a large number of internal commands).  Then of course there are all of the external commands included with the OS usually found in C:\DOS, or C:\WINDOWS\COMMAND, etc.

In *NIX/Linux there are similar commands built into each of the shells plus boatloads more, and exponentially more external commands, commands to do just about everything under the sun, commands you don't find in Windows and when you go back to Windows you wish you had them because you might scratch your head for hours trying to figure out how to do something that is a simple one liner in *NIX/Linux and might require a point and click in some graphical utility in Windows (I'll explain why this is significant later in this message).

CMD.EXE in NT and above has more built in commands and is a significant improvement over COMMAND.COM but still far inferior to any of the *NIX/Linux shells.

Now here is where the most basic and easiest programming (or scripting if you will) starts on both Win and *NIX.  In Win you can automate the built in and external commands though a Win* scripting language called "Batch" (or batch files or *.bat files).  This script must run under the interpereter (i.e. shell) COMMAND.COM, or *.cmd files under the CMD.EXE shell.  You can do very rudimentary programming/automating with batch, in fact you can get somewhat creative but are very limited without the addition of other external commands not included with DOS/Windows.

In *NIX/Linux the equivelant to batch is "shell scripts".  Like batch files the shell script must run under one of the shells (bash, ksh, csh, etc).  The script will run under your default login shell if you do not specify in the first line of your script a specific shell that you want to program under.  At least you have a choice.  I prefer the "ksh" (Korn Shell), or "bash" (Bourn Again Shell) for shell scripting.  Some people prefer the "csh" (C Shell) for scripting.  They all have different syntax and it's more or less a preference thing.

Piping, redirection, and job management are far superior in *NIX/Linux over Win and if you learn batch and also learn shell scripts you will very soon see there is no match.

Who needs shell scripts?  Why the heck would I want to automate something?  I don't know about you but I hate repetetive tasks (especially with a mouse), it gives you carpotunnel syndrome, and I DO have a computer that should be capable of doing as much of the work FOR me as possible. That way I have plenty of time to do other things like play golf, fly planes, etc... Microsoft has made it darn near impossible to administer a system or use a system without having to use the mouse in some way or another.  Sure Linux has graphical tools to that allow you to admin/use the system in similar ways to a Win machine but I RARELY use the graphical tools for anything for a few reasons.  

1) It's nearly impossible to automate graphical tools on either platform.  
2) I learned the manual ways before the graphical tools were available (on both Win and *NIX).
3) I can do things faster on the command line than I can with a mouse (at least in *NIX/Linux) believe it or not.
4) The command line way is nearly identical on all *NIX/Linux systems, graphical tools are not, so you have a head start in other *NIX systems if you know the command line way of doing things.

In *NIX/Linux anything you can do with a graphical tool you can do on the command line (and a whole heck of a lot more).  In Win there are many things you can not do on the command line that must be done with a graphical tool which means they can not be automated, at least in batch.  You might have to write a C program to do this which is a lot more work than writing a simple batch file.  It has to be written, compiled, debugged, fixed, debugged, fixed, debugged etc etc. (unless you are really good, then you only have to recompile a few times).

Now it certainly is good to learn C but take baby steps,  start with Batch and Shell scripts, then maybe go to "Perl" scripting on both *NIX and Win*.  Then go to C/C++.  STAY AWAY FROM Visual Basic (or Visual anything if you ask me). Visual Basic is certainly not portable, Visual C is difficult to port, use the freebee GNU C/C++ compiler on both Win* and *NIX/Linux.  I hate proprietary systems, languages, and practices.  Something Microsoft loves and why they have lawsuits against them.

When you get good at batch and shell you will begin to see the light.  You will be very pleased but don't think you are some sort of wizard at this point.  You'll find the more you learn, there will be exponentially more to learn, at least in *NIX.  In Win* you only have a limited amount to learn before you realize it's not really an OS at all, just a wanna be and Microsoft is nothing more than a master at marketing. Ever see that commercial where that guy is surfing the Internet and finishes it?  That's Win*. Where win doesn't end is where they keep putting out the same old crap with a different name so they never find the end of your pocket book.  You never reach the end of the story in *NIX, even if you never upgrade. Of course *NIX had a significant head start and has evolved from the inputs of more than one small company, based on standards and with interoperability being very significant.

Now I've only given you what might be a section of an "intro" chapter to batch and shell scripting.  From here you might want to buy a book ,but I can tell you that usually books are a waste of money. Sometimes you get a good one but I find that is rare. I have shelves full of books that may have only been opened twice and only a few that the covers are worn off.  You might as well save your money and just do some google searches.  Search for something like "shell scripting tutorial" and "batch file tutorial" etc...  You should run accross a wealth of info.  Look around until you find something that is well written and understandable to you.  If it's not, you didn't waste any money, just go to the next one. You'll be on your way in no time!

---
cat /var/run/windows.pid | xargs kill -9

[ December 07, 2001: Message edited by: VoidMain ]

Someone please remove this account. Thanks...

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
What is a good site to learn linux codes and such?
« Reply #2 on: 16 November 2002, 07:34 »
Wow, was that a long answer to a short question or what???
Someone please remove this account. Thanks...

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
What is a good site to learn linux codes and such?
« Reply #3 on: 16 November 2002, 07:36 »
why did you resurrect such an old thread?

and i think the guy really wanted to know some of the comman linux commands and builtin bash command and not really coding.

[ November 15, 2002: Message edited by: The Master of Reality / B0B ]

Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

rtgwbmsr

  • VIP
  • Member
  • ***
  • Posts: 1,257
  • Kudos: 0
    • http://www.akgames.net
What is a good site to learn linux codes and such?
« Reply #4 on: 16 November 2002, 07:43 »
Duck and cover!

LOL

[ November 15, 2002: Message edited by: The_Muffin_Man/B0b ]


Bazoukas

  • Member
  • **
  • Posts: 866
  • Kudos: 140
    • http://whitehouse.com
What is a good site to learn linux codes and such?
« Reply #5 on: 16 November 2002, 07:45 »
No he did an excellent job bringing this thread up.  
VoidMan's posts are like reading a fucking book man  


Hey Void why the hell you dont write a How to book for Linux? Trust me ill be the 1st to go out and get it.
Yeah

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
What is a good site to learn linux codes and such?
« Reply #6 on: 16 November 2002, 07:57 »
quote:
Originally posted by The_Muffin_Man/B0b:
And I thought we were allowing unregistered posts again!

M0R, X11 messed with the Linux forum. The only way to recover the threads at the moment ('cuz X11 won't listen to me, there are other ways) is to ressurect threads.

In case you didn't know all of that.

[ November 15, 2002: Message edited by: The_Muffin_Man/B0b ]


i noticed... what are the other ways?
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

rtgwbmsr

  • VIP
  • Member
  • ***
  • Posts: 1,257
  • Kudos: 0
    • http://www.akgames.net
What is a good site to learn linux codes and such?
« Reply #7 on: 16 November 2002, 08:00 »
Posted in the Linux forum. Second page of "Soon changing to Linux"

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
What is a good site to learn linux codes and such?
« Reply #8 on: 16 November 2002, 08:12 »
quote:
Originally posted by The Master of Reality / B0B:
and i think the guy really wanted to know some of the comman linux commands and builtin bash command and not really coding.


Really? And just how can you tell that from such a short question that says nothing of the sort?

I actually didn't assume what he was asking. I posted the reply whether it was answering what he really wanted to know or not for the benefit of other people. People who may have read the message and were interested in getting started with Linux. And that's why I thought it was funny when I ran across it and resurected it. You weren't even on this forum at the time I wrote that message. And from what I recall, you asked very similar questions when you first came along and I gave you very similar detailed answers.

[ November 15, 2002: Message edited by: void main ]

Someone please remove this account. Thanks...

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
What is a good site to learn linux codes and such?
« Reply #9 on: 16 November 2002, 08:14 »
/me backs away slowly
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
What is a good site to learn linux codes and such?
« Reply #10 on: 16 November 2002, 08:16 »
Someone please remove this account. Thanks...

Kintaro

  • Member
  • **
  • Posts: 6,545
  • Kudos: 255
  • I want to get the band back together!
    • JohnTate.org
What is a good site to learn linux codes and such?
« Reply #11 on: 16 November 2002, 08:22 »
And voidmain got closer and closer, and mor got more and more and more afraid...

Check the blode series:
www.rathergood.com

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
What is a good site to learn linux codes and such?
« Reply #12 on: 16 November 2002, 08:25 »
No way man, he's Canadian and could probably kick my ass. They got Moosehead up there in the great white north and it makes ya big and strong like Bob & Doug.
Someone please remove this account. Thanks...

rtgwbmsr

  • VIP
  • Member
  • ***
  • Posts: 1,257
  • Kudos: 0
    • http://www.akgames.net
What is a good site to learn linux codes and such?
« Reply #13 on: 16 November 2002, 08:27 »
The kittens are hilarious!

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
What is a good site to learn linux codes and such?
« Reply #14 on: 16 November 2002, 08:45 »
quote:
Originally posted by bazoukas:
Hey Void why the hell you dont write a How to book for Linux? Trust me ill be the 1st to go out and get it.


I've actually thought about writing a book, but that thought usually only lasts about 5 seconds and I get side tracked on something else. And I'm lazy. I am pretty sure I could write a better Linux book than most of them out there. As you can tell from this thread, I used to put a lot more effort into my posts. Now I have resorted to just short posts that say nothing more than "FUCK YOU ZOMBIE!!". It's much easier on the brain.

But I really should contribute. There is one area that I think needs a lot of HOWTO work and that is Samba. There is an O'Reilly book on the subject but books get outdated very quickly. I should probably start my own Samba HOWTO and contribute it. The ones that are out there now suck rotten eggs. I think if I were to do it I would write a separate HOWTO for each distribution (or at least have a separate section for each distro). Something for the ultra n00bs that would cover most scenerios. Something that they could just pick a section that would pertain to their precise need and have a step by step process for their precise OS. It would be a large book in itself, not the little puny O'Reilly version. What were we talking about again?

The O'Reilly book is also on line in HTML and PDF format for anyone who is interested:
http://www.oreilly.com/catalog/samba/chapter/book/index.html

[ November 15, 2002: Message edited by: void main ]

Someone please remove this account. Thanks...