Lecture Advice

Discussion in 'Community Discussion' started by SC68Cal, Jun 23, 2007.

  1. SC68Cal macrumors 68000

    Joined:
    Feb 23, 2006
    #1
    Hello everyone.

    I'm going to do a second UNIX lecture in front of a users group in the near future. I did one last year and I have the slides on my website. Believe me, I tried to simplify a heck of a lot and sadly, I still lost people on it.

    I need some people to give me advice, from the point of a normal user about what they want to know/ don't know/ don't understand about UNIX, and the Terminal application.

    All help would be appreciated, I don't want to stand up there and lose everyone again!
     
  2. janey macrumors 603

    janey

    Joined:
    Dec 20, 2002
    Location:
    sunny los angeles
    #2
    commands: rm, cp, mv, chmod (and permissions)/chown, du, df, find, locate, grep, diskutil, mkdir, ls, mount, sudo/su, cat, ping, xargs, traceroute, banner :)D)

    other things: launchd and cron and all those good things, building apps
     
  3. SC68Cal thread starter macrumors 68000

    Joined:
    Feb 23, 2006
    #3
    Ah, excellent. I had a similar list bouncing around in my head of those commands. Your list is much more concise and comprehensive, and I think that it is an excellent starting point.

    I tried to do a section on building apps in my last lecture. I don't think that went over very well. :D
     
  4. janey macrumors 603

    janey

    Joined:
    Dec 20, 2002
    Location:
    sunny los angeles
    #4
    Yeah I noticed :D
    However ..I only skimmed it really quickly, and it seemed more like you were talking about building certain apps (like JTR) more than apps in general. shrug, i'm not sure how to condense it well...

    There's a whole bunch of other things I have in mind too, but I'm not sure if it's as appropriate for newbies - things like redirection (http://www.network-theory.co.uk/docs/bashref/Redirections.html), dd (and well, of course, /dev/zero, /dev/null, /dev/random, /dev/urandom...), regular expressions, sed, ssh.

    some other commands i thought up of: uname, echo, clear, vim/emacs/nano/...(insert religious flamewar here..), man (forgot that one :eek: ), kill/killall, pgrep, nice, renice, passwd, lsof, pwd, ln and links in general, tar/gzip/...?, less/more, wc, scp, cal, top.

    Depending on what kind of user group, maybe you want to delve into OS X-specific useful terminal commands too? defaults, open, diskutil (whoops mentioned this already), ioreg, osascript, say (very fun :D )

    I know it's a long list of commands, but maybe you could just pick a few from a bunch of general things to do of interest? Say, searching for a file, then deleting it, or changing permissions...creating a new folder...managing processes. I know a bunch of this stuff can be done in Finder and other apps, but imo terminal is just so much more useful for these things :)


    edit: oh, don't forget the basics. like, escaping spaces in filenames, command and file tab completion in terminal...all those goodies :D
     
  5. Abstract macrumors Penryn

    Abstract

    Joined:
    Dec 27, 2002
    Location:
    Location Location Location
    #5
    There is no way to make a Unix lesson painless. :p
     
  6. janey macrumors 603

    janey

    Joined:
    Dec 20, 2002
    Location:
    sunny los angeles
    #6
    oh please :(

    you could maybe spice things up and do something fun. seriously. like use say or banner. or am i a geek for finding those pretty interesting and..:(

    <-- lose at life :p

    edit: no, do something like this. take a bunch of really common problems that would be a headache to fix, and fix them using terminal commands. like this one halfway down the post: http://forums.macrumors.com/showpost.php?p=3556373&postcount=131
    some commands come in so handy...
    also, you might want to talk about aliases..and then bash profiles...and then...
     
  7. Abstract macrumors Penryn

    Abstract

    Joined:
    Dec 27, 2002
    Location:
    Location Location Location
    #7
    I really mean it. There's no way to make Unix fun and painless.

    The people who want to learn WILL learn. That's it. As we speak/type, I'm trying to learn how to use Linux from something called "The Linux Users' Guide" written by a guy named Larry Greenfield. Not bad. I'm just reading through the commands, hoping to follow along with the diagrams and such.
     
  8. janey macrumors 603

    janey

    Joined:
    Dec 20, 2002
    Location:
    sunny los angeles
    #8
    in my opinion, there is nothing better than just using them.

    Even if it's a headache and takes you forever to figure out, move files in Terminal. Rename files in terminal. Open an application using open.

    If you're trying to get the hang of any particular distro, just start using it as much as you can. (puts on a flame-repellant :p ) Install something like Gentoo. The installation alone will teach you so much about how Linux works and how to maintain your system without having to rely on gui tools that may not even exist.
     
  9. SC68Cal thread starter macrumors 68000

    Joined:
    Feb 23, 2006
    #9
    I'll find a way. I'm going to be pursuing a Masters Degree in Instructional Education, so if I play my cards right, this could be the formation of a good paper to finish off the degree with.

    Then again that's at least two years away.

    Kicking it around, here's what I think needs to be done

    1. Where are we???? (What is UNIX, what is a shell, BASH, basically a recap from some of my previous slides)
    2. Syntax (what goes where.... introduce the concept of uniformity across applications)
    3. Simple commands
    4. More complex commands
    5. Joining commands to create useful outputs (pipes)
    6. basic UNIX principles (Why are there permissions, multi-user operating system concepts)
    7. Permissions primer (What is User & Groups)
    8. Permissions primer II (What is Read, Write, Execute)
    9. Permissions primer III(What is owner, group, other)
    10. Permissions (Octal expressions, 111 versus 777)
     
  10. janey macrumors 603

    janey

    Joined:
    Dec 20, 2002
    Location:
    sunny los angeles
    #10
    I don't know about #10. It's only confusing and annoying. You don't even have to use octal numbers and absolute modes, symbolic ones are less confusing.

    Like compare "chmod 777" to "chmod a+rwx" ugo=rwx or a=rwx. I'd vastly prefer the latter because 777 is meaningless unless I knew how to calculate it, while a+rwx/ugo=rwx/a=rwx tells me that I'm adding read, write, execute permissions to all (user, group, owner). Out of use and habit I understand most absolute modes, but for a new person...

    You can also do chmod +x or chmod u-r,g=rw,o+rwx or virtually any combination. And even with the latter, you can still understand what's going on without thinking much (remove read for user, make group permission read and write only, add read, write and execute permission to the owner).
     
  11. SC68Cal thread starter macrumors 68000

    Joined:
    Feb 23, 2006
    #11
    I prefer the octal values because the behavior is uniform and the syntax is strict. And working with the octal values enough makes me prefer them. Different strokes for different folks.

    Believe me, I think that it's an ambitious list, and I doubt that anyone will follow past step #5. They're all from OS 9, or music backgrounds, or artistic types. So, I work with what I get.
     
  12. janey macrumors 603

    janey

    Joined:
    Dec 20, 2002
    Location:
    sunny los angeles
    #12
    Yes, but while you have worked with them, you mentioned "normal" users, and to normal users, symbolic modes would make more sense than octal.

    just my 2c.
     
  13. Abstract macrumors Penryn

    Abstract

    Joined:
    Dec 27, 2002
    Location:
    Location Location Location
    #13
    ^^I agree. ;)

    Ask me. If you need my help, and you think you can explain to me what you'll be teaching, then run it by me. I AM essentially your target audience, after all. I'm learning Linux from scratch, and I can only move individual files, not groups of files or folders. That would have been a useful skill when I was using my Mac, it completely ****ed up, it wouldn't recognise my backup HD through the GUI (but it did via Terminal), and I had to back up my files. I honestly didn't know what to do because I only started learning Linux and didn't know commands beyond "cp"ing individual files. :eek: However, I did have the sense to compress every folder I wanted into a ZIP file and copy the ZIP file over to my backup HD rather than move individual files. (And yes, the MacBook ran so poorly that I'm about to get a brand new MacBook as a replacement).

    Anyway, I'm very very novice, and am not uncapable of learning, nor unwilling to do so. If I would find it confusing, then I say don't bother teaching it. Don't do anything with Octals. I remember something about them from high school programming. :eek:

    Teaching things like "How do I type in a filename when the name has spaces" is already a good place to start. Teach too much, and they won't learn anything.
     
  14. ravenvii macrumors 604

    ravenvii

    Joined:
    Mar 17, 2004
    Location:
    Melenkurion Skyweir
    #14
    I noticed you spelled Laboratory wrong in there.

    LOL
     
  15. janey macrumors 603

    janey

    Joined:
    Dec 20, 2002
    Location:
    sunny los angeles
    #15
    Well, 'mv' moves directories as well - mv dir1 dir2 moves dir1 into dir2.

    or to cp entire directories you could do cp /some/dir/* /another/dir
    or cp /some/dir /another/dir to move /some/dir to /another/dir so it'll be /another/dir/dir.

    or you could have used dd to make a copy of the drive as a disk image.
     
  16. SC68Cal thread starter macrumors 68000

    Joined:
    Feb 23, 2006
    #16
    Yes. Yes I did. Oh well.
     
  17. OutThere macrumors 603

    OutThere

    Joined:
    Dec 19, 2002
    Location:
    NYC
    #17
    The numbers are simpler to memorize, and if all you're going to be doing is permissions, it's much more straightforward to type in 3 numbers than a string of letters or whatever.

    I'd say for the average joe it's easier to remember that way...at least for me it was, and I stick to the basics in the terminal, just a wee bit of ssh, rm, mv, cp, ping...the basic stuff.
     
  18. janey macrumors 603

    janey

    Joined:
    Dec 20, 2002
    Location:
    sunny los angeles
    #18
    i honestly don't know if I could agree with that - it's not asking the end user to memorize arbitrary letters, if they learn about permissions, they will learn about users, groups, owner, read/write/execute anyway and the symbolic modes just use the first letter of each of those. you use +/-/= to give/remove permissions, and anyone who knows basic math can understand that.
     
  19. OutThere macrumors 603

    OutThere

    Joined:
    Dec 19, 2002
    Location:
    NYC
    #19
    I dunno...I'm just speaking from experience. I had to figure it all out for myself a while ago and I found it much easier to just look at a list of what meant what, and remember it (or at least reference it when I had to).

    The numbers leave little room for errors when I'm ftp'ing all kinds of finicky php scripts.
     
  20. jng macrumors 65816

    jng

    Joined:
    Apr 6, 2007
    Location:
    Germany
    #20
    i hope the lecture's more entertaining than this thread!

    sorry, just to be honest. (but then again i have a short attention span and i've always been bored in cs classes - hence no cs major)
     
  21. janey macrumors 603

    janey

    Joined:
    Dec 20, 2002
    Location:
    sunny los angeles
    #21
    har :D

    you never know when this kind of stuff will come in handy. there's a lot of things you can do that are much more difficult if not impossible to do with a gui app.
     
  22. SC68Cal thread starter macrumors 68000

    Joined:
    Feb 23, 2006
    #22
    Thanks for the emotional support
     

Share This Page