Slashdot Mirror


Unix Command 'Cheat Sheets'?

WCLPeter asks: "One of the things that I like about Linux is that once it's set up properly it tends to stay that way. I have had experience using Linux as I've set up a firewall for my xDSL line, but that was a while ago. Like all things, if you don't use it often, you forget how to use it. Which is what has happened to me. As I prepare to install a Slackware 8.0 ISO so I can play some Loki games I bought I wondered: Is there a Unix cheat-sheet?" If you were going to create such a cheatsheat, what commands would you have in it? Of course, you can't get all of the Unix commands on a single sheet of paper, but probably enough of them to at least get a new user confortable with navigation and file operations.

"I'm sure you all know the type. When you buy a book on a program/OS/Programming Language, it usually contains a page that lists all the functions or commands followed by a simple 1-2 line description of that command.

Something along the lines of:
ls: Used to display a directory listing.
gcc: GNU C Compiler. Used to compile 'C' files into program code.
etc... - The list continues in this fashion.

I know I could read the various FAQ's. Most FAQ's unfortunately follow the 'FAQ A leads to FAQ B which leads to FAQ C which leads back to FAQ A' format. It would be so much easier for newer users to graze down a list of 50-100+ commands, find one that -looks- sort of like what I want to do and type
'man <command>' for usage information."

77 comments

  1. grep by mjoconnor81 · · Score: 2, Informative

    grep is definitly one of the more useful commands. when used to sort through the output of other commands using |

    --
    Pseudocode is code to demonstrate a concept, not designed to be run. Like certain M$ software.
  2. man by laymil · · Score: 2, Insightful

    just give them one command: man. its got all sorts of information about the commands.

    1. Re:man by un_eternal · · Score: 1

      Unless I'm missing something, you have to know the name of the command you want to know about to use man.

      --
      Ahh, A nice legally binding electronic signature...
    2. Re:man by mikefoley · · Score: 1

      If Linux/Unix had a built-in help equal to VMS, it would go a long way to helping neophytes master Bash and Linux in general. For those that don't know, HELP in VMS is a command. You can say HELP SET and get all the qualifiers AND examples for the SET command. It's quite complete. Something man isn't. (If man just had decent examples of the commands referenced that would help alot)

      --
      What's my Karma Mr. Burns? "Excellent"
    3. Re:man by robwills · · Score: 2, Informative

      Try:
      man -k

      You would be surprised how easy it is to find the appropriate topic.

    4. Re:man by laymil · · Score: 1

      here's the thing...man lets you look up the commands themselves. gasp.

    5. Re:man by Anonymous Coward · · Score: 0
      yeah, give em this:

      command %1 %2 %3 %4 %5

  3. You're missing the point. by Jonny+290 · · Score: 3, Informative

    He's come across the one stumbling block that I have when switching back and forth from the 2000/Mac/Linux platforms in my home lab. What *ARE* the commands? He's looking for a master list of all those hundereds and thousands of commands so he can poke through and see if anything fits his needs. I know that i would absolutely *ADORE* something like this. Sure, *nix can do anything you damn well please, but to a casual Redhat user, you may start out knowing what you want to do but not how to do it.

    I know that in the past, i've known exactly what I want to do (for example, start a new service and open an ipchains port for it from only a certain IP), but what would i look at to fix this?

    Just a one command per line index would be wonderful.

    --
    Hey Taco! Looks like you're using the "infinite monkeys and typewriters" scheme to generate Ask Slashdots again...
    1. Re:You're missing the point. by 1%warren · · Score: 1

      makewhatis (if it isn't already made)
      cat /var/cache/man/whatis > commands.txt
      less commands.txt
      or less /var/cache/man/whatis
      or grep foo /var/cache/man/whatis
      (foo=string)
      to search it.

      --

      Full plate and packing steel! -Minsc
    2. Re:You're missing the point. by Anonymous Coward · · Score: 0
      Assmonkey, if you need a reference card to linux how the fuck are you going to figure that out?

      What a fucking twat.

  4. 'apropos' by penguinboy · · Score: 5, Informative

    'apropos' is a rather useful little command-line utility that, when given a topic as an argument, will print a list of man pages that may be related to that topic. Quite helpful when you don't know which man page it is you need..

    1. Re:'apropos' by awoodhouse · · Score: 1

      man man.

      check man -k

  5. Cheat Sheets by dso · · Score: 5, Informative

    I have developed a couple of "cheat sheets" for the Canadian Linux Users Group. The following sheets available include:

    Linux Command Card
    Slackware System Reference
    File System Hierarchy
    Samba Configuration

    I have a couple for SQL Databases but they are not on the site yet. All these sheets are in PDF format so new users who use Windows can get the commands prior to installing Linux. Also, experienced Linux users will know how to read a PDF.

    They are available at:

    http://www.hexeon.com/clue/library/

    1. Re:Cheat Sheets by Anonymous Coward · · Score: 0

      Uh.... you've got a broken link on that page. The 'SQL Syntax' link actually loads up the Samba reference again.

    2. Re:Cheat Sheets by dso · · Score: 1

      Fixed - Thanks

    3. Re:Cheat Sheets by unitron · · Score: 2

      I can see using PDF if you need to include diagrams of a carburetor with the instructions on how to rebuild the carburetor, but unless you have to include screen shots, why shouldn't a list of command line interface commands and a brief explanation of what they are and what they do, (and please, please, please, an explanation of how they got named whatever name they have) be just a simple text file?

      --

      I see even classic Slashdot is now pretty much unusable on dial up anymore.

  6. Unix in a Nutshell by Carey · · Score: 3, Informative
    O'Reilly's UNIX in a Nutshell is the best short-form UNIX command reference you can get.

    Use its pages to make up cheat-sheets with your favorite commands. I think that's about as simple as it gets with UNIX.

    You will probably learn the commands more effectively by producing your own cheat sheets than by purchasing some produced by someone else. However, if that is what you are looking for, check at a university bookstore in the CS section. You can probably find that type of material there.

    1. Re:Unix in a Nutshell by dattaway · · Score: 2

      Damn good book. Refreshingly concise. A must have.

      I just wish all distributions would ship this one in their shrink wrap boxes as the technical reference manual.

    2. Re:Unix in a Nutshell by Lish · · Score: 1

      I'll second that. One of the most useful purchases I've made, definitely worth the price. They also have several books in their "pocket reference" series; I don't think there is a general UNIX one but one of them might have a decent "cheat sheet."

      --
      "This message is composed of 100% recycled electrons."
    3. Re:Unix in a Nutshell by ader · · Score: 1

      It seems a little redundant to add further to the praise already showered on this book, but I would like to mention that, as a Sun and HA consultant for nearly three years, it was the one book I always had with me and it remains the one I still refer to the most after over seven years of working with Unix. Because you can't keep every obscure detail of syntax or awk usage in your head, but you can look it up very quickly.

      Although it doesn't quite fulfill the function of a "cheat sheet", the Intro in my (first) edition contains a quick summary of the major commands, categorised by general function.

      Ade_
      /

      --
      Big Bubbles (no troubles) - what sucks, who sucks and you suck
  7. O'reilly's Linux in a netshell by chrismcc@netus.com · · Score: 1

    Hello...

    Get O'reilly's "Linux in a netshell" book. This is exactly why I got my first one, and my second one (3rd edition).

    There is a section on "linux commands", along with smaller sections on bash,csh/tcsh. A section on emacs and a section on vi. Plus sections on sed and awk.

    It is a very nice "quick reference manual" for those times when you need to know what the '-M' option to rdist does.

    --
    Christopher McCrory "The guy that keeps the servers running" chrismcc@gmail.com http://www.pricegrabber.com
  8. bash... by toast0 · · Score: 1

    bash has a built in help for commands it defines internally....

    these include all the directory navigation things, and a few other useful things

    this may be somewhat helpful

  9. sed and awk by Anonymous Coward · · Score: 0

    sed and awk would be the two I'd like too see. I know they are very powerful, but I'd never really taken the time to learn them.

    1. Re:sed and awk by oneiros27 · · Score: 3, Interesting
      There's an ORA book just on those two commands.
      http://www.oreilly.com/catalog/sed2/
      and the matching pocket reference
      http://www.oreilly.com/catalog/sedawkrepr/
      Also of relevance, the Effective AWK Programming book:
      http://www.oreilly.com/catalog/awkprog3/
      and the regular expressions book:
      http://www.oreilly.com/catalog/regex/
      --
      Build it, and they will come^Hplain.
  10. Command Reference Cards by RedLeg · · Score: 2, Informative
    SSC, the publishers of Linux Journal, have been publishing (selling) pocket references for Unix, Linux, and specific Unix applications for years. They are printed on durable card stock, and are generally very useful for those occasionally used commands. Check out: SSC Product Listing.

    set mode = BOFH

    OTOH, RTFM: man man, man apropos, man $command

  11. Some quick cheet sheets by ehinojosa · · Score: 3, Informative

    These come from Webmonkey, they cover some basic commands, might be a nice starting point:

    http://hotwired.lycos.com/webmonkey/reference/un ix _guide/

    http://hotwired.lycos.com/webmonkey/html/97/02/i nd ex3a.html

  12. Role 'yer own by /Idiot\ · · Score: 2, Informative
    I maintain my own cheet-sheet of about 1x A4 page. The reason I typed my own was two-fold:

    a) I couldn't find one I liked, some are out there if you search but I want one with all the stuff I forget and only the stuff I forget, and

    b) When I type it out with a description for the cheet sheet I tend to remember it more.

    Because of the effect b) has on a) the document gets revised regularly. It's not that much to maintain after the initial bulk has been written.

    I was once going to write a web page that would let you select 4 or 6 topics that you wanted out of a list of who knows how many and they would be presented to you on a web page in a format that you could print nicely, but that never happened :-( Hey CowboyNeil, feel like adding it to slash?

    --
    /dev/Idiot/
  13. Another failed chance to put search engines to use by Toodles · · Score: 5, Informative
    First, a serious plug for refcards.com as they have a bunch of DAMN handy refference cards, including apache, perl, cvs, gdb, ANSI c, etc etc. However, they do not have one for basic *nix usage. So...

    Here are some of the more promising results of a search from google.com (String used was :unix ref card pdf)

    Unix Cheat Sheet
    Unix Cheat Sheet
    From Rice University : Very basic
    Another Too large and outdated
    Selection of Unix, Vi, and Emacs refferences Courtesy Univ. of Alberta.ca

    You should be able to find what you need easy enough. I should also highly reccommend to everyone the linuxsecurity.com Linux Security guidesheet. Damn good reading to hardening your system. Here

    Toodles

    --
    Toodles D. Clown
  14. `man intro` by Snowfox · · Score: 2
    Check out 'man intro' or 'man 1 intro' on other unices, print that and use it.

    For some reason Linux doesn't have a command reference there the way other ones do.

  15. ll by $goat+man$ · · Score: 0

    id have to add ll in there too, its really helpful for seeing the security levels, etc. on files and programs

    1. Re:ll by skullY · · Score: 1
      id have to add ll in there too, its really helpful for seeing the security levels, etc. on files and programs
      skully@hailstorm:~:0$ ll
      bash: ll: command not found
      skully@hailstorm:~:127$ uname -a
      Darwin hailstorm.frop.org 1.4 Darwin Kernel Version 1.4: Sat Sep 1 15:31:24 PDT 2001; root:xnu/xnu-194.obj~1/RELEASE_PPC Power Macintosh powerpc

      {1}(skully@margin:~)0$ ll
      bash: ll: command not found
      {2}(skully@margin:~)127$ uname -a
      Linux margin 2.2.19-4tr #1 Wed Jun 13 15:36:00 CEST 2001 i586 unknown

      zwhite@cliff:/home/zwhite$ ll
      ksh: ll: not found
      zwhite@cliff:/home/zwhite$ uname -a
      OpenBSD cliff 2.9 CLIFF#2 i386

      Wow, on a sample of 3 different unix machines I happen to be logged into, not a one has a command called ll. Are you sure you're not just thinking of some lame alias your linux distro included? I've never heard of, or used, the "ll" command.

      (Yes, I'm a pedantic bastard)

      --
      When I was able to do my own spam-armoring, you got a chance to email me. Now you can only hope I see your reply.
    2. Re:ll by RossyB · · Score: 1

      "ll" is a common alias for "ls -l" (or some such command).

      Some distributions (Mandrake 8 comes to mind) includes a fair set of these aliases, including l, ls, la, ll, lla. Very handy for fast listings without playing with options.

    3. Re:ll by SuiteSisterMary · · Score: 1

      Also means you're screwed when you try to use anything else. Honestly, pick up a generic UNIX book and learn the basic commands. Don't learn VIM, learn vi. That sort of thing.

      --
      Vintage computer games and RPG books available. Email me if you're interested.
    4. Re:ll by speedy1161 · · Score: 1

      I have ll aliased to 'ls -l | more' and ls aliased to 'ls -Fa' to give me a better understanding of what the directory's contents look like.

    5. Re:ll by thempstead · · Score: 1

      for completeness, ll is a command on HP-UX (and no its not just an alias to ls -l).

      root@barney:/usr/bin -: file ll
      ll: PA-RISC1.1 shared executable dynamically linked

      root@barney:/usr/bin -: uname -a
      HP-UX barney B.11.00 U 9000/800 675319372 unlimited-user license

      its not on AIX 4.3 or Unixware 7.1 though....
      (and no my server is not really called barney)

    6. Re:ll by Artichoke · · Score: 1


      Cart and horse. If you're on a Vim-less system, get the admin to upgrade vi to vim.

      (Aside: vim6 is a must have upgrade for vimmers and out now)

      --
      __
      Arse
    7. Re:ll by SuiteSisterMary · · Score: 2

      And when you go on call to a hardcore AIX or Solaris shop, where they use sh, and you don't even know what !! means, you're kinda screwed. Don't handicap yourself.

      --
      Vintage computer games and RPG books available. Email me if you're interested.
    8. Re:ll by Artichoke · · Score: 1


      Okay, horses for courses.

      _If_ you're career makes it absolutely necessary to learn vanilla vi, do so.

      If not, vim is so much more capable it is well worth having it added to a system you're using for anything above a shortish time. [IMO; blah, blah.]

      BTW, I work in a "hardcore Solaris" shop, as the NT developer (!) and weedled the admin into providing me bash as a shell on the servers and I compile/install vim on them myself.

      Vim available via here.

      --
      __
      Arse
    9. Re:ll by spudnic · · Score: 2

      It's not like learning on VIM is going to make you unable to deal with a situation. If you do find yourself up against a box that only has vi installed, you'll at least be able to go in, do simple edits, and save the file out.

      Now only learning emacs would be a mistake, but I'm a bit biased ;)

      --
      load "linux",8,1
    10. Re:ll by spudnic · · Score: 2

      I find lg to be a good alias to have around...

      alias lg='ls -la | grep $1'

      Of course, you really need to know the commands before you start using all these aliases. It's important.

      --
      load "linux",8,1
    11. Re:ll by Artichoke · · Score: 1


      Well, quite.

      I can see getting frustrated by the "Oh, that must be a vim extension" reflex, if it's happening a lot.

      But if this is only occassionally a problem, not using Vim when you can use Vim seems to be cutting off one's nose to spite one's face.

      As for emacs: I tried, but had already been infected with vi, and never got a firm footing on the learning curve. With Vim's burgeoning functionality, I don't 'miss' not having emacsed me'sen anyhow (but then meta-unknowing kicks in at this point).

      --
      __
      Arse
  16. The best (electronic) reference card by DRACO- · · Score: 0

    The best (electronic) reference card is the tab key.

    Dont know what to do.. hit tab twice. Bash will go thru the paths and list the programs available to be ran (set executable). From there just use man or any other help facility.

    I have shocked many linux users that have been using linux longer than i have by showing them the tab-completion lists. It works for every argument.

    try typing ca, then hit tab... you get a list of all executable commands with ca in them...

    then try cat (a space) and tab twice, you get a list of applicable files in your current working directory.

    It works great for even searching the directory tree. (really helpful while doing a lot of transversing of the directory tree)

    DRACO-

    --
    Consider yourself blessed if you are sneezed on by a dragon and only get wet, it could have been a fireball.
  17. Re:Another failed chance to put search engines to by rjamestaylor · · Score: 1

    Excellent resources, thanks. This is a full answer to the question.

    --
    -- @rjamestaylor on Ello
  18. Command references and apropos by danejasper · · Score: 3, Informative
    SSC, one of the first publishers of Linux resources including Linux Journal, publishes a number of "Pocket References" including the "Linux Command Summary". It may meet your needs. Info at:

    http://www.ssc.com/ssc/productlist.html.

    A useful online tool, when paired with man pages, is the 'apropos' command. It can be used to search summaries of command functions to find the right command, then you can read the man page for that tool. For example:

    # apropos search
    apropos (1) - search the whatis database for strings
    find (1) - search for files in a directory hierarchy
    lkbib (1) - search bibliographic databases
    lookbib (1) - search bibliographic databases
    manpath (1) - determine user's search path for man pages
    whatis (1) - search the whatis database for complete words.
    zgrep (1) - search possibly compressed files for a regular expression

    So, you can read these descriptions, and if one sounds like the tool you're looking for, call up the man page for that particular utility using "man".

    For those missing man pages on the system, you can use my (somewhat outdated) man page web gateway at http://www.sonic.net/cgi-bin/man.

    Happy Linuxing!

    -Dane (last seen driving the North Bay backroads in a red 2001 Porsche Carerra with the California license plate "LINUX")

    --
    -- Dane Jasper Sonic.net, Inc.
  19. multi platform reference by Anonymous Coward · · Score: 0

    http://home.earthlink.net/~bhami/rosetta.html

    gives you equivalent commands between the various *nix platforms

    for example to read a disk label
    AIX ........ lspv -l
    Darwin ..... Disk Utility
    DG-UX ...... admpdisk -o list
    ........... admvdisk -o list
    FreeBSD .... disklabel -r
    HP-UX ...... diskinfo
    ........... pvdisplay
    IRIX ....... prtvtoc
    Linux ...... fdisk -l
    NetBSD ..... disklabel -r
    OpenBSD .... fdisk -r
    SCO ........ fsname
    Solaris .... prtvtoc
    SunOS ...... dkinfo
    Tru64 ...... disklabel -r
    Ultrix ..... chpt -q

    Grimlaf

  20. Why PDF by dso · · Score: 1

    Text files are great for basic text, but honestly PDF has many advantages (i.e. consistant layout, graphics, cross platform). I have made these sheets to look good for those that like "eye candy".

    The documents are Licensed under the GNU Free Documentation License, so if someone wants to make a text document by all means go ahead. I just like to use PDF.

    1. Re:Why PDF by unitron · · Score: 2

      Which brings us back to my original question--What about one of these would need to be anything other than text?

      --

      I see even classic Slashdot is now pretty much unusable on dial up anymore.

    2. Re:Why PDF by firewort · · Score: 2

      Because carriage returns in plain text aren't the same from *nix to Win to Mac.

      Loading up a document in notepad and having it linewrap with non-alphabetic charachters is fugly.

      PDF avoids this problem, but with a size trade-off.

      Like he said, if you want to make them into text, go for it, but for him, his preference was PDF.

      --

    3. Re:Why PDF by Anonymous Coward · · Score: 0

      You, sir, have no penis.

  21. Re:Another failed chance to put search engines to by tolan's+my+name · · Score: 1

    The first link seems to be broken ;o(

    I rather like the second cheat sheet though.

  22. My favorite for translating from OS to OS by lythander · · Score: 1

    http://home.earthlink.net/~bhami/rosetta.html

    Great for figuring out how to do X on OS Y if you know how to fo it on OS Z. Except windows.

  23. Another site by zero-one · · Score: 1

    Unfortunatly this site does not have a Unix card but they do have a few others that are worth having (Emacs, TeX, Apache).

  24. O'Reilly Nutshell series by Diamon · · Score: 1

    check out the sample chapters to get an idea of this is what you're looking for

    For Unix:
    http://www.oreilly.com/catalog/unixnut3/

    For Linux:
    http://www.oreilly.com/catalog/linuxnut3/

  25. a few useful resources by oneiros27 · · Score: 3, Interesting

    The problem is, there are so many commands, it's hard to fit that much information into a small space. So, for quick reference, I normally turn to 'man -k' [which is the same as 'apropos'].
    Failing that, a quick search through google or google groups.

    Some people prefer printed materials, however, and I know that one of the folks here always seems to go for one book which just has the quick usage of most shell commands [but well, she doesn't get in for a few hours, and it wasn't obvious in her stacks of books] She also had the Linux Command Reference, published by the Linux Journal, which is slightly bigger than the ORA pocket books, but still very portable.

    Once of the books that I started out with was the UNIX System Administration Handbook, which I've heard includes linux in the latest version. It's not cheap, it's not small, but it nicely organizes things by topic, and points out possible pitfalls.

    --
    Build it, and they will come^Hplain.
  26. Universities have had to build them... by Anonymous Coward · · Score: 0
  27. Getting a summary of all commands by martyb · · Score: 2

    I agree that "man -k some_keyword" works well if you already know what you are looking for. But what if you don't know what you don't know? In other words, what if you want a list of all commands and a brief description of what they can do? Here are some variations that might get you a summary of every command:


    man -k " " > cheat.txt
    man -k "" > cheat.txt

    NOTE: The first example contains a single quoted space character as the argument; the second example contains no characters between the quotes.
    The idea is to provide a parameter to the keyword search that would match ALL commands. Hope this helps!

    CAVEAT: I don't have a linux box handy to check these on; but I recall using something like this myself, when I was in the same boat many years ago.

    1. Re:Getting a summary of all commands by howardjp · · Score: 2

      That segfaults on my Linux machine. Worked fine under FreeBSD and returned a 2000+ line file.

    2. Re:Getting a summary of all commands by Anonymous Coward · · Score: 0

      because....
      yup.

    3. Re:Getting a summary of all commands by Tassach · · Score: 2

      try:

      man -k "[aeiou]" > foo

      or

      man -k "[aeiou]" | enscript

      --
      Why is it that the proponents of "one nation under God" are so eager to get rid of "liberty and justice for all"?
    4. Re:Getting a summary of all commands by 1%warren · · Score: 1

      cat /var/cache/man/whatis > cheat.txt :)

      --

      Full plate and packing steel! -Minsc
    5. Re:Getting a summary of all commands by spudnic · · Score: 2

      man -k *

      And if you can't remember man with a switch, you can always just use the "apropos" command.

      Of course you need filename completion because I can never spell apropos correctly.

      If someone where to ask, I'd say it was spelled apr[TAB] ;)

      --
      load "linux",8,1
  28. Very nice! by thefritob · · Score: 1

    This will help in assimilating future Linux users. Big thanks and Props to DSO!

  29. My 3x5 cards are a goldmine by chad_r · · Score: 1

    Over the years of using Unix systems, whenever I need to work at figuring what command line combinations work for what I need, or what obscure command does something powerful, I write it down on an index card and file it away. Most of these you would never run across in the basic Unix books, although I'll bet most of these can be found in the blue Unix Power Tools book somewhere. In general, these are from Usenet postings gleaned from searches, after man pages turned up nothing (man -k doesn't often help if you don't already know what to look for). Some examples:

    • nroff -man whatever | less
      viewing a man page outside of the regular search path for man
    • ldd -d
      dynamic linkage dependencies
    • ls -l | sort +4n
      sort files by size
    • find args | xargs command
      I have seen the light. Xargs is the light. Learn to love xargs
    • perl -pi -e 'replacement pattern' file(s)
      Inplace editing of files
    • truss/strace
      Trace system calls. Very useful!
    • SQL for tricky queries, formulas for table/index size estimates
    • rcs/cvs options I commonly use
    • Anything else I think would be hard to find again if I had to
    -Chad
  30. Might be good if.. by schon · · Score: 1

    Might be a good resource, if I could actually view the PDF's

    A stock Slackware 8.0 install (which I notice happens to be your distro of choice) just gives blank pages.

    Perhaps you could include some documentation on how to view the pages?

    1. Re:Might be good if.. by dso · · Score: 1

      Ghost Script should be able to view these since they are binary PostScript files. Also, if you download Adobe Acrobat you should have no problem reading them. Also, there are a couple of free PDF viewers for Linux, just search Google.

  31. Came with RedHat 7.0 by robvasquez · · Score: 0

    Right in the box, a big 'WordPerfect-style' card that goes across the keyboard.

  32. how about ls by RadioheadKid · · Score: 1

    I find sometimes an ls of /bin /sbin /usr/sbin and /usr/bin (although you probably need a | more/less with that one) and then using man can usually get me what I want. Sometimes you just can't remember the name of command until you see it...

    KidA

    --
    "Karma can only be portioned out by the cosmos." -Homer Simpson
  33. More useful: a list of one-liners by Tassach · · Score: 4, Informative

    What's even better than a simple cheat sheet of the basic commands is a list of useful one-liners: little 2 or 3 command scripts using odd switches that do somthing useful. Learning the basic unix commands is pretty trivial next to learning how to string them together to do neat things. EG:

    ls -at | head -n1 : list the most recently modified file in the current directory

    ps h -u user | awk '{print $1}' | xargs kill -9 : terminate all jobs owned by user.

    --
    Why is it that the proponents of "one nation under God" are so eager to get rid of "liberty and justice for all"?
    1. Re:More useful: a list of one-liners by drinkypoo · · Score: 1

      Slashcode, at least the way it is set up at slashdot, sucks.

      I just tried to give a very useful sed code example for renaming mp3s, and the lameness filter was 'encountered'. Yes, the filter is a bastion of lameness.

      As I cannot simply C&P my example, I will type it out for you longhand.

      for i in *.mp3
      do
      mv "$i" "`echo $i | sed 'see below'`"
      done

      Okay, here we go: s slash caret backslash open-paren dot dot backslash close-paren space dash space backslash open-paren dot splat backslash close-paren space dash space backslash open-paren dot splat backslash close-paren dot m p 3 dollar sign slash backslash 1 space dash space backslash 3 dot m p 3 slash

      For those who don't know, a splat is an asterisk. Everything else should be clear if you know english; If you don't, I suggest you learn it before trying to read my posts anyway :) My text should be easily decodable, at least. I'd try including a perl script to decode it, but the lameness filter would probably reject it. I only typed all that out (with appropriate C&P) in the first place to make a point, anyway. I'll leave any scripting to you.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
  34. GNU awk reference is excellent by Medievalist · · Score: 2

    Arnold Robbins' GNU Awk reference manual, shopped by the Free Software Foundation, is quite excellent.
    Gawk has a simple means of using fixed fields which is not available in other awks (there are many awks, but Gawk runs on pretty much any OS - certainly on all major OSes - and it's free).
    Gawk is like perl, only more elegant, and lacking the network sockets. Gawk and netcat in combination can do most anything perl can do, though, and often faster.
    --Charlie

  35. How about this? by Jordan+Block · · Score: 1

    This seems to be a pretty good collection of cheat sheets:
    [RICE.EDU]

  36. Re:Another failed chance to put search engines to by Cow4263 · · Score: 0

    Actually, geocities prevents direct linking to any file except html. To get around this (at least in IE) simply drag the shortcut onto your address bar. That will work for any server blocked geocities file type.

    Mike

  37. Re:Another failed chance to put search engines to by tolan's+my+name · · Score: 1

    Thanks,

    What a nice helpful guy[?] like you doing posting at 0?

  38. wow by ReidMaynard · · Score: 1

    If you had kept a notebook, like most of us learned todo in grade school, you would have your own notes to refer to. :-P

    --
    -- www.globaltics.net

    Political discussion for a new world

  39. Re:Another failed chance to put search engines to by Cow4263 · · Score: 0

    Some dumb early mistakes, which have haunted me ever since. Basically, posting to troll posts (thus lowering my karma as well)..

    Anyway, its taken a while for me to slowly recover (and the all enternal fear of misposting again, thus continuing the cycle). I currently have a Karma of -3. I probably should have just gotten another name, but I use this for nick for everything, and using anything else would feel like cheating.

    Oh, well... this will probably be modded -1, Offtopic... and thus the circle continues...

  40. Funny thing is by Anonymous+Koward · · Score: 1
    seems most people are incapable of understanding the man pages anymore, let alone apropos/man -k


    but what do I know...I don't use linux anymore for my *nix experiences...too many linuxisms for my tastes