Slashdot Mirror


Top 10 Items in the Linux Admin Toolkit

Joe Barr writes "Joe 'Zonker' Brockmeier has listed his favorite top ten tools for Linux system administration in a story on Linux.com, one of Slashdot's sister sites." From the site: " Since I spend a lot of my time working with text files, either when I'm writing and editing or when I'm mucking with configuration files and shell scripts, I've become very attached to my editor of choice -- Vim. Over the years, I've tried a lot of other editors, but none of them has been sufficient to coax me away from Vim. Part of the reason for that is the fact that I no longer have to think about using Vi-style keybindings, and adjusting to anything else would seriously hinder my productivity."

357 comments

  1. Vim? Emacs foreva! by Anonymous Coward · · Score: 0, Insightful

    I've become very attached to my editor of choice -- Vim.

    Emacs forever!!!

    1. Re:Vim? Emacs foreva! by Rosco+P.+Coltrane · · Score: 2, Informative

      You're right, with this, Emacs rocks.

      --
      "A door is what a dog is perpetually on the wrong side of" - Ogden Nash
    2. Re:Vim? Emacs foreva! by MORTAR_COMBAT! · · Score: 5, Funny

      the article said "toolkit" not "tool shed, tool warehouse, and tool factory on wheels".

      --
      MORTAR COMBAT!
    3. Re:Vim? Emacs foreva! by Anonymous Coward · · Score: 5, Funny

      The only 3 commands any Emacs user needs to know:

      Ctrl-x
      Ctrl-c
      vi

    4. Re:Vim? Emacs foreva! by cayenne8 · · Score: 3, Insightful
      I find that sed and awk are two tools I use the most. Not so much for sys admin stuff...but, I get all kinds of fscked up files that need to be cleaned up for insertion into an Oracle database instance.

      They usually give me stuff in Excel format...gotta export it to csv file...then, clean out imbedded CRLF's, headings and such...especially with free form txt fields. Anyway, a little scripting and scrubbing with awk and sed...and I can generate some good insert scripts for the databases.

      --
      Light travels faster than sound. This is why some people appear bright until you hear them speak.........
    5. Re:Vim? Emacs foreva! by happyemoticon · · Score: 1

      They both have their uses, really. If we're talking programming or editing XML, it's emacs all the way. nxml-mode really beats the shorts off of everything on the market, free or not. But administration, especially if you're going to be doing it through an xterm to a remote machine, is strictly a vim thing.

      I'd really like to learn how to use vim better, but since I spend most of my time writing XML and not editing plaintext, I don't have much opportunity.

    6. Re:Vim? Emacs foreva! by wertarbyte · · Score: 1

      I have not tried emacs yet (in fact I did several years ago, but it sticked to vim), but I find the XML plugin for vom quite handy when editing XHTML code. It might not be as mighty as emacs, but it's not as big either :-)

      --
      Life is just nature's way of keeping meat fresh.
    7. Re:Vim? Emacs foreva! by drinkypoo · · Score: 2, Funny
      sed is my hero. When you have a directory full of mp3s named something idiotic like "band name (track number) song name - ( crack group ).mp3" it's nice to be able to do the following:

      Sorry, I was going to have an example of a for loop with sed, but I got busted by the lame filter. Seems like it gets harder to get past the stupid lameness filter all the time, yet I *STILL* constantly see goatse ascii. Why even fucking bother with the stupid thing if it doesn't work? You assholes.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    8. Re:Vim? Emacs foreva! by Anonymous Coward · · Score: 3, Funny

      Sorry, I was going to have an example of a for loop with sed, but I got busted by the lame filter. Seems like it gets harder to get past the stupid lameness filter all the time, yet I *STILL* constantly see goatse ascii. Why even fucking bother with the stupid thing if it doesn't work? You assholes.

      Obviously and sadly, the gay niggers are intellectually superior to you.

    9. Re:Vim? Emacs foreva! by Anonymous Coward · · Score: 1, Funny

      Nano!!

    10. Re:Vim? Emacs foreva! by drinkypoo · · Score: 1

      Yeah, emacs rocks - back and forth, in the corner, humming quietly to itself...

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    11. Re:Vim? Emacs foreva! by jrockway · · Score: 1

      This is the first time I've ever actually said, "This is flamebait" aloud while reading a slashdot summary. :) "Hi there. I'm submitting `news' today. I wrote it in Vim. Vim is great. Vim, vim, vim." Flamebait. :)

      Regarding the OPs comments on vi keybindings, he should realize that vi keybindings are a dirty hack in most applications because most applications don't have a command mode and an insert mode. I imagine it's difficult to treat the shell prompt like vi.

      Emacs, OTOH, has a keybinding style that translates great to other apps. GNU apps all use emacs keybindings (I wonder why), and even IDEs like eclipse have compatibility modes. I'm glad I'm not a vi user because I know I would never be able to get things done in GUI programs like eclipse.

      Anyway, if you use a GNU system like Linux, you should learn emacs. Bash (readline), info, etc. all work just like emacs. It will really save you time and effort when every app uses the same keystrokes. C-t is a great timesaver in both bash and emacs.

      (I didn't know this until I learned emacs many years ago and realized that C-a and C-e worked in bash too. Then I noticed, hey, so does C-t, C-p, C-n, etc. C-r [isearch-reverse] is now my favorite bash feature, thanks to emacs. I always like it when learning one thing [emacs] makes another easier [bash].)

      As for vi, I know how to do basic stuff in it, but it basically upsets me. I have a wrt54g that doesn't have emacs on it and editing config files is a PITA. Why doesn't vi let me go to the end of the line by pressing, say, end or going to the end of a shorter line and then pressing the up arrow? Irritating. I know a vi guru is going to explain how to do this now, but I don't really care about the answer. What am I going to do the next time I'm stuck in vi and have a problem? (Hint: ESC :q!

      Emacs forever. </rant>

      --
      My other car is first.
    12. Re:Vim? Emacs foreva! by comcn · · Score: 1

      end of text on current line: $
      beginning of non-whitespace on current line: ^

      (think of regular expressions...)

      also:
      beginning of current line: 0
      append stuff to end of line: A
      insert text at beginning of line: I

    13. Re:Vim? Emacs foreva! by drinkypoo · · Score: 2, Funny

      Obviously and sadly, the gay niggers are intellectually superior to you.

      I don't have any problem with that, I'm secure in my race and my sexuality. What I find amusing is that the gay niggers are intellectually superior to the people writing the lameness filter.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    14. Re:Vim? Emacs foreva! by hackstraw · · Score: 2, Informative

      (I didn't know this until I learned emacs many years ago and realized that C-a and C-e worked in bash too. Then I noticed, hey, so does C-t, C-p, C-n, etc. C-r [isearch-reverse] is now my favorite bash feature, thanks to emacs. I always like it when learning one thing [emacs] makes another easier [bash].)

      As for vi, I know how to do basic stuff in it, but it basically upsets me. I have a wrt54g that doesn't have emacs on it and editing config files is a PITA. Why doesn't vi let me go to the end of the line by pressing, say, end or going to the end of a shorter line and then pressing the up arrow? Irritating. I know a vi guru is going to explain how to do this now, but I don't really care about the answer. What am I going to do the next time I'm stuck in vi and have a problem? (Hint: ESC :q!


      Disclaimer, I don't care what you or my neighbors use for a text editor, nor do I care what kind of toilet you prefer to take a dump in. Its not that big of a deal.

      I will say, that I find it a little strange that shells come with emacs bindings, when vi is kinda the default. I'm saying this because vi (or for some historical reason, ex) is the default editor and bindings in things like less and more. Aside from ^e and ^a, I don't know any other emacs commands. I do know that most shells will take vi commandline editing commands. Honestly, I forgot how to do this in my shell, zsh. Or maybe its the default. One of the things I like about zsh is that it is the only shell that correctly does multiline editing in vi mode, or at least it was. bash was unusable and broken at least in the past, there is no reason to change now.

      Oh, and going to the end of the line and beginning of the line in vi uses the carat ^ to the beginning and $ to go to the end. I've never tried keys that are on the dark side of the keyboard (where my hands aren't), so I don't know about that. The ^ and $ are not that foreign, because they are used to denote the beginning and end of lines in regular expressions. Intuitive? No. Easy to remember and associate with other stuff that I do every day, yup.

      As for vi, I know how to do basic stuff in it, but it basically upsets me. I have a wrt54g that doesn't have emacs on it and editing config files is a PITA.

      Again, I don't care. But I will say that emacs is not a standard UNIX thing, vi is. vim, my favorite editor, is not. I too have to deal with using "plain vi" sometimes. Its close, but certainly no cigar. I will say, that it is frustrating to work with someone that does not know vi at all. I'm not saying guru, but at least the basics. I would say that ^ and $ are a little beyond the basics, but it is something that someone should be able to pick up and remember after the first time of hearing about it.

      Again, vi, vim, or emacs are not better. vim and emacs have been in active development and used extensively over the years. They are both powerful editors. But everybody needs to learn the basics of vi if they are going to be using UNIX systems. Its one of those things. You do not have to like it.

    15. Re:Vim? Emacs foreva! by crazyvas · · Score: 2, Informative
      Emacs, OTOH, has a keybinding style that translates great to other apps. GNU apps all use emacs keybindings (I wonder why), and even IDEs like eclipse have compatibility modes. I'm glad I'm not a vi user because I know I would never be able to get things done in GUI programs like eclipse.

      Vi plugin for the Eclipse editor: http://www.satokar.com/viplugin/

      Anyway, if you use a GNU system like Linux, you should learn emacs. Bash (readline), info, etc. all work just like emacs. It will really save you time and effort when every app uses the same keystrokes. C-t is a great timesaver in both bash and emacs.

      Glad you realized you can use emacs keystrokes on bash. This doesn't mean much for emacs though. Bash allows for either emacs or vi keystrokes to be used. Type "set -o vi" to get it it use vi keystrokes, complete with the two modes. "set -o emacs" (which happens to be the default) to use emacs.

      Also note, that while info might use keybindings similar to emacs, 'less', which is one of the most often used commands, uses vi keybindings.

      Why doesn't vi let me go to the end of the line by pressing, say, end or going to the end of a shorter line and then pressing the up arrow? Irritating. I know a vi guru is going to explain how to do this now, but I don't really care about the answer.

      Next time you don't really care about the answer, please do us a favor and quit blaming it on vi.

    16. Re:Vim? Emacs foreva! by dindi · · Score: 1


      I am a proud mc user :) Seriously, spit on me or whatever, I love mc. Of course when I have to replace and do all kinds of serious mass-modifications I turn to vi, awk, sed

      I guess my mc stuff comes from the fact that I was an nc (norton commander) then dn (dos navigator) user, and as soon as I started using linux (in 94) I found mc very handy and loved the editor.

      In fact my wife asked me nowadays: are all these programming tools that nasty blue ? :) - as she sees me sitting in front of that classic blue stretched over 2 displays or several instances like 10 hours a day....

      so "no baby, that is just a text editor" :)

      besides: I am installing emacs right now ... the last time I saw it was like 8 years ago and this thread made me pretty curious...
      just these bits could come a bit faster over my dsl 74% [5 emacs21-el 1954800/7151kB 27%] almost there :)

    17. Re:Vim? Emacs foreva! by Coryoth · · Score: 1

      I find that sed and awk are two tools I use the most. Not so much for sys admin stuff...but, I get all kinds of fscked up files that need to be cleaned up for insertion into an Oracle database instance.

      I used to use awk and sed a lot, but these days I just use perl on the command line - perl -pe has better/more flexible regex than sed and is just as fast for any simple commandline munging. You can do anything awk does while you're at it. Never underestimate perl -i~ -F[PATTERN] -ape for getting things done.

      Jedidiah.

    18. Re:Vim? Emacs foreva! by jrockway · · Score: 1

      > end of text on current line: $
      > beginning of non-whitespace on current line: ^

      I will admit that that is pretty cool. Although in regular expressions, ^ and $ are beginning- and end-of-string matchers. Beginning and end of line are \A and \z... at least in perl (there are programming languages other than perl? pshaw :)

      --
      My other car is first.
    19. Re:Vim? Emacs foreva! by Anonymous Coward · · Score: 0

      I have used VI for about five years, and toitally stink at it. I know there are 53 bazillion hotkeys, but I use only the following:

      ESC
      I
      arrow keys
      dd
      x
      and the happy letter A, which I only learned about last year :)

      I should really put up a cheat sheet one of these days by my monitor.

    20. Re:Vim? Emacs foreva! by Terrasque · · Score: 1

      Thanks a lot! Last time I tried emacs I had to kill it from another terminal :)

      --
      It's The Golden Rule: "He who has the gold makes the rules."
    21. Re:Vim? Emacs foreva! by Mysticalfruit · · Score: 1

      Personally, my favorite editor is jed. Key bindings of emacs, memory footprint of vi...

      --
      Yes Francis, the world has gone crazy.
    22. Re:Vim? Emacs foreva! by kobold2 · · Score: 1

      Who was this guy? :-)

    23. Re:Vim? Emacs foreva! by Sketch · · Score: 1

      Could be worse. Back when all I had was a shell account, I use to have to hang up and redial whenever I got stuck in vi (usually by hitting "v" instead of "b" in more...).

      --
      -- OpenVerse Visual Chat: http://openverse.com
    24. Re:Vim? Emacs foreva! by Geoffreyerffoeg · · Score: 1

      What I find amusing is that the gay niggers are intellectually superior to the people writing the lameness filter.

      Hey guys...what if you just take out all the other lameness filter rules and replace it with these? /Gay Nigger/i /GNAA/i

      There goes your problem.

  2. My List by Anonymous Coward · · Score: 0

    - BusyBox
    - VIM

    1. Re:My List by Rosco+P.+Coltrane · · Score: 3, Funny

      Don't forget:

      - 1 bag of Cheerios
      - 3 lettuces
      - 1 lbs of carrots
      - Detergent
      - 6 Dr. Pepper bottles
      - 1 box of tampons

      otherwise don't bother to come home.

      -- Your wife Linda

      --
      "A door is what a dog is perpetually on the wrong side of" - Ogden Nash
    2. Re:My List by Anonymous Coward · · Score: 0

      Linda,
          Why don't you slow down on the Dr Pepper you cow? Then maybe we wouldn't have to buy the Cheerios in a BAG. And if you ever disrespect me on Slashdot again I'll slap so hard you'll get modded -1 Ugly.

      Love,
      A. Coward

    3. Re:My List by morcheeba · · Score: 1

      Your house must have been a real hit with the kids last night...

      What did you get?
      - A head of lettuce
      Uh, better than what I got: a scoop full of detergent. It wasn't even "fresh scent".

  3. Most important item by Anonymous Coward · · Score: 5, Funny

    Condoms! With all the groupies chasing Linux system admins, you can never have too many condoms!

  4. strace by epiphani · · Score: 2, Informative

    by far the most useful tool in troubleshooting.

    --
    .
    1. Re:strace by Anonymous Coward · · Score: 0

      Ditto that.

      And a trusted environment to run tests from.

      Either a bootable cd distro (like http://www.knoppix.org/) or a bootable USB installation (like http://www.debian-administration.org/articles/179) .

    2. Re:strace by lky · · Score: 3, Informative

      Dont forget these, any one will provide the needed/wanted tools for recovery.

      Forensic and Incident Response Environment: http://fire.dmzs.com/
      Linux Bootable Business Card: http://www.lnx-bbc.org/
      Ultimate Boot CD: http://ubcd.sourceforge.net/
      Knoppix Security Tools Distribution: http://www.knoppix-std.org/
      SystemRescueCd: ahref=http://www.sysresccd.org/rel=url2html-26348h ttp://www.sysresccd.org/>

  5. SSH by whichpaul · · Score: 1

    What's telnet? :P

    1. Re:SSH by kaarlov · · Score: 2, Informative
      ssh -p 25 mail.example.com
      is far less useful than:
      telnet mail.example.com smtp
    2. Re:SSH by drinkypoo · · Score: 2, Informative

      telnet is the program that lets you test SMTP by connecting to 25/tcp, unlike ssh.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    3. Re:SSH by fimbulvetr · · Score: 4, Informative

      I'm actually suprised this guy used telnet. I find netcat (man nc) as a much better alternative. I can script it, I can do udp, and I can do port "testing".

    4. Re:SSH by kaarlov · · Score: 1

      I use netcat too, especially in scripts. But it is not always installed and if I just need to check SMTP-connection, or something like that, it is not always really worth installing.

      And the main point was that SSH doesn't do everything.

    5. Re:SSH by garaged · · Score: 0

      obviously he doesn't do a lot of network testing

      --
      I'm positive, don't belive me look at my karma
    6. Re:SSH by Anonymous Coward · · Score: 0

      or if that DNS server responds on port 53.

    7. Re:SSH by Ratbert42 · · Score: 1

      I'd put PuTTY way before telnet. A quick download or copy from a USB key and I can ssh into a machine from any Windows box.

    8. Re:SSH by hazem · · Score: 2, Informative

      If you need to automate something like telnet or ftp (or anything interactive on the command line), "expect" allows for some very powerful scripting.

      It "expects" certain things and provides an appropriate output.

    9. Re:SSH by Pheersome · · Score: 4, Informative

      I was actually going to say something very similar, and then I realized that I use telnet over netcat for certain purposes, because telnet notifies me when it actually connects. However, a couple minutes ago I realized I was being an idiot, because 'nc -v' does the same thing.

      Also, if you haven't already, check out nmap-ncat.

      --
      Better to light a candle than to curse the darkness.
    10. Re:SSH by aguy_likeme · · Score: 1

      i find echo "whatever" /dev/tcp/127.0.0.1/1234 or echo "whatever" /dev/udp/127.0.0.1/1234 much easier sometimes. -- http://smr.moved.in/

    11. Re:SSH by Anonymous Coward · · Score: 0

      What exposes those sockets as files?

    12. Re:SSH by whichpaul · · Score: 1

      Sure telnet is ... but ... in the world of real-life linux administration I find myself using telnet WITHIN an SSH session. I'm accessing servers that are anywhere from 5 minutes drive to 48 hours flight away from me. Without SSH, all the most basic tools in Linux Administration are uselessly insecure. I couldn't administrate without it. Besides since when does a serious Linux admin spend all day test TCP port 25? I have web servers, raid arrays, imap servers and DNS to look after. All of which I access through an SSH session.

    13. Re:SSH by whichpaul · · Score: 1

      Why do I get the feeling that half the people in this discussion are just hobbyists? ;)

    14. Re:SSH by Cili · · Score: 1

      And so can the windows boxes' 0wner, since you type your login and password to login.

  6. FLAME ON! Or not.... by Bonker · · Score: 5, Insightful

    Yes, let's dig one of the oldest flamewars back up in the summary rather than discuss some of the article's other excellent information.

    TFA mentions WGet, one of the most wonderful, most needed applications that most users and admins ON EVERY PLATFORM don't know they need. Why not focus on this rather than ressurect the text editor wars?

    --
    The next Slashdot story will be ready soon, but subscribers can beat the rush and slashdot the links early!
    1. Re:FLAME ON! Or not.... by Anonymous Coward · · Score: 0

      mod parent up

    2. Re:FLAME ON! Or not.... by Bogtha · · Score: 4, Insightful

      Why not focus on this rather than ressurect the text editor wars?

      Big flamewar == more pageviews. More pageviews = more ad impressions. More ad impressions == higher profits.

      Slashdot editors post "provoking" (i.e. flamebait/troll) summaries/articles so frequently that you can essentially rule out stupidity and go straight to malice.

      --
      Bogtha Bogtha Bogtha
    3. Re:FLAME ON! Or not.... by arevos · · Score: 2, Interesting

      Does anyone seriously have flamewars over Vi vs. Emacs anymore?

    4. Re:FLAME ON! Or not.... by wroshyyr · · Score: 1

      Big flamewar == more pageviews. More pageviews = more ad impressions. More ad impressions == higher profits

      Except that I use Firefox with Adblock.... so yeah, whatever

    5. Re:FLAME ON! Or not.... by Anonymous Coward · · Score: 0

      How can it be malice if they own the website? You can't commit malice against something you rightfully own. You weren't going to claim they committed malice against you, were you?

    6. Re:FLAME ON! Or not.... by Ceriel+Nosforit · · Score: 1

      Slashdot editors post "provoking" (i.e. flamebait/troll) summaries/articles so frequently that you can essentially rule out stupidity and go straight to malice.

      Never. Never-ever-ever-never, rule out stupidity.

      In a similar vein, I doubt the Eds are insidious and cunning enough to pull off what you propose. At most, Slashdot has stumbled on a formula that works, from multiple aspects.

      --
      All rites reversed 2010
    7. Re:FLAME ON! Or not.... by Bogtha · · Score: 1

      Deliberately provoking arguments counts as being malicious in my opinion. You disagree?

      --
      Bogtha Bogtha Bogtha
    8. Re:FLAME ON! Or not.... by slavemowgli · · Score: 1

      Or at least, indifference and a focus on profits rather than naivity.

      I think Taco's recent "editorial" about how Blizzard made him change his name because it was in violation of the rules and he knew so is a perfect example of that - every reasonable person would've concluded that forcing someone to change their name when it clearly *is* a violation of the rules, when the person knew about the rules before they chose a name, and when the rules actually do make sense, too (as opposed to just being there "because we can") is a non-issue, and a non-story. On Slashdot, though, it gets a whiny editorial that generates literally thousands of comments.

      So yes, you're definitely right - and anyone who still maintains that the Slashdot "editors" care about anything except ad revenue is naive.

      --
      quidquid latine dictum sit altum videtur.
    9. Re:FLAME ON! Or not.... by Taladar · · Score: 1

      Today most of us emacs and vi users have to combine our forces to repell those ignorant to the virtues of an efficient texteditor who value learnability over anything else including efficiency.

    10. Re:FLAME ON! Or not.... by Andrewkov · · Score: 1

      Bug off, Windows Notepad rules! ;-)

    11. Re:FLAME ON! Or not.... by jacksonj04 · · Score: 1

      I've always found Notepad to be efficient...

      </snide_remark>

      --
      How many people can read hex if only you and dead people can read hex?
    12. Re:FLAME ON! Or not.... by _Sharp'r_ · · Score: 1

      No, on FreeBSD, wget is redundent, as we have the much better "fetch" command. :)

      --
      The party of stupid and the party of evil get together and do something both stupid and evil, then call it bipartisan.
    13. Re:FLAME ON! Or not.... by Anonymous Coward · · Score: 0

      Yeah, that 'efficiency over all' attitude pays off so well in the development world.

      I love playing janitor behind you micro-optimizers. It's so much fun to disentangle a 'brilliant' method of shaving 6 cycles from a routine that runs once in a system meant to stay up 24/7.

    14. Re:FLAME ON! Or not.... by timeOday · · Score: 1
      TFA mentions WGet, one of the most wonderful, most needed applications that most users and admins ON EVERY PLATFORM don't know they need.
      Another in the same class is netcat ("nc"). If you don't need encryption and want the *fastest* way to get data from one host to another without configuring some sort of server process, netcat is it!
    15. Re:FLAME ON! Or not.... by saskboy · · Score: 1

      Malice? I like flamewars thank you very much. Some of the best jokes are born out of them, and as long as no one dies or goes home with hurt feelings, it's the only way to fight in modern times: Semi-anonymously against people you may never meet again. And hope they aren't your boss later in life, and they find out you like VI instead of EMACS.

      --
      Saskboy's blog is good. 9 out of 10 dentists agree.
    16. Re:FLAME ON! Or not.... by Anonymous Coward · · Score: 0

      Yeah, but the rules DON'T make sense. In what way does "CmdrTaco" contain anything that remotely looks like a title/rank OR a famous person? And if they're going to enforce arbitrary rules, why the hell don't they enforce them AT THE TIME YOU CREATE THE FUCKING NAME?

    17. Re:FLAME ON! Or not.... by DRue · · Score: 1

      You would be correct if fetch supported recursive downloading.

    18. Re:FLAME ON! Or not.... by cloudmaster · · Score: 1

      Those idiots wasting memory on Emacs have finally decided that they're wrong, and have stopped hassling the enlightened vi crowd, for the most part. Or, they're waiting for their computer to stop swapping emacs out so they can load a browser module into their OS, err, editor and post their foolish viewpoints. :)

  7. Clasis usability by oliverthered · · Score: 2, Insightful

    adjusting to anything else would seriously hinder my productivity, for a couple of weeks after which it may improve significantly.

    I like vim for command line and something like textpad for GUI text editing. I've never tried Emacs, but then again I don't do a huge amount of text editing.

    --
    thank God the internet isn't a human right.
    1. Re:Clasis usability by Rosco+P.+Coltrane · · Score: 0, Offtopic

      I've never tried Emacs, but then again I don't do a huge amount of text editing.

      Hey you know what? I really like Birkensocks, but then again I'm a double leg amputee...

      --
      "A door is what a dog is perpetually on the wrong side of" - Ogden Nash
    2. Re:Clasis usability by stoanhart · · Score: 1

      Do you know of a good TextPad like editor for linux? I love textpad, but I really miss a good editor when I'm on my linux machine. thanks

    3. Re:Clasis usability by Anonymous Coward · · Score: 0

      Do you know of a good TextPad like editor for linux? I love textpad, but I really miss a good editor when I'm on my linux machine.

      gvim. I recently started using gvim for some full-screen GUI text editing...it rocks!

    4. Re:Clasis usability by Macka · · Score: 3, Informative


      I like vim for command line.....

      You can't do a whole lot of typing on the command line then either. I've never bothered to learn to use the Emacs editor (tried about 15 years ago and hated it) so I always use the vi editor ... but when it comes to command line editing, "emacs mode" whoops "vi mode" totally. Being able to use the arrow keys to scroll back commands or navigate the command line, along with ^a (beginning of line) ^e (end of line) ^r (to search for strings in your command history) ... "esc." (that's "dot" not a full stop, to recall the last field in the previous command string, etc, etc, etc....

      The only time I've had to use vi mode for command line editing is on HP-UX, where the lack of a modern shell by default and crap emacs mode support have forced me into it. The usability difference is horribly noticeable.

    5. Re:Clasis usability by Anonymous Coward · · Score: 0

      "Being able to use the arrow keys to scroll back commands or navigate the command line, along with ^a (beginning of line) ^e (end of line) ^r (to search for strings in your command history) ... "esc." (that's "dot" not a full stop, to recall the last field in the previous command string, etc, etc, etc...."

      You can do the same things when the shell is in vi mode. You just use different keys. In stead of the arrow keys you use h, j, k, and l for left, down, up, and right. If you want to search through your history, you use / or ? and after you've searched, n and N apply. If you want to append to the end of the line, use A. If you want to prepend to the beginning of the line, use I. All of the things that you can do in regular vi can be done in the vi shell mode. If you don't like the key bindings for either mode, make yourself an inputrc file.

    6. Re:Clasis usability by Anonymous Coward · · Score: 0
    7. Re:Clasis usability by kosibar · · Score: 1

      I have been using Kate. I'm more or less happy with it. I have yet to find a way to write Perl scripts or any other kind of script to process text.

      I want a GUI text editor that has some flexibility in the way of custom scripting and some common tools like increase and decrease indent of a selected block, syntax highlighting, commenting a selected block, changing case, stripping HTML tags, joining split lines, etc. (Some of this is available in Kate.)

      Some features are nice, too, like line numbers, a replace feature with good regex support... and, of course, it has to be capable of opening/saving via SFTP.

    8. Re:Clasis usability by Macka · · Score: 1


      Yes, I know all that, and I'm quite comfortable using h,j,k,l when editing files. Sometimes I switch between them and the arrow keys without even realising it if my fingers happen to be nearer. But for command line editing it's not as intuitive, nor is it as quick when you have to use two key strokes and two hands just to recall previous commands and edit/execute them. The arrow keys are there on your keyboard for a good reason. Most people are more productive when they use them!

      As for using an inputrc file; I'm a consultant and regularly move between many customer sites and systems. I don't think its practical or proper that I should have to create and populate an inputrc file where ever I go in order to be able to more intuitively navigate the command line. Besides which the presence of an unexpected inputrc file could present other users of the systems (i.e. the customers) with an unpleasant surprise if they're not expecting it and/or don't like my choice of keybindings.

  8. Go flameware! Go Zonk! Go /. by conJunk · · Score: 2, Funny

    nothing quite like a vi/emacs flame fight to cap off the afternoon, eh? thanks y'all!

  9. Mine by hackstraw · · Score: 5, Interesting
    In alphabetical order:
    • [rs]sh - enables me to go places w/o passwords, copy files, and remotely execute commands. I can't live without it
    • cron - does my work for me while I sleep, and mails me the results in the morning
    • grep - the filter of filters. Keeps down the signal to noise ratio
    • less - the pager of pagers. With a proper lessopen/pipe, you can do what no man has done before. You can go backwards in files, although I guess some 'more's can do this now. Less always can. It also highlights text searches so I don't have to search for what I just searched for.
    • man - that's where they hide the documentation. Shame on those that only provide info, text, or worst, html documentation (or none)
    • perl - anything that any other command cannot do, or cannot do well enough, perl can with some coaching.
    • rsync - although its binary diff algorithm is not very good, rsync is close to heavenly, especially
    • when teamed with [rs]sh and cron
    • telnet - no, I never telnet to login to a machine, but I do it to test if a port is open, what's listening there, etc. very handy.
    • vim - good editor, I can live with vi, but that makes me a little grumpy. I simply do not know or care to learn emacs. Its just a text editor.
    • zsh - excellent shell. Very user friendly, consistent error messages, powerful. It can do anything any other shell can do and more. I understan
      d that bash has made some progress over the years, but zsh is my friend.
    • /dev/null - where I put all of my important stuff. So should you!

    • Honorable mention - /bin/sh Only because it is always there by definition on UNIX systems, and a good shell programming language. tcsh, csh, and zsh are not as good as /bin/sh, and its always available, but a little boring to write about.
    1. Re:Mine by Stephen+Williams · · Score: 4, Informative

      Shame on those that only provide info, text, or worst, html documentation (or none)

      For reading HTML docs over ssh or on an X11-less machine, might I recommend w3m? It's a very comfortable text-mode web browser. Unlike Lynx, it renders tables nicely, and even makes a brave attempt at frames.

      -Stephen

    2. Re:Mine by illustir · · Score: 2, Informative

      I agree with most of your stuff and you're probably better at *NIX than I am but I might suggest replacing telnet with nc which does both connecting and listening.

      --
      -- Alper
    3. Re:Mine by Anonymous Coward · · Score: 1, Funny

      I really only have one:

      nethack

    4. Re:Mine by frodo+from+middle+ea · · Score: 2, Interesting
      use netcat instead of telnet to test port connectivity. you can even use it in a shell script.

      My additions

      • find and xargs
      • dmesg
      • uname -a
      • ps --forest
      • awk :- for when perl is not available
      • ssh/scp
      • netcat
      • mc
      • elinks :- better alternative to lynx
      --
      for the last time people, I am "frodo from middle eaRTH", not "middle eaST".
    5. Re:Mine by eosp · · Score: 1

      I agree on grep at least...I didn't know the syntax for find a couple years ago (and was too lazy to get the manual on it) so i did this: pushd /; find | grep filename.txt; popd

    6. Re:Mine by Anonymous Coward · · Score: 1, Interesting

      [rs]sh - enables me to go places w/o passwords, copy files, and remotely execute commands. I can't live without it

      You know, I think it's funny every time I hear some Windows admin complain about trying to upgrade and change settings across a bunch of computers for programs for which Group Policy (I think that's what they call it, isn't it?) isn't supported. With ssh/scp on the client machines (port 22 appropriately firewalled off from everything else), it is as straightforward as such things can possibly be to install a program or push a config file in batch to many similar machines.

    7. Re:Mine by BrookHarty · · Score: 3, Interesting

      Everyone I know switched to SSH and dumped RSH. Keyfiles are your friend.

      ssh/scp
      snoop
      cat (Sometimes easier to paste a file than scp one)
      tail (-100f, I dont care if you are changing the command!)
      ksh (solaris standard)
      du (I always catalog an entire system, quicker than find, and im impatient)
      But grep, perl and less, vi are always on the list.
      and bzip/gzip for log files.
      telnet for testing ports.
      Cron is more server process, I wouldnt coun't it as a command.

      But for home use, wget, screen, links, du. Wget under screen for files.

    8. Re:Mine by gonaddespammed.com · · Score: 1

      egrep is more useful than grep
      netcat (nc) is more better than telnet
      and I like nvi more than vim (let the vi vs vi wars begin, bugger emacs)

    9. Re:Mine by mindriot · · Score: 5, Informative

      While rsync is very nice for syncing files, I've found another, somewhat related tool much nicer for my purposes. I have a desktop and a laptop computer, and to a great extent I work on the same files on both. Syncing my home directories could be done using rsync to some degree, but it's rather painful if you have modified files on both sides.

      This is where unison comes in handy. It keeps two directories synchronized nicely, adjusting changes in both directions automatically and querying the user in case of collisions. One of my favorite tools, and I'm sure I'm far from being the only one with a need for something like it.

    10. Re:Mine by hackstraw · · Score: 2, Interesting

      Everyone I know switched to SSH and dumped RSH. Keyfiles are your friend.

      I use rsh/rcp on private networks. Less overhead, no need for keys, and it reminds me of the good old days when the internet was a friendly place :)

      I require ssh to access a machine from the outside world, but once your in, we are all friends again.

      Yeah, du is arguably top 10 or 20. gzip/bzip/tar definitely top 20, but boring.

      I cannot believe that I forgot truss/strace/ktrace.

      That family of commands are top 10 to knock somebody off. Don't know whats going on? These guys will tell you.

      Cron is more server process, I wouldnt coun't it as a command.

      True.

      I also guess sed is top 10 or 20 as well. Top 10 is rough for UNIX because there are so many small utilities that do killer stuff.

    11. Re:Mine by hackstraw · · Score: 1

      which grep
      grep: aliased to egrep

      I've used netcat a long time ago, I'll look back into it. I forgot about it.

      Oh, and another command:

      netstat

    12. Re:Mine by sploxx · · Score: 1

      telnet - no, I never telnet to login to a machine, but I do it to test if a port is open, what's listening there, etc. very handy.

      A bit OT, but I have to say that I do use telnet, but only on my home network where I have 100% control. Some of my machines are simply very resource-constrained so telnet still makes sense here.

      For cross-internet or other insecure connections, I always use ssh though.

    13. Re:Mine by Anonymous Coward · · Score: 2, Informative

      rsync - although its binary diff algorithm is not very good, rsync is close to heavenly

      Except it's a piece of junk! We used to use it to maintain a set of files between two servers. As long as the number of files was trivial, it worked. When copying 22M files with gigabit ethernet between two Sun servers each with 8 gigabytes of RAM, it took almost a week to copy over the single file that had changed. rsync took almost a gigabyte of RAM and almost a week of time just to copy one file! Now we just run a simple script that runs find then scp to copy complete files that changed. It take about two hours. The simple shell script is over 75 times faster than rsync.

      These problems with rsync have been known for years. Do a search on deja.com to see all of the complaints.

    14. Re:Mine by FyRE666 · · Score: 4, Funny

      egrep is more useful than grep
      netcat (nc) is more better than telnet

      I don't wish to be picky, but it's
      "netcat (nc) is more betterer than telnet"

      Please prof reed yor articals!

    15. Re:Mine by i.r.id10t · · Score: 3, Informative

      Better thank lynx is links. Handles tables, frames, etc. no problem. Also, it can be compiled with various options to make it a graphical browser too, which is handy for X exported over SSH type things.

      --
      Don't blame me, I voted for Kodos
    16. Re:Mine by Anonymous Coward · · Score: 1, Funny

      grep - the filter of filters. Keeps down the signal to noise ratio

      Interesting. Most people would prefer a high signal to noise ratio, but whatever floats your boat.

    17. Re:Mine by portscan · · Score: 2, Insightful

      if you are a sysadmin, then you are administering the system. perl would always be available.

      that said, awk rocks.

    18. Re:Mine by wumingzi · · Score: 1

      Eeeeek!!!!

      Grep is good for many many things, but find does that so nicely by itself.

      e.g.

      find /pathname -name filename.txt

      No pushd, no popd, no grep, and no nasty, resource-hogging pipes.

    19. Re:Mine by Anonymous Coward · · Score: 0
      Resource constrained? Set up inetd to start sshd. Like this:
      ssh stream tcp nowait root /usr/sbin/sshd sshd -i
    20. Re:Mine by BoyPlankton · · Score: 1

      I use elinks http://elinks.or.cz/ although it's been so long since I evaluated them that I can't remember why I liked it better.

    21. Re:Mine by Xarius · · Score: 1

      Not to mention that links has a graphical mode under the framebuffer too. :)

      --
      C17H21NO4
    22. Re:Mine by Andrewkov · · Score: 1

      Yep, I've been using Unison to sync up my work laptop (over ssh from work!) with my home linux server, and Windows PC's on my home LAN. It works like a charm! It does seem picky about versions, though, you have to have the same version on all your PC's.

    23. Re:Mine by cwry · · Score: 2, Informative
      The comment on nasty, resource-hogging pipes is interesting, because on my system, using grep instead of -name is consistently faster than find:
      $ for ((i=0;i<5;i++)); do time find ~ 2>&1 | grep foo > /dev/null; done 2>&1 | grep real
      real 0m0.486s
      real 0m0.482s
      real 0m0.486s
      real 0m0.481s
      real 0m0.484s
      $ for ((i=0;i<5;i++)); do time find ~ -name foo 2>&1 > /dev/null; done 2>&1 | grep real
      real 0m0.575s
      real 0m0.581s
      real 0m0.577s
      real 0m0.576s
      real 0m0.579s
      Sure, it's not a huge difference, but the fact that grep is ~16% faster doesn't make me think twice about using the more generic | grep foo. The speed difference is even larger when you introduce wildcards. For example -name '*.foo' versus grep '.*foo$'
    24. Re:Mine by gregoryl · · Score: 2, Interesting

      "You can go backwards in files, although I guess some 'more's can do this now. Less always can. "

      'more' on commercial UNIXes has been able to do that for ages (though in Solaris and MP-RAS you have to use /usr/xpg4/bin/more instead). At least 5 years (memory doesn't go back further than that.) It's only linux that's dragged behind on this. Personally it infuriates me - linux is one of 5 UNIX[-like] OSes that I use daily, and the only one that thinks to be different in this. I've been typing 'more' in UNIX now for 15 years, and still do on everything except for linux. Why rename it? (Yes I know I could just rm and symlink or do an alias - I have done - it's the principle.) I can emerge several different vi derivatives and they all answer to 'vi'.
      It's not the only thing too that's annoyingly different in linux:
      * most distros complain that nslookup 'depreciated' and should use dig - nslookup is still the standard on other UNIXes.
      * head and tail complain that should be using the -n argument instead of the normal "head -#" like UNIX has had for decades. Why???
      * shells wont properly parse:
      echo "one two three" | while read blah ; do echo $blah ; done
      which it will on all other UNIXes.

      Seriously, why be different? I used to be an eager linux touter like the other slashdotters, and when I write scripts and work instructions to be used on all the commercial UNIXes I find the odd silly difference - but when we got a couple of linux systems the other day my initial joy when out the window.

      I currently maintain 300 UNIX boxes in a major corporation, of which linux would only be suited for a couple of the roles (more of hardware limits and software compatibility than politics) and it's these silly little things that cause linux to not subtly slip in to the corporate world.

    25. Re:Mine by tzot · · Score: 2, Informative
      egrep = grep -E
      fgrep = grep -F
      $ ls -l /usr/bin/?grep
      lrwxrwxrwx 1 root root 10 2004-10-12 23:46 /usr/bin/egrep -> /bin/egrep
      lrwxrwxrwx 1 root root 10 2004-10-12 23:46 /usr/bin/fgrep -> /bin/fgrep
      -r-xr-xr-x 2 root root 33872 2004-04-06 06:56 /usr/bin/pgrep
      -rwxr-xr-x 3 root root 3456 2004-04-06 06:49 /usr/bin/zgrep
      --
      I speak England very best
    26. Re:Mine by tzot · · Score: 1
      and what I forgot to paste:
      $ cat /bin/?grep
      #!/bin/sh
      exec /bin/grep -E ${1+"$@"}
      #!/bin/sh
      exec /bin/grep -F ${1+"$@"}
      --
      I speak England very best
    27. Re:Mine by Anonymous Coward · · Score: 0

      (begins to emerge lynx and links...)

      Thanks! I knew there was something I was missing on this box!

    28. Re:Mine by hackstraw · · Score: 1

      'more' on commercial UNIXes has been able to do that for ages (though in Solaris and MP-RAS you have to use /usr/xpg4/bin/more instead)

      I love and hate solaris for that. Actually, I think I more love it, because Solaris is _very_ slow to change, and that means to us, much fewer surprises. I didn't know (or care) that /usr/xpg4/bin/more could go backwards. Less has been around what, 20 years now. Less is more :)

      It's only linux that's dragged behind on this.

      I've never really depended on more, because less has always been around. But I checked the more manpage for an older linux distro, RH 7.1, and the manpage says that you can go backwards with b or ^b, I guess it works.

      most distros complain that nslookup 'depreciated' and should use dig - nslookup is still the standard on other UNIXes

      Yeah, what is up with that? OS X does it too. Its obnoxious, and I will use nslookup until it says "command not found".

      head and tail complain that should be using the -n argument instead of the normal "head -#" like UNIX has had for decades. Why???

      I've never seen that. That sucks too.

      hells wont properly parse:

      echo "one two three" | while read blah ; do echo $blah ; done
      which it will on all other UNIXes.


      Works for me(tm). I use zsh, I just tried bash and it works. If a shell can't do that, that is completely broken, and I don't know how that can go unnoticed.

      At this time, I use many scripts and whatever on OS X, Linux, and Solaris that have no real surprises. All are good. I'm not trying to advocate Linux to do something that it can't, but /bin/sh, which is bash, is pretty good as /bin/sh (OS X and Linux here). From what I gather it is supposed to be completely Borne shell compliant when called 'sh'. I'm not a bash advocate, but it seems to work OK as far as I've ever known.

    29. Re:Mine by geniusj · · Score: 1

      I like nvi more as well. Last I checked, however, grep and egrep are just hardlinks pointing to the same data. I guess it might depend on the OS though. grep -E with GNU Grep is the equivalent of using egrep as well.

    30. Re:Mine by timeOday · · Score: 1

      Within a cluster, ssh is just too slow and you don't need the encryption anyways. Yet ssh is such a nice, featureful application (port forwarding in particular) I sometimes wish I could run it without encryption at all.

    31. Re:Mine by LordOfCoffee · · Score: 1

      less - the pager of pagers. With a proper lessopen/pipe, you can do what no man has done before. You can go backwards in files, although I guess some 'more's can do this now. Less always can. It also highlights text searches
      Why have less or more, when you can have mosthttp://www.jedsoft.org/most/ I just find it easier to use and it handles binary files.

      --
      He who controls the coffee...
    32. Re:Mine by belmolis · · Score: 1

      People who like grep should check out TRE agrep, which comes with the TRE regexp library. In addition to the usual regexp constructs, it allows for approximations with weights set individually for each group. For example, you can require that one part match exactly while another part can fail to match by up to 2 insertions.

    33. Re:Mine by Anonymous Coward · · Score: 1, Informative
      Honorable mention - /bin/sh Only because it is always there by definition on UNIX systems, and a good shell programming language. tcsh, csh, and zsh are not as good as /bin/sh, and its always available, but a little boring to write about.

      It is somewhat distressing that there are so many people in the Linux community who have missed out on a whole era of Unix and it's history. I'm being perhaps a little pedantic here but for clarity, /bin/sh is a link to /bin/bash on all Linux systems I've been on. So what the author really meant to say was, I like /bin/bash (me too!). /bin/sh is there to satisfy backwards compatibility with the Bourne and later POSIX shells. Strictly speaking, when bash is invoked as /bin/sh it should defer to the historical behaviour of Bourne or POSIX shells. Likewise it is telling (and painful) that no mention is made of 'ksh' (korn shell), IMHO the best shell of all (from a programming perspective). Much of bash is taken from ksh. I suppose that if bash becomes fully compatible with ksh I will have no longer of have a need ksh but until then, ksh still sits as king of the shell hill-top. And yes, please spend some time writting shell programs. Shell is a most underated programming tool. It is much more capable than many people realize.

    34. Re:Mine by Nailer · · Score: 2, Informative

      Nice post, but...

      > * [rs]sh - enables me to go places w/o passwords, copy files, and remotely execute commands. I can't live without it

      rsh has lots of known security vulernabilities and shouldd not be used at all.

      > * telnet - no, I never telnet to login to a machine, but I do it to test if a port is open, what's listening there, etc. very handy.

      You should use nc for this. Telnet will fail with lots of data, only does TCP, and can't listen on ports. nc handles lots of data, can do TCP or UDP, and can listen as well as send.

      > * Honorable mention - /bin/sh Only because it is always there by definition on UNIX systems, and a good shell programming language. tcsh, csh, and zsh are not as good as /bin/sh, and its always available, but a little boring to write about.

      True, but also, if the only Unix-like OSs you use are Linux, /bin/bash is there by definition. Functions, arrays, and other useful stuff.

    35. Re:Mine by Nplugd · · Score: 1
      Do a search on deja.com to see all of the complaints.
      Hi, welcome to 2005. Let me introduce you to a promising start up company, name is Google.
      --
      Je n'ai pas d'avenir Je n'ai qu'un destin Celui de n'être qu'un souvenir C'est pour demain
    36. Re:Mine by Vo0k · · Score: 1

      'More' can go back in files. Always did (or for at least 8 years...), no matter what unix.
      'Less' can go back in pipes. Always did, and 'More' never did, still can't.

      more /etc/passwd
      less /etc/passwd
      press b in any. More will take longer on a smart but slow terminal, scrolling in the whole previous page, but won't fail on dumb. Less will nicely scroll back using vt100/whatever builtins, but may show junk on dumb terminal.

      now try:
      cat /etc/passwd |more
      cat /etc/passwd |less
      Pressing b in more will have no effect (some error message). Pressing b in less will scroll back as usually.

      --
      Anagram("United States of America") == "Dine out, taste a Mac, fries"
    37. Re:Mine by donaldm · · Score: 1

      I happen to work on all major Unix machines and some sites refuse to have installed software other than what comes with the vendors distribution.

      in alphabetical order:

              * ssh - Not on all *nix machines - get it by any means possible.
              * rsh - try not to use this now, was ok in it's day.
              * cron - 0n all *nix machine. Totally agree.
              * grep - 0n all *nix machine. Totally agree.
              * less - Not on all *nix machines. The pager "more" is the standard and is identical or close to less with the exception of SUN's default one. You can use "pg" (never liked this) but I would say you have only worked on SUN systems.
              * man - All *nix machines - essential.
              * perl - Not on all *nix machines but get it anyway.
              * rsync - Not on all *nix machines - very useful if you need to synch file-systems locally or remotely (has support for ssh).
              * telnet - You won't have arguments from me here.
              * vim - I agree with you but this is not available on all *nix machines. Like it or not "vi" is still the standard. Emacs is excellent if you have the time to learn it but again emacs is not on all *nix machines.
              * zsh - Not on all *nix machines
              * /dev/null - No arguments here

              * Honorable mention - /bin/sh - no arguments here. However ksh is on all Unix machines (in Linux just change #!/bin/ksh to #!/bin/bash).

      Some others I find essential:

      top - not on all but there is a similar command in AIX, Solaris and HPUX. Not difficult getting this for all machines.

      netstat - your general purpose network tool. Yes I know there are better ones but you will have this on all machines.

      du, df (bdf in HPUX) - disk usage at a glance.

      ls - need I say anything on this.

      find - your standard (check your manual) Swiss Army knife, 1000+ uses.

      The beauty of *nix is the enormous amount of tools you have and can get to do your work. You may not use a particular tool for years then all of a sudden it becomes essential.

      --
      There ain't no such thing as proprietary standards only proprietary formats. Standards are by definition open.
    38. Re:Mine by el+americano · · Score: 1

      rsh has lots of known security vulernabilities and shouldd not be used at all.

      Not true. RSH is fine for an isolated automation environment where you want complete unfettered access to a slave machine. If I had a nickle for every installer that warned me against installing RSH without even knowing what I intended to use it for...

      It's nice to be able to talk back to those who want to decide what I should be able to use.

      --
      Those are my principles. If you don't like them I have others. -Groucho Marx
    39. Re:Mine by Linker3000 · · Score: 1

      Thanks for posting about Unison - I was looking for a way to backup the data on remote workers' PCs and laptops via broadband to a set of regional Linux servers and was contemplating a Bacula solution but it looks like Unison may do the job with a much easier install.

      In your experience, do you think Unison would be worth considering?

      Thanks

      --
      AT&ROFLMAO
    40. Re:Mine by Nailer · · Score: 1

      I don't want to decide what you shouldn't use. I want you to decide yourself what you shouldn't use.

      How many environments, realistically, are isolated these days? Where every single host attached to the same switch is trusted?

      Very few. Since OSs shouldn't install insecure software by default anyway, and most don't, why bother using RSH just to prove a point?

    41. Re:Mine by mindriot · · Score: 1

      If you're just interested in a pure backup, then it's more of an rsync scenario I would guess. Unison is useful if the same data is used and modified at different locations so that it needs to be synced both ways. If this is what you need, I recommend you to just take a look at Unison -- it's fairly simple. But due to the nature of two-way syncs with potential conflicts (the same file changed differently at both locations), it's usually interactive unless you force it to sync one specific way in case of conflicts (with the -prefer option). I can't really tell you if this will do the job for you, but it's easy to try it out. I haven't done anything with Bacula, so unfortunately I can't compare the two.

      A little downside of Unison, which another poster brought up in this thread, is that it insists on having identical Unison versions on both ends of the sync, and in case of version updates it sometimes forgets about the last synchronization state, resulting in a deep check of each and every file and more required manual interaction. On the other hand, if you have a version that works for you, simply stick to that one.

    42. Re:Mine by Nevyn · · Score: 1
      I can emerge several different vi derivatives and they all answer to 'vi'.
      It's not the only thing too that's annoyingly different in linux:
      * most distros complain that nslookup 'depreciated' and should use dig - nslookup is still the standard on other UNIXes.
      * head and tail complain that should be using the -n argument instead of the normal "head -#" like UNIX has had for decades.
      Why???

      Both of these points tell me that gentoo is crap, and that you don't seem to understand why "paying money for Solaris" and "not paying money for Linux" are giving you a different expereicne. It's like the people installing debian stable and then complaining that desktop Linux is horrible, sorry I have no pity for you ... in the words of Radiohead "You do it to yourself, you do, and that's what really hurts".

      --
      ustr: Managed string API with ave. 44% overhead over strdup(), for 0-20B
    43. Re:Mine by Cyn · · Score: 1

      grep - the filter of filters. Keeps down the signal to noise ratio

      You must be using it wrong then...

      --
      cyn, free software and *nix operating systems enthusiast.
  10. help please. by Anonymous Coward · · Score: 2, Interesting

    The autor makes a quick mention of vim, but what I'd really like to see is a full-blown developer session with vim, covering everything--common activities dealing with source, navigation, most used keystrokes, popular .vimrc mods, everything a "dyed-in-the-wool" GNU/Linux developer does when they are coding.

    To take it another step further, a peer review and commentary about the session from other hardcore GNU/Linux developers at the end, so I can see the critiques, favorites, etc.

    If anyone knows of such a article, or book, or could get such a thing started, I'd like to see it. The vim site is very helpful, but it is a lot more fragmented than what I'd like to see, something like "How the pros develop under GNU/Linux" with a full commentary/bull session attached...this would be very helpful to me.

    1. Re:help please. by hackstraw · · Score: 1


      Here you go:

      http://vimdoc.sourceforge.net/

      most used keystrokes

      Wow, this AC must have never used vi or vim :) I guess j,k, and / are the most commonly used in command mode, even though / kinda puts you in ex mode because its at the bottom, but I believe all ex commands begin with a :

      In a nutshell, most every letter and number on the keyboard has a use, and they are case sensitive.

      vim has "IDE" like qualities. You can do :make and it will execute make and open up the warnings and/or errors that you want, but I haven't used that in years.

      Check out the documentation. Its excellent. Yes, emacs can edit a text file too, so can many other programs. I personally like a moded editor, and things like being able to copy text above and below the cursor, quick and dirty, yet powerful macros. Yes, I know that at least with some lisp thrown in, emacs can do anything, yes, I've used vip or whatever the vi mode in emacs is. Lets not go there. They both are strong text editors.

  11. Zonker... by xanie · · Score: 1, Informative

    Zonker is a great, and extremely smart guy. I had the opportunity to work with him for about 8 months at a data center. Anything I would have trouble with... and I mean ANYTHING, Zonker would always have the answer. He has lots of great articles, I recommend reading them!

    --
    Fundamentalism stops a thinking mind.
    1. Re:Zonker... by geekoid · · Score: 1

      And I just thought he tanned well.

      --
      The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
  12. I got yer flamewar right here! by adavies42 · · Score: 5, Funny

    Wget sucks, curl rules!

    --
    Media that can be recorded and distributed can be recorded and distributed.
    -kfg
    1. Re:I got yer flamewar right here! by robertjw · · Score: 1

      Damn! You beat me to it.

    2. Re:I got yer flamewar right here! by sootman · · Score: 2, Funny
      --
      Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
    3. Re:I got yer flamewar right here! by kevin_osborne · · Score: 1

      wget/curl meet your maker: http://prozilla.genesys.ro/

      for single shot downloads of big files, it is just plain _faster_

      if it isn't a torrent, use prozilla. it opens 4 streams against the server and just pumps the bits down as fast as my pipe will allow. generally shaves at least 50% off my download times, the bigger the file the quicker it is in comparison.

    4. Re:I got yer flamewar right here! by sootman · · Score: 2, Interesting

      I know the guy who used to admin RedHat's FTP servers. He had the server(s) set up so if anyone was using a download accelerator, it'd kill *all* transfers to that IP address.

      --
      Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
    5. Re:I got yer flamewar right here! by avenj · · Score: 1

      And pisses the admin right off

    6. Re:I got yer flamewar right here! by Anonymous Coward · · Score: 0

      Depends on the admin, I guess...

    7. Re:I got yer flamewar right here! by q.kontinuum · · Score: 1

      No recursive download with curl?!? Ok, we are discussing admin tools here, therefore it might be ok. But for me as an end-user recursive downloads are the main feature...

      --
      Trolling is a art!
    8. Re:I got yer flamewar right here! by Anonymous Coward · · Score: 1, Interesting

      What exactly constitutes a download accelerator? Multiple connections? Specific user agent strings? (for http transfers)

    9. Re:I got yer flamewar right here! by Some+Bitch · · Score: 1

      Opening an SSL page using NTLMAPS->MS ISA server->target server doesn't work too well with wget, curl copes fine. For some specific needs curl is more useful, for others it's wget. They were never designed to compete with one another.

    10. Re:I got yer flamewar right here! by q.kontinuum · · Score: 1

      Hey, you are killing the flame war! ;-)

      --
      Trolling is a art!
    11. Re:I got yer flamewar right here! by cloudmaster · · Score: 1

      What? So, somehow the overhead of four streams on your pipe is less than one stream, and you can download four things from the same site faster than you can download one thing? Are you smoking crack? Either your ISP (or the remote server) is limiting the bandwidth consumed per stream, the servers you connect to are incredibly slow to execute select(), prozilla is connecting to multiple servers (the site's unclear on that), or your speed increase is as valid as the speed increase my car will experience after adding "NeuSpeed" stickers. Have you done back-to-back comparisons?

      The automatic seelction of the fastest mirror is a neat feature, though, and probably contributes. But just using "wget" will peg my pipe as long as the other end can keep up...

    12. Re:I got yer flamewar right here! by timeOday · · Score: 1

      Seems like it would be hard to distinguish 1 user with multiple connections vs. several users behind a corporate proxy.

  13. Telnet ...? by stevey · · Score: 5, Interesting

    It is suprising the author chose "telnet" as one of the programs in his list.

    Sure it is useful for diagnosing random problems, and troubleshooting things - for example connecting straight to a webserver, or simulating a POP3 login request, but I've always preferred netcat.

    netcat is much more useful, it allows you to bind to sockets and handling incoming requests as well as make outgoing ones this introduction is a good read.

    Missing tools from the list? curl, links/lynx, rsync, sudo, nmap, lsof, and less.

    1. Re:Telnet ...? by Anonymous Coward · · Score: 0

      rsync is in the list. obviously you didn't RTFA.

    2. Re:Telnet ...? by drinkypoo · · Score: 2, Insightful
      curl isn't missing - wget is right there :D

      rsync isn't missing - it's in the list.

      sudo, nmap, and lsof are all quite valid points, but many people don't bother with sudo. The main benefit of sudo is when you have many admins working on a machine. If you're not in such an environment, you really don't need sudo.

      less? I'd rather use vim as a pager :)

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    3. Re:Telnet ...? by diagonalfish · · Score: 1

      Netcat is definitely the way to go. Correct me if I'm wrong, but the telnet program is generally less useful for testing services that don't use telnet-style protocol than netcat, which just opens a plain no-frills TCP connection. It gets the job done, and quicker, because that is what it was designed for.

      --
      "Eddies," said Ford, "in the space-time continuum." "Ah," nodded Arthur, "is he? Is he?"
    4. Re:Telnet ...? by lloy0076 · · Score: 1

      Yeah, but if you put any of your mentioned tools in then it would be MORE than the TOP TEN - note the word representing the number 10 :P

      Personally there are times when I prefer vi (i.e. the real vi) rather than vim - anyone had trouble reading the syntax highlighting where you can't see the blue at all? Maybe all my screens' gamma adjustments are just wrong...

      DSL

    5. Re:Telnet ...? by stevey · · Score: 1

      Indeed, the only difference with telnet is that it supports telnet option negotiation - but that's largely irrelevent anyway. As it is only useful for connecting to telnet servers.

      For me netcat is so much more useful because it is easily scriptable, for example this fails:

      echo -e 'GET /\r\n\r\n' | telnet localhost 80

      Replacing telnet with nc works as expected though.

    6. Re:Telnet ...? by kahanamoku · · Score: 2, Insightful

      Missing tools?

      what about the ability to login? I'd say the most important tool is the login prompt! cant do much without that one!

      Also, I think this article is really trying to teach us all how to suck eggs... this IS slashdot after all! ;-)

      --
      ----- Concentrate on promoting more than demoting.
    7. Re:Telnet ...? by stevey · · Score: 1

      D'oh, in between reading the article and writing my comment I'd managed to completely forget about the rsync mention!

      curl is "better" than wget since it supports fetching files from servers using SSL, so I'd prefer to use it if I had to pick one or the other.

      sudo I use partly for allowing automated tools to perform privileged operations without making them setuid/setgid - as well as for sharing access within temas of admins, and providing an audit trail.

    8. Re:Telnet ...? by Anonymous Coward · · Score: 0

      curl is "better" than wget since it supports fetching files from servers using SSL

      Wow, you a) don't even read the article before posting and b) don't even know what you can do with wget. You can't wget a file via https?

    9. Re:Telnet ...? by JanneM · · Score: 3, Interesting

      The main benefit of sudo is when you have many admins working on a machine. If you're not in such an environment, you really don't need sudo.

      In Ubuntu the root account is not active by default, meaning you _always_ use sudo to do administrative tasks. And after geting used to that I feel distinctly uncomfortable with actually having a root shell open and unprotected on the Redhat box. If nothing else I know myself and know it's only a matter of time until I type something into the wrong terminal (and I know that from previous experience)...

      --
      Trust the Computer. The Computer is your friend.
    10. Re:Telnet ...? by stevey · · Score: 1
      you a) don't even read the article before posting

      Did so :P

      b) don't even know what you can do with wget. You can't wget a file via https?

      I said SSL, not HTTPS - I'm well aware that you can use wget to fetch files over https:/// however you cannot fetch a file over FTP via SSL.

      Whilst I accept that might not be a common operation I need to do it often, so curl wins.

    11. Re:Telnet ...? by mindstrm · · Score: 1

      How is it surprising?

      Netcat is a swiss army knife, sure, however, 99% of troubleshooting done with telnet is to make a connection to some port to issue some raw commands, ,or see if something is at least listening. In this respect, netcat is no better.

      Also, netcat is not installed by default on many systems, while telnet is pretty much universal.

    12. Re:Telnet ...? by oalden · · Score: 1

      Whole heartedly agree. The list is decent, and I was glad to see screen on there as number 2. I haven't used screen at all since I started using konsole and had (almost) forgotten about it. But telnet? netcat made telnet obsolete years ago. The only possible reason for the author to include telnet is that he must not be aware of nc. That's not meant as a criticism; netcat hasn't gotten nearly as much good press as it deserves. Good utilities need better advertising. For example, I just discovered cscope yesterday. I've been really happy with ctags over the years, and have only occasionally found it lacking, but I am pretty excited by cscope and look forward to going through the man page.

      I love to see lists like this, because it's another way to discover new toys. How about the list of "top 10 utilities with the worst 'coolness/well-knownedness' ratio." Clearly, it will need a better title!

    13. Re:Telnet ...? by Vo0k · · Score: 1

      Except Telnet does the negotiation thing that may break stuff seriously. Sure if you don't have nc on that box, don't run in circles to install it, just run Telnet. But if you make a fresh install, add nc, it's superior.

      --
      Anagram("United States of America") == "Dine out, taste a Mac, fries"
    14. Re:Telnet ...? by stor · · Score: 1

      The main benefit of sudo is when you have many admins working on a machine. If you're not in such an environment, you really don't need sudo.

      You can utilise sudo for automated tasks as well dude. Just recently I had to modify an internal web application to use rsync over ssh to deploy files to a privileged location on a remote server. It also had to execute privileged operations (restarting a daemon) on the remote server. Sudo helped me achieve this in a relatively easy, clean and secure way.

      BackupPC can be configured to use an ssh, rync and sudo combination to help tighten the security of backup operations. Speaking of BackupPC, check it out, I'm pretty damn happy with it.

      Cheers
      Stor

      --
      "Yeah well there's a lot of stuff that should be, but isn't"
    15. Re:Telnet ...? by gid · · Score: 1

      Try issuing a ":set bg=dark" to lighten up the fonts a bit, it looks way better on the a black background, dunno why it's not the default. Put it in your vimrc for best results.

    16. Re:Telnet ...? by Geoffreyerffoeg · · Score: 1

      I feel distinctly uncomfortable with actually having a root shell open and unprotected on the Redhat box.

      I've enabled the root account on Mac OS X, but I feel very uncomfortable logging in to the GUI as root. I use sudo over su because I rarely need to use more than one root command; if I do I switch between the two much in the manner I switch between, oh, ssh (slogin) on a regular shell and ssh-agent.

    17. Re:Telnet ...? by moyix · · Score: 1

      I find :syntax off to be an effective solution to that problem...

  14. Re:A windows XP CD by dhasenan · · Score: 1

    When's the last time you used Linux? 1992?

    I use Gentoo, and it handles just about everything for me, holds my hand through everything....And most other distros are even more friendly. The last time I had to set LD_* was with a strange and rare piece of software meant for Windows but designed with interoperability in mind.

    You don't even need to compile a kernel these days, even with a radical change of hardware. Coldplug and hotplug manage it all for you.

    Really, you should just try Linux for one day. You'll be searching for complaints, but you won't find more than "This isn't what I'm used to".

  15. rm by Skadet · · Score: 5, Funny

    rm

    preferably with the -Rf options.

    1. Re:rm by Bulmakau · · Score: 1

      Where is the forward slash though? Won't do much "good" if you dont use the full proper syntax (rm / -Rf) ;)

      --
      "From the moment I could talk, I was ordered to listen" - Cat Stevens
    2. Re:rm by Skadet · · Score: 1

      Doesn't the target go after the flags? e.g. rm -Rf /


      # man rm

      RM(1) FreeBSD General Commands Manual RM(1)

      NAME
      rm, unlink -- remove directory entries

      SYNOPSIS
      rm [-dfiPRrvW] file ...

      Not that I've tried it your way (or my way for that matter!)

    3. Re:rm by vwjeff · · Score: 1

      Where is the forward slash though? Won't do much "good" if you dont use the full proper syntax (rm / -Rf) ;)

      Wow, I haven't tried that one yet. Let's see....

      rm / -Rf ........

      Damn. Wait, how am I posting this. I must be in an alternate universe. Perhaps I can recover my files. Perhaps not :)

    4. Re:rm by Bulmakau · · Score: 1

      Works both ways. (Trust me though... don't try it :D )

      --
      "From the moment I could talk, I was ordered to listen" - Cat Stevens
  16. Re:A windows XP CD by Anonymous Coward · · Score: 0

    It's been a while since I've seen someone fall so hard for such an obvious troll.

    Kudos. Delicious Kudos.

  17. Not a bad article by ansible · · Score: 2, Insightful

    But then, I've been using most of those tools for quite some time.

    The one that interested me is cdb, which I hadn't heard of before. I'll have to try that out.

    1. Re:Not a bad article by afabbro · · Score: 1
      I'm hoping there's more to cdargs than the example, because assigning pathnames to mnemonics is pretty old hat and you don't need a new binary to do it. e.g., in bash:
      $ export WWW=/var/www/localhost/htdocs
      $ cd $WWW
      I can put that in whatever dotfile and it'll always be there...and I don't have to install cdargs first - nice if your home directory is NFS-mounted and you're working on various machines. Variations of that work in every shell known to man (and you can also use aliases with different syntax, etc.)

      cdargs might have other exciting features, in which case the author chose a poor example.

      --
      Advice: on VPS providers
    2. Re:Not a bad article by ansible · · Score: 1

      Actually, CDargs isn't as neato as I had hoped. The one nice about using it though is that you don't have to type a '$' as you do with plain shell variables. I don't like hitting shift any more than I have to.

      Now if you set up aliases to create and maintain the shortcuts, and also automatically create aliases for the variables themselves... I think you'd end up with CDargs.

      The comments on the dedicated CDargs article by the same author was useful, because commentors to that also talked about pushing and poping directories, which is something I want to do here and there. Of course, these days I just start a new shell, and then exit out of it to 'pop'. But it wouldn't kill me to learn a little more about bash.

    3. Re:Not a bad article by Coryoth · · Score: 1

      A cute trick: if your only working 1 directory change deep then instead of using pushd and popd you can just use "~-" which is a bash alias for "previous working directory". cd to where you want to be directly, and when you're done just cd ~- to get back to where you were.

      Jedidiah,

  18. Right on with rsync by tcopeland · · Score: 1

    We use it to manage the RubyForge mirror system and it's a lifesaver. Check out the traffic dropoff chart that the mirrors provide (not the number of hits, the number of KB served); rsync really helps make RubyForge tick.

    1. Re:Right on with rsync by mgpeter · · Score: 1

      I always add a BackupPC machine in the mix - This is a great way to maintain an archive of your files. Although mostly used for Win boxes, I also use it for archives of every server I install. You would be surprised at how often it comes in handy on larger networks, I guess people really like that delete button.

      It is also the ultimate off-site backup (using rsync w/ssh over the internet).

    2. Re:Right on with rsync by mink · · Score: 1

      Have you run into the problem of working with large numbers of files in a single directory (say 25K or more)? Have you found a work around other then making sure there are less then that many files in any directory?

      --
      Well I've wrestled with reality for thirty five years doctor, and I'm happy to say I finally won out over it.
    3. Re:Right on with rsync by tcopeland · · Score: 1
      Hm, nope, I haven't hit that problem yet; the GForge project breakdown kind of provides a natural division of files, i.e.:
      project1/file1,file2,file3
      project2/file1,file2
          project3/file1,file2,file3,file4
      Working well so far...
  19. nload by Douglas+Simmons · · Score: 1

    Almost every machine has a telnet client installed, so it's nice to log in to my box and watch my bandwidth get plotted down on a graph in real time without having to VNC and use X for this. Try it.... Try nload, that is, do not try logging into my box please and thank you!

  20. Re:A windows XP CD by dhasenan · · Score: 1

    I feel like Ozymandius.

    Sniffle.

  21. CD Ripping by Zebbie · · Score: 1

    Considering the article is posted in the "Enterprise Management" section of the site, does anyone else find it strange that one of his favorite "sysadmin" tools is for CD ripping? Guess he's not a very busy sysadmin.

    1. Re:CD Ripping by Anonymous Coward · · Score: 0

      I found that amusing as well. My question is where is the scripting language such as perl or python or sed (shuddrs)

    2. Re:CD Ripping by ColaMan · · Score: 1

      And no rubber mallet for those instant service calls? Amatuer.

      --

      You are in a twisty maze of processor lines, all alike.
      There is a lot of hype here.
    3. Re:CD Ripping by Anonymous Coward · · Score: 0

      Given that he choose a tool that works from the command line with no user interaction after it is run means he wants to spend as little time as possible on that task. And are you telling me you can't work while listening to music?

    4. Re:CD Ripping by dulridge · · Score: 2, Funny

      A rubber hammer - you lack ambition. A 4lb bricklayers hammer works far better. Learned this one 25 years ago when I worked in a camera shop.

      Repairs to fiddly bits of cameras are best not attempted while severely hungover - especially the morning after someone has tried to break in through the window in the basement. Anyway customer comes in with jammed camera - this model (Russian Leica 3 clone) easy to fix once the top plate removed so wandered through the back to get small screwdrivers. Meanwhile boss in basement trying to fix broken window and yells up for me to bring down hammer.

      Customer sees me emerging from the back of the shop wielding a hammer. His expression truly terrified at the thought of my attempting percussive maintenance to his camera with it. He had not been reassured by the aroma of stale whisky either and I've never seen anyone leave the shop so fast before or since.

      Much relief when I wandered down to the basement with the hammer. Ever since then a 4lb hammer has been in the toolkit as the customers tend to shut up and let you get on with it once you have produced that. Only time it ever got used was when trying to make an antique colour laser printer fit in a skip. Now that WAS fun, if a little sad - that beast earned me something like its purchase price over the years when it played up.

    5. Re:CD Ripping by $RANDOMLUSER · · Score: 1
      > And no rubber mallet for those instant service calls? Amatuer.

      Indeed. My first thought on seeing the article headline was "A Louisville (sp) LART"??

      --
      No folly is more costly than the folly of intolerant idealism. - Winston Churchill
    6. Re:CD Ripping by ColaMan · · Score: 1

      A rubber hammer - you lack ambition. A 4lb bricklayers hammer works far better.

      A rubber mallet is excellent for "steath" drive warranty replacement though.
      It leaves no marks :-)

      --

      You are in a twisty maze of processor lines, all alike.
      There is a lot of hype here.
  22. for *nix-land by Anonymous Coward · · Score: 0

    1. vi
    2. tcpdump/snoop
    3. truss/strace/ktrace
    4. ssh
    5. wget
    6. lsof
    7. netstat
    8. bash
    9. dig

  23. Webmin by lthown · · Score: 3, Informative

    One of the most useful remote admin packages out there. Especially useful for those just getting into Linux/Unix. Want to install a Perl module? just select or enter the name. Wanna change a cron job for a user, it's in the Cron screen.

    http://www.webmin.com/

  24. I can't tell you how powerful zsh is! If your a UNIX person you have to get this shell. Way too many features to list here!

  25. Re:A windows XP CD by Anonymous Coward · · Score: 0
    Go & install Oracle.

    No really, read the release notes. Its a 'fantastic' example of everything that is wrong with linux.

  26. Make your own list! by sootman · · Score: 2, Insightful

    cat .bash_history | awk '{print $1}' | sort

    Mine: (flawed commands removed)
    cal
    cat
    cd
    cdd
    random text to get past lameness filter - isn't this why we have mods? size does matter!
    chmod
    clear
    cp
    crontab
    curl
    du
    echo
    grep
    random text to get past lameness filter - isn't this why we have mods? size does matter!
    gunzip
    head
    kill
    killall
    links
    locate
    ls
    lynx
    mkdir
    mv
    random text to get past lameness filter - isn't this why we have mods? size does matter!
    open
    pbpaste
    pico
    pine
    ps
    rm
    rmdir
    scp
    screencapture
    random text to get past lameness filter - isn't this why we have mods? size does matter!
    ssh
    su
    sudo
    tail
    tar
    telnet
    top
    touch
    unzip
    uptime
    which

    --
    Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
    1. Re:Make your own list! by Cytlid · · Score: 1

      Bah.

      You should've added 'uniq -c' and sorted that ... then head -10. It was a top ten list ya know.

      --
      FLR
    2. Re:Make your own list! by eln · · Score: 1

      He would have, but uniq isn't in his top ten list.

    3. Re:Make your own list! by Jeffrey+Baker · · Score: 2, Insightful

      $ awk '{print $1}' .zsh_history | sort | uniq -c | sort -rn | head -10
            2378 ssh
            1856 ls
            1246 cd
              496 mysql
              448 find
              431 wget
              428 man
              419 less
              407 su
              393 grep

    4. Re:Make your own list! by sootman · · Score: 1

      This is why I love slashdot. :-)

      Trying this: cat .bash_history | awk '{print $1}' | uniq -c | sort
      I get output like this:
      3 telnet
      3 telnet
      3 uuidgen
      4 cd
      4 ps
      4 ssh
      4 tar
      7 cat
      Something's not right... it seems like it's performing 'uniq' on the whole command, not just the single word that pops out of 'awk.'

      --
      Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
    5. Re:Make your own list! by fimbulvetr · · Score: 1

      He would have needed a 'sort -n' after that:)

    6. Re:Make your own list! by sootman · · Score: 1

      dammit! 'preview', not 'submit'!
      a longer list would have shown more repeats, like so:
      cat .bash_history | awk '{print $1}' | uniq -c | sort
      2 sudo
      2 sudo
      2 tail
      2 tail
      2 top
      2 uuidgen
      2 which
      3 curl
      3 curl
      3 echo
      3 grep
      3 grep
      3 grep
      3 grep
      3 ls
      3 ls
      3 ls

      --
      Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
    7. Re:Make your own list! by toofast · · Score: 1

      You need to sort first so that uniq sees the repetition all in one block, then sort after for the numerical order.

      cat .bash_history | awk '{print $1}' | sort | uniq -c | sort -nr | head -20

    8. Re:Make your own list! by Cytlid · · Score: 1

      Not only that, my .bash_history is dated April 2004. :( Guess I've been using tcsh for a while. And since I do use screen, my "history -h | sort | awk '{print $1}' | uniq -c | sort -nr | head -10" comes up with weird values.

      According to the screen session I did it in, my top 10 last most frequently used apps were inaccurate.

      --
      FLR
    9. Re:Make your own list! by xpatiate · · Score: 1

      hey, this is fun :)

      My top 10 looks a lot like everybody else's but I'd have to put in a special plug for the indispensable grep|cut|sort|uniq team - master these and no logfile can keep a secret from you ever again. Plus of course alias, so you don't have to keep typing out headache-inducing grep|cut|sort|uniq commands.

      --
      (music + neurology) * fiction = feedback
    10. Re:Make your own list! by jrockway · · Score: 1

      That would make mine ssh, ls, svn, perl, fg, cat, cp, rm, apachectl, and sudo. Guess what I do at work :)

      --
      My other car is first.
    11. Re:Make your own list! by totallygeek · · Score: 1

      b=0 ; for i in `cat .bash_history | awk '{ print $1 }' | grep -v ^$ | grep -v ^"(" | sort | uniq` ; do a=`grep $i .bash_history | wc -l` ; echo "${i}: $a" ; b=$((b+1)) ; if [ $b == "6" ]; then b=0 ; echo "====== Lame Length Filter ======" ; fi ; done

    12. Re:Make your own list! by Andrewkov · · Score: 2, Funny
      C:\>cat .bash_history | awk '{print $1}' | sort

      'cat' is not recognized as an internal or external command, operable program or batch file.

    13. Re:Make your own list! by bzipitidoo · · Score: 1
      More items for the list:
      • cdrecord, mkisofs: no, not for MP3s. For backups, or live CD distros
      • df: mention du but not df?
      • ldd: Sometimes need to know what libraries some binary wants.
      • lsdev, lsmod, lspci, lsusb: Glad ls and lsof weren't overlooked.
      • make, gcc: Don't you have to build from source sometimes? Roll your own kernel?
      • mount/umount
      • ping
      • traceroute
      • xxd: Dump it to hex, edit (in vi), and convert back to binary.
        A way to do hex editing without an actual hex editor. More useful in Cygwin.
      Rarely used, but sometimes needed:
      • fsck: The bootup sequence uses it so I don't have to.
      • parted, [c]fdisk
      • mtools (mdir, mcopy)
      • insmod, rmmod. Could throw lsmod down here too.
      And then there's the distro specific package and configuration managers: rpm, yast, apt-get, pkgtool ....
      --
      Intellectual Property is a monopolistic, selfish, and defective concept. It is "tyranny over the mind of man"
    14. Re:Make your own list! by sootman · · Score: 2, Funny

      Mine:

      $ awk '{print $1}' .zsh_history | sort | uniq -c | sort -rn | head -10
      1 bash

      ;-)

      --
      Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
    15. Re:Make your own list! by portscan · · Score: 1

      actually, you are missing pipes. i don't really have time to think about how to fix that, but here is an example of where your "top 10" list would be wrong. let's say you execute the following commands:
      $ man ls | less
      $ ls -R | less
      $ egrep /var/some/log | less
      $ awk '{print $1}' .zsh_history | sort | uniq -c | sort -rn | less
      etc.

      your most used command is obviously 'less', followed by 'sort', although neither would even be listed in your list of commands. given the above, you obviously like pipes, so you are missnig something. I guess you have to do something like make '|' a field separator in your awk script in addition to the newline character. then $1 will be the first part of a new command or it will be the first part after a pipe (which is your program).

  27. Vim? Colour hell! by MavEtJu · · Score: 1

    Part of the reason for that is the fact that I no longer have to think about using Vi-style keybindings, and adjusting to anything else would seriously hinder my productivity.

    Each time I login into a Linux box and have to edit a file, I end up with a multi colour screen in which it's hard to find anything and when I have to change a word ([^ ]+) up to the next space, my screen ends up full of yellow blocks.

    Worst vi enhancement ever!

    (yes I know about :syn off)

    --
    bash$ :(){ :|:&};:
    1. Re:Vim? Colour hell! by sylvandb · · Score: 2, Informative

      when I have to change a word ([^ ]+) up to the next space, my screen ends up full of yellow blocks.

      Worst vi enhancement ever!

      (yes I know about :syn off)


      But do you know about :nohls (to disable HighLight Search results until the next search) or :set nohls (to disable for the session)?

      I quite often benefit from highlighting my search results. But when they annoy me, I simply turn off the highlighting.

      Definitely a good vi enhancement.

      sdb

    2. Re:Vim? Colour hell! by approx · · Score: 1

      I like it short so I only do :noh or :nmap :noh in ~/.vimrc .. hitting ctrl-n clears the search-stuff.

      --
      There, behind you! A public health care system .. run for your life!
  28. Cream for Vim by digitect · · Score: 4, Interesting

    I'll plug my own project here: Cream is Vim tricked out in single mode with all the development tools pre-configured with all useful shortcut keys self-documented in the pull-down menus. You won't need to go searching through the help ever again.

    --
    There is no need to use a SlashDot sig for SEO...
    1. Re:Cream for Vim by Anonymous Coward · · Score: 0

      Sorry dude, but I'm not going to use any program named 'cream.' Why don't you just go ahead and name it 'spooge', 'sperm', or 'cum'?

    2. Re:Cream for Vim by Anonymous Coward · · Score: 0

      Just an affirmation of the Cream project's success and thanks for all your hard work!

  29. My top 10 by hal9000(jr) · · Score: 1

    1) perl 2) expect 3) wget 4) lsof 5) grep 6) lynx 7) ssh 8) emacs (I just know it better than VI) 9) bash 10) screen With those things running, I can pretty much do what I need. I have even installed them on slowlaris machines to make them more linux like.

    1. Re:My top 10 by gstoddart · · Score: 1
      I have even installed them on slowlaris machines to make them more linux like.

      It's amusing to see it characterized as being more Linux like.

      Back in the days of SunOS (pre Solaris), and before Linux, everyone had already installed many of the GNU tools because they were more powerful than the system ones. Expect, emacs, bash, GNU grep, GNU make and a bunch of things were around and quite robust before they got included in Linux.

      I certainly remember having HP-UX, SunOS, and DEC Alpha machines having these tools installed on them back in the really early 90's.

      Cheers
      --
      Lost at C:>. Found at C.
    2. Re:My top 10 by hal9000(jr) · · Score: 1

      everyone had already installed many of the GNU tools because they were more powerful than the system ones

      Ack. My bad. I should have said more GNNU like. They are more powerful tools than what ships with Solaris and I am also used to them which certainly helps.

  30. iBook! by Local+Loop · · Score: 1, Funny

    my iBook is my most useful tool... A portable unix box that never needs to be messed with or tweaked to work!

  31. Emacs! by Anonymous Coward · · Score: 0

    Part of the reason for that is the fact that I no longer have to think about using Vi-style keybindings, and adjusting to anything else would seriously hinder my productivity.

    Strangely that's one thing I like about OS X. For some reason, many familiar emacs key combinations work in most OS X text controls.

  32. Top ten by totallygeek · · Score: 1
    1. bash: perfect for building little scripts to perform redundant tasks and is fairly ubiquitous.
    2. vi: gotta use something to write the bash script.
    3. sed: Tweak this and that.
    4. ssh: access, file transfer and port encryption.
    5. wget: gotta agree that it is very nice.
    6. telnet: beats out netcat because not every box has netcat, but very few are missing telnet.
    7. knoppix: yeah, I will call it a tool because I pull it from my toolbox and use over the usually-running OS.
    8. dig: find those mail exchangers and trace reverse queries.
    9. mutt: read/write mail and fix others' mailboxes.
    10. nmap: truly a great tool for any network.
  33. abcde? by ameoba · · Score: 3, Insightful

    When did a CD audio ripper become an essential part of an admin's toolkit?

    --
    my sig's at the bottom of the page.
    1. Re:abcde? by suprchunk · · Score: 1

      You beat me to it. I was going to ask the same exact question. I don't know what mp3 files have to do with administering a linux box at all.

  34. Ethereal, strace, ltrace by dubl-u · · Score: 1

    I love, love, love tcpdump and Ethereal. It's like an MRI for network issues. It has answered more WTF questions for me than anything else.

    Similarly, strace and ltrace let me see what a program is up to on the local system, printing out a dump of every system or library call. Its invaluable when confronted with some mysterious error message: you can see exactly what the program was up to just before it barfed.

  35. XARGS by jimjamjoh · · Score: 1

    also, the pipe character

  36. Correct me if I'm wrong... by msimm · · Score: 1

    But some seamingly important pieces seem to be missing from most major commercial distros.

    lsscsi (list SCSI device info including nodes and ID's) scsiadd (is there a new/better way to do this? Scsiadd is fine, but it wasn't part of the Centos toolkit and required some research and a compile. I'm not complaining, but adding and removing drives from arrarys seems like a pretty important function.) after that I supose I'm just going to be repeating variations of what everyone else says: sh/bash/ksh/etc vi wget ssh/sftp/scp telnet client (for general testing) nmap (god I love this program) smb client at least for mixed networks mdadm if your stuck with software raid grep less cat gawk Of course thats more then 10 already, but who really uses 10 or less tools to do the work? And frankly IMHO they are all favorites. Everytime I remote onto our SBS I'm reminded why.

    --
    Quack, quack.
    1. Re:Correct me if I'm wrong... by Jeffrey+Baker · · Score: 1

      'scsiadd' is quite important, as are 'smartctl', 'sensors', 'nagios', and 'mrtg'. Perhaps there should be a top ten list, not of the ten most-used commands, but the ten most-work-saving programs.

  37. Emacs is cool by Anonymous Coward · · Score: 0

    I only use Emacs when i need to talk to my Psychiatrist. :p

  38. PS by sootman · · Score: 2, Funny

    Just kidding.

    http://curl.haxx.se/docs/faq.html

    1.3 What is curl not?

    Curl is *not* a wget clone. That is a common misconception. Never, during
    curl's development, have we intended curl to replace wget or compete on its
    market. Curl is targeted at single-shot file transfers.

    --
    Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
  39. Re:A windows XP CD by Anonymous Coward · · Score: 0

    Last time I had to set LD_LIBRARAY_PATH: I couldn't get XOrg working on my machine, so I had to use XFree. The libraries shipped with XFree don't work with programs compiled with XOrg and vice versa. So, LD_LIBRARY_PATH to hack around it.

  40. what about... by Karaman · · Score: 1

    nmap
    tcpdump
    ethereal

    I thought these were some of the tools sysadmins use :)

    --
    sex is better than war!
  41. Nice.. though.. by Bulmakau · · Score: 1

    The writer is a GUI user.. I can't really say I know much about some of the tools there. From my POV, SSH is a must in any list. Also, wont be able to live without "shutdown", since the servers we work with are remote.. so.. I guess that would make shutdown (-r ofcourse) #1 on my list :)

    --
    "From the moment I could talk, I was ordered to listen" - Cat Stevens
    1. Re:Nice.. though.. by brsmith4 · · Score: 1

      Dude, if shutdown -r is your #1, then you have no business running a server, remote or not.

    2. Re:Nice.. though.. by Bulmakau · · Score: 1

      Hmm..
      You must be a very dedicated system administrator if any time you need to reboot a server (even if it's once a year), you take your car, walk to the datacenter and push the reset button instead of using a shutdown command :)
      However, as dedicated as you seem to imply, I would not want you as my sysadmin, since in most cases we need a reboot nowm rather than tomorrow ;)

      --
      "From the moment I could talk, I was ordered to listen" - Cat Stevens
    3. Re:Nice.. though.. by brsmith4 · · Score: 1

      I think my point was that if a system is well managed, then it does not require frequent reboots. You claimed that shutdown -r is your #1 command. This implies that the command is frequently used meaning frequent reboots. Your statement implies that your systems actually require frequent reboots, therefore your system is poorly managed. The remark was only alluding to that undeniable fact j/k ;)

    4. Re:Nice.. though.. by Bulmakau · · Score: 1

      :).. fair enough
      What I said was actually meant to be funny. I'll work on sharpenning the sense of humor for the next post ;)
      What I meant was, that having servers far away from you, sometimes in a far away country, having remove access is a bless. That's why I mentioned SSH and shutdown -r ;). As for frequent reboots, if your server is 16 hours flight from you, even twice a year is too much if you have to go there ;)

      --
      "From the moment I could talk, I was ordered to listen" - Cat Stevens
    5. Re:Nice.. though.. by brsmith4 · · Score: 1

      As for frequent reboots, if your server is 16 hours flight from you, even twice a year is too much if you have to go there ;)

      Indeed.

  42. My favorite by diagonalfish · · Score: 2, Funny

    apt-get update ; apt-get dist-upgrade

    Oh. Not everyone uses Debian, right, sorry. They should, though. *mumbles*

    --
    "Eddies," said Ford, "in the space-time continuum." "Ah," nodded Arthur, "is he? Is he?"
    1. Re:My favorite by kaarlov · · Score: 1

      There's quite many poor bastards who upgraded their Debian Woody boxes to Sarge with apt-get dist-upgrade without reading the Sarge's release notes first.

    2. Re:My favorite by diagonalfish · · Score: 1

      Yeah, I use testing. I guess I should have been more specific. ;)

      --
      "Eddies," said Ford, "in the space-time continuum." "Ah," nodded Arthur, "is he? Is he?"
    3. Re:My favorite by kindbud · · Score: 1

      That works great until some asshole breaks dependencies. My install of K3b in my MEPIS distro was busted for weeks while the Debian guys rearranged the furniture.

      --
      Edith Keeler Must Die
  43. Yes by temojen · · Score: 1

    Everything here, except replacing vim with $EDITOR. Because everyone has their own favourite, but should learn one console capable editor.

  44. Huh? by Etnie · · Score: 1

    "Part of the reason for that is the fact that I no longer have to think about using Vi-style keybindings, and adjusting to anything else would seriously hinder my productivity."

    And I'm so used to riding a horse I see no reason to move to one of those new "automobiles". It would hinder my productivity having to learn how to operate one. (Nevermind that I could actually get places faster.)

    1. Re:Huh? by Anonymous Coward · · Score: 0

      Right up to the point where you try to get a car to jump a fence.

  45. First, go to a supermarket by FishandChips · · Score: 1

    Hmmn, this is Linux. I thought the first thing you did with Linux was have a beer (or six) and a few roll-ups while surveying the damage. Sad there's no room for these. I think I'd also take a pack of Trojans as well. You never know. You might strike lucky while waiting long hours for machines to re-establish themselves in a large office full of rather bored people. Finally, an IRC client. This would enable me to cobble together a solution from the experts on one of the distro channels while passing it all off as my own work, plus keep up to speed with the footie results.

    --
    Las qué passoun
    tournoun pas maï
  46. Midnight Commander & NEdit by omnix · · Score: 1

    I cast my vote for Midnight Commander. It has a great built-in editor, does ftp (but not sftp, yet), opens files, and still allows me to have full access to the shell... I'm sure it does other things, but these are my primary uses. It's also been a great tool to help teach *nix to others. Take a bow Miguel.

    As for coding, I prefer to write all of my code using NEdit. I started using it before it was a true OpenSource development, and it's only gotten better.

  47. Other comments on GNU Screen? by dankelley · · Score: 1
    From what Zonker writes, it seems that Screen is a good thing. I had a look at its info page and it looks like the sort of thing that will require some study before use. Scanning this /. page, I saw nothing discussing Screen.

    Hence, I pose a direct question to /.ers. Is Screen a "good thing" (TM)? If so, would you be so kind as to provide an example to supplement the one Zonker noted? On this list we have lots of clear examples of the usefulness of other tools. If Zonker is right, then it would be great to see examples of Screen, also.

    1. Re:Other comments on GNU Screen? by Wizarth · · Score: 5, Informative

      Screen is very useful. I think of it as providing virtual terminals (you know, Ctrl-F1 to Ctrl-F6) but over remote login (usually ssh in my case)

      My normal usage is like so:
      ssh into the box
      screen -r (resume session, that was created first time I went in after bootup, with screen -S)
      Ctrl-A Ctrl-N (next virtual terminal) to flick through things i have running, usually centericq (text multi protocol chat client) and btdownloadcurses, or the results of a compile I left going.
      Ctrl-A Ctrl-C (open new virtual terminal) which gives you another command prompt. Here I'll wget a tarball, extract it, start the compile, then Ctrl-A Ctrl-N back to centericq

      I'll disconnect from the box (Ctrl-A Ctrl-D to disconnect from screen, then Ctrl-D to close the login shell), go home, reconnect from one of my other machines, go through the same process.

      Also, I can stay connected, go to another machine, and use screen -x to have multiple connections to the same screen. In the case of a dropped connection, and screen thinks my old login is still valid, screen -rD will disconnect the old login.

      Oh, and Ctrl-A ? will show all the in-screen escape sequences. Some of them I haven't used (there is one to do horiz split display, but it crashes btdownloadcurses), but look like they could be even more useful!

      But really, the best part is not having programs killed on me because the internet connection dropped (as happens all too often around these parts).

    2. Re:Other comments on GNU Screen? by jptxs · · Score: 3, Informative

      Step 1. Begin compiling some huge thing (tm) during your screen session.
      Step 2. Spend all day doing other things as compilation is off in some hidden window in screen.
      Step 3. Check on compiling every now and then, you will be able to scroll back and forth as needed as if you'd been sitting with an xterm open the whole time.
      Step 4. Leave work for home.
      Step 5. Reattach to you screen session and check on your compiling some more.
      Step 6. Realize inner peace knowing you need not worry about where you started some long process ever again by using screen.

      --
      we speak the way we breathe --Fugazi
    3. Re:Other comments on GNU Screen? by BritneySP2 · · Score: 0

      It is a good thing IMO. You can have multiple virtual sessions / multiple virtual terminals within, say, one SSH session; plus, the ability to detach from the session and re-attach to it later--possibly from other terminal--is very nice.

    4. Re:Other comments on GNU Screen? by umrguy76 · · Score: 1

      Screen is quite useful. A real-world example is a cluster I am testing. I need to simultaneously run 32 different tests, each of which sometimes dumps useful info to the console. You can name a screen so I fire up 32 of them using a simple bash loop:

      for i in `seq -w 1 32`;do screen -S NG$i;done

      As each screen opens I fire up my test program and Ctrl-A + D to detach and the next opens, etc, etc. I now have 32 virtual consoles running tests in the background. I can tail the test program logfiles or I can reattach to a specific test to check console output. For example, to reattach to NG01 type:

      screen -r NG01

      Then I am popped back into my virtual terminal. Another quick example is remoting in to a server and running some long process such as an fsck. Fire up a screen, start your command and detach. It will happily run in the background and you can close your ssh session or whatever.

      Clear as mud? :)

    5. Re:Other comments on GNU Screen? by segra · · Score: 1

      Screen is great, another good use of it is when your remotely doing a compile and your internet connection goes down. Rather than have to restart the build, you just resume your screen session and the compile is either still going or is completed :) It's also good in the sense you can move away from the terminal filling up with lines and lines of files being compiled. Handy if your on a slow connection.

    6. Re:Other comments on GNU Screen? by Noksagt · · Score: 1

      Screen is great & not hard to use. See articles on kuro5hin or Wikipedia.

      For a brief synopsis....
      screen has a number of useful features, most of which you can access by prefixing a command with a command key, which by default is 'Ctrl-A' ('C-A' or '^A' if you prefer). To see some of the things screen can do, press 'Ctrl-A' and then '?'.

      screen allows you to have multiple terminal windows in a single terminal session ("multiplexing"). This is REALLY useful if you spend a lot of time in a term (for example, when you're SSHing to other boxes). To create a new window, 'Ctrl-A' and then 'C'. To switch between windows, 'Ctrl-A' and then 'N' or 'P' for next & previous windows, or a number to switch to a specific window.

      screen allows you to recover a session, so you can gracefully detach (or be rudely interrupted by a network outage) & reattach to see all of your processes again. To reattach to an existing screen, start screen with 'screen -r'. You can also forcibly detach an already-attached session by 'screen -Dr'. If you have multiple screen sessions, you can tell it which session to reattach to by typing in the process number after the '-r'.

      You can also lock the screen if you are stepping away for a shor period ('Ctrl-A' and then 'X'), and even have a bigger scrollback buffer which is copy/pastable from the keyboard! ('Ctrl-A' and then '[' to enter copy mode. Use vi-movement keys, cursor keys, etc. to move the cursor, hit 'enter' to start a selection, use the same movement keys to expand it, hit 'enter' again to put it in the buffer. 'Ctrl-A' and then ']' to paste).

      screen allows a lot of other useful things, such as sharing a session between two users (which makes for interesting pair programming or terminal-style "presentations").

      It is definitely one of the first apps I install on any system.

    7. Re:Other comments on GNU Screen? by hackstraw · · Score: 1

      screen is also useful for silly commands like some java programs and some bittorent clients that require a tty in order to run "in the background".

      and yeah, its kickass to be able to ^A and d etach a program, and go to another computer and have your stuff running without incident.

      I don't religiously use screen, but its very handy. But I don't use it much, if ever, for system administration.

    8. Re:Other comments on GNU Screen? by kikibobo · · Score: 1

      The other comments about screen are spot-on: virtualizing a terminal is really powerful, and makes it easy to do command-line stuff from any terminal you want. Pretty soon you lose that uncomfortable feeling that your life would really such should you run in to an unexpected HUP.

      One thing I like to use screen for is a "better nohup". You can start a named screen session (screen -S), start a server in it, then detach and leave it running. At any point it's then trivial to reattach to it (by name again), ^C and restart if necessary, look at stdout, etc. Plus you can scroll back through the output.

      Personally I find screen particularly effective when used in conjunction with ratpoison, which is a similar concept in window managers. You get one dimension via screen, and a second dimension via ratpoison.

    9. Re:Other comments on GNU Screen? by TeknoHog · · Score: 1
      I first started to use screen because of IRC. It's the de facto standard way of staying on IRC 24/7, as long as you run it on a server-ish machine that is on all the time. Soon I realized screen is useful for lots of other things, and I now wonder how I could ever use unix efficiently without it.

      On my main machine I have a screen with pine, emacs and a few other things. I can get to it from work etc. without restarting any of the programs. When you have multiple documents open in emacs, this makes a lot of sense.

      On my media box, screen is usually running with a few Bittorrent console clients, emacs and comms.

      I only wish there was a screen equivalent for X. I think there was a project called xmove that basically did this, but it seems to be dead.

      --
      Escher was the first MC and Giger invented the HR department.
    10. Re:Other comments on GNU Screen? by Ratbert42 · · Score: 1

      Screen's great. I've used it for 15 years or so. I currently use it, like the author said, to save my terminal session between connections. I never lose my place when I have to reconnect, whether it's because my network flaked out, my wifi connection dropped, the VPN tunnel dropped, my laptop battery died, I went home for the night, etc.

      Screen has some newer features like the ability to have multiple sessions connected to one screen session, so you can have more than one person watching (or working in) a shell session.

      Screen also gives you scroll-back capabilities, even when it's disconnected.

      Screen also used to be really useful for working on a messed-up terminal where the termcap wasn't quite right. Screen emulates a vt100 (or something from that family) and could render a decent vi, nethack, etc. session on an otherwise unworkable terminal. Not such a big deal today.

    11. Re:Other comments on GNU Screen? by darkgray · · Score: 1

      I find Ctrl-A + spacebar to be a comfier way of flipping through screens, since I can do it with one hand. Maybe my screen has a weird configuration.

    12. Re:Other comments on GNU Screen? by Anonymous Coward · · Score: 0

      I don't want to sound too old-skool but it seems that most people using screen really like the idea of things running in the background while your not logged on (as in compiles and whatnot). I would like to point out that coreutils has had 'nohup' for quite some time.

      For more information see: man nohup

    13. Re:Other comments on GNU Screen? by BenV666 · · Score: 1

      Another thing I love about screen is the split command (Ctrl-a S, mind the caps). My irc client in the upper part, other stuff in the lower.

    14. Re:Other comments on GNU Screen? by cprior · · Score: 1

      On my last birthday I posted this tutorial http://gentoo-wiki.com/TIP_Using_screen and I am glad so many people contributed to it since.

      I tried to give a) verbose descriptions as well as b) a short command list as a quick guide and c) to give a visual representation in form of an animated gif.

      That page has been accessed 17,344 times so far and I would love if some more readers could proof-read.

      And thanks for the invitation to this shameless plug! ;)

  48. Without a doubt: tcpdump by mybecq · · Score: 2, Informative
    When you absolutely, positively have to know why your system isn't interoperating with the rest of the network, tcpdump will provide the answer. That is, assuming you know what it all means.

    There's no easier way to lay the blame squarely in the Windows camp (or to eat your hat)...

    A few diagnoses I've performed:
    • Providing the exact query in a web-developers app that was causing major problems
    • IE doesn't work with proxy because it sends invalid HTTP/1.0-formatted requests.
    • Connection to AD only works intermittently because your LDAP bind limit of 5 seconds is not long enough
    • Latency through the roof due to email/web/etc
    • Service unavailable because remote port is not listening
    • etc...

    I would say tcpdump is the #1 program for serious problem-solving -- at least with the work I did...
  49. Depends on the admin role I'm in by jd · · Score: 4, Informative
    For network administration, I'd probably have a top 10 of:


    • hping3
    • bing
    • pchar
    • ping
    • traceroute
    • ncat
    • tcp dump
    • webmin
    • wget
    • ngrep


    Now, some of those are "well-known", but there are plenty there that few people (even on Slashdot) are likely to be overly familiar with.

    --
    It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    1. Re:Depends on the admin role I'm in by Subrafta · · Score: 1

      tethereal, the often overlooked text version of Ethereal, is a better tcpdump than tcpdump. Like tcpdump it uses libpcap, so you can still use all your tcpdump filters. It reads and writes many sniffer formats as well as being a great packet capture tool. Here's the man page: http://www.ethereal.com/docs/man-pages/tethereal.1 .html

      --
      Vuja De: That sinking feeling that this is going to happen again. Often occurs in meetings with Product Managers.
  50. Yep by xant · · Score: 1

    As a person who uses vim for everything up to but not including sex with my wife, I gotta say you're right about the yellow blocks.

    Try this -- :set nohls
    (that stands for highlightsearch)

    Or add it to your ~/.vimrc (sans the colon).

    --
    It's rare that you're presented with a knob whose only two positions are Make History and Flee Your Glorious Destiny.
  51. Keybindings by Felonious+Ham · · Score: 1

    I never thought much of Emacs keybindings, as they're not ergonomically assigned, sort of according to English mnemonics. Vi gets really close, but thanks to power of Eclipse, I made my own keybindings superior to either of those. Using control+i,j,k,l (and shift+ctrl for select, shift+alt+ctrl for by-word select) I never take my hands off the home row, while at the same time avoiding the pre-cursor key weirdness of Vi's dual modes.

    Try it once, you'll love it forever.

    1. Re:Keybindings by Wolfbone · · Score: 1

      " I never thought much of Emacs keybindings,... but thanks to power of Eclipse, I made my own keybindings superior to either of those."

      Heh! Before I try Eclipse, you'll have to give me a more credible reason than that it has greater power to customise the key bindings than Emacs does. In fact I suggest you steer clear of the subject of customisability and extensibility altogether if you want to make something look better than Emacs.

    2. Re:Keybindings by Felonious+Ham · · Score: 1
      you'll have to give me a more credible reason than that it has greater power to customise the key bindings than Emacs does

      I won't argue that Emacs is featureful piece of software. I've edited my share of files with it (albeit only as a functional version of pico), but Eclipse and other GUI-based editing tools (eg JEdit) make it trivial to change your keybindings. Go to the function you want in the key prefs, hit the chord. No learning curve. Emacs probably has a similarly simple process but I'd rather spend my time reading Slashdot than emacs docs (I do recall spending some time in apropos for something...).

      In any case, I was attacking Emacs default bindings to show how revolutionary my own key combinations are. The inverted T is best way to move around an editor, I just wish they were the worldwide defaults instead of Emacs' ctrl+f, ctrl+b, etc.

  52. great tools by codepunk · · Score: 3, Informative

    All the best tools are the great networking tools which allow me to track down and eradicate owned windows machines on the network.

    nmap - hmmm what trojan do we have on the network today
    tcpdump - great at finding worms scanners
    iptraf - for finding weird clients p2p movie downloaders etc.
    ethereal - great for grabbing pop and telnet passwords
    aimsniff - just for amusement

    With just those couple of tools I can keep the helpdesk busy for weeks by finding owned machines that need cleaning.

    --


    Got Code?
  53. I prefer this one by toofast · · Score: 2, Interesting

    cat .bash_history | awk '{print $1}' | sort | uniq -c | sort -nr | head -20

  54. CD to mp3 by baggins2002 · · Score: 1

    After 10 years of doing system admin I have never needed a CD to mp3 translator. Really can't see that I ever will.

  55. indispensable: zsh & mmv by Florian · · Score: 1
    I couldn't live without "mmv", i.e. renaming and moving of multiple files through wildcard expressions, like: 'mmv "*.htm" "#1.html"'. And he wouldn't have mentioned cdargs if he knew zsh - especially with compinit, i.e. the expanded tab completion system. Not only does it have cd history with tab completion, but also:
    • tab completion of hosts and - believe it or not - files and directories on remote hosts accessed by ssh
    • recursing into directories with wildcards "**"
    • tab completion of commandline tool switches, ie "foo -x"
    • tool-dependent tab completion, i.e. "mplayer " expands only to files playable by mplayer
    • tab completion of environment variables
    • spell correction for misstyped commands or arguments
    --
    gopher://cramer.plaintext.cc http://cramer.plaintext.cc:70
    1. Re:indispensable: zsh & mmv by Hatta · · Score: 1

      I couldn't live without "mmv", i.e. renaming and moving of multiple files through wildcard expressions, like: 'mmv "*.htm" "#1.html"'

      you could just do: for each in *.htm; do mv "$each" "$each"l; done

      --
      Give me Classic Slashdot or give me death!
    2. Re:indispensable: zsh & mmv by Florian · · Score: 2, Informative

      Besides from being shorter, mmv doesn't stop there. Your example doesn't scale to multiple replacements within one string, i.e. 'mmv "*_*.htm" "#1-#2.html"'. But above all, your example isn't safe. You could avoid filename collisions and accidental overwriting by aliasing "mv" to "mv -i"; however, that still wouldn't give you a complete check in advance, but make the command exit half-finished and non-reversable. mmv on the other hand cancels the operation before doing anything if there are any name collisions. - If you try to put all these features and safety measure into your shell script, you will probably end up with something that is as complex as the the C sourcecode of mmv...

      --
      gopher://cramer.plaintext.cc http://cramer.plaintext.cc:70
    3. Re:indispensable: zsh & mmv by Hatta · · Score: 1

      Your example doesn't scale to multiple replacements within one string, i.e. 'mmv "*_*.htm" "#1-#2.html"

      Sure it does:

      for each in *_*.htm; do mv -i "$each" "`echo "$each" | sed 's/\(.*\)_\(.*\).htm$/\1-\2.html/'`"; done

      You have a point about the safety though. For this command it would be easy to tell which files didn't work, just "ls *_*.htm" after running the command. The one liner is still fine for this, but I can imagine situations where you'd want that check. However I can also imagine situations where you'd need the power of sed et al., even more.

      Suppose the fields you want to operate on aren't separated by a useful delimiter. You might have a directory full of directories named: ph1997-07-01.oggf ph1997-12-11.oggf ph1998-04-04.oggf, and some named like ph92-07-25.oggf ph97-11-19.oggf. (these are directories containing oggs of Phish concerts, btw) So you want to convert the phYY-MM-DD into phYYYY-MM-DD directories, as per etree naming standards.

      Can you do that with mmv? If so I'd be real impressed. I'm sure mmv is quite useful, but no excuse for not being handy with the shell.

      --
      Give me Classic Slashdot or give me death!
  56. rm Haiku by MattyDK23 · · Score: 1

    The Linux cheat code:
    rm -f -r /
    Use responsibly.

  57. Maybe a few lesser-known by toofast · · Score: 4, Informative

    ethtool and mii-tool. The Cisco 2970 switch we use has the knack of initializing the interface in half-duplex mode if the port is set to "Auto". Easily fixed by setting the port to Full, but useful nonetheless.

    strings. Good to check if executables are using /etc/hosts.allow and /etc/hosts.deny, or where pop3/imap are looking for PEM certificates to configure pop3s/imaps, etc...

    vmstat. Think your system is paging, or a card is generating too many interrupts? /proc filesystem. Favorites include /proc/net/dev, and /proc/uptime, /proc/cpuinfo, /proc/loadavg. Good for aggregating individual server load data in a cluster.

    awk and sed. Mentioned elsewhere, but priceless.

    chmod. I think the Linux filesystem permissions are too ... permissive. Cut down on access to your logfiles and to config files in /etc.

    *quota*. A must for restricting disk space use.

    umask. When you need root, set your default umask fairly tight. I use 0077, but when you need to cpan some common perl modules, switch to the more common 0022.

    jobs, fg and bg. Old-school unix commands to play with jobs that .. might take a while. When you forgot to & your command, use CTRL+Z then bg your job.

    There may be more, but I can't think of any others right now...

    1. Re:Maybe a few lesser-known by Nailer · · Score: 2, Informative

      > strings. Good to check if executables are using /etc/hosts.allow and /etc/hosts.deny, or where pop3/imap are looking for PEM certificates to configure pop3s/imaps, etc...

      Sure, but ldding the binary is a better way to discover is the app supports TCP wrappers.
      ldd /usr/sbin/sshd, for example, mentions libwrap.so

      But really, whether an app uses TCP Wrappers or where it looks for SSL certificates should be documented plainly. I think /etc/pki may also be an upcoming FHS standard for certificates too.

      strings is still handy tho - to find out what a binary from a rootkit does, without running it.

    2. Re:Maybe a few lesser-known by stor · · Score: 1

      strings is still handy tho - to find out what a binary from a rootkit does, without running it.

      Absolutely. You can also use it to find out whether a binary has plaintext passwords embedded within it. Handy little tool.

      Cheers
      Stor

      --
      "Yeah well there's a lot of stuff that should be, but isn't"
    3. Re:Maybe a few lesser-known by Anonymous Coward · · Score: 0

      Add wait to that list.

      lengthy-command & ....
      wait %1 && other-lengthy-command

  58. GNU Screen. by SlapAyoda · · Score: 3, Interesting

    I'm surprised at how few serious *NIX Administrators I know are using GNU Screen. For some reason, it seems that the majority of them have not yet discovered the sheer power of the console window manager. It allows me to manage dozens of virtual windows all within the same terminal. In addition to eliminating the need to window-switching on my local machine, it also allows me to perform complex select, copy, and paste operations using only my keyboard. WIthout using a mouse, I can select and copy text in one window, advance into another window, and paste the text. The best part is that if my DSL drops or I decide to reboot my computer, all of my screened sessions stay on the server, leaving my work in exactly the same place as it always was, and with a nice scrollback history. I couldn't work without it.

    --
    # wrote sig.txt, 23 lines, 31337 chars
    1. Re:GNU Screen. by belg4mit · · Score: 1

      I suspect one reason is that the default binding is not
      emacs-style bindings (emacs and shell line-editing)
      friendly. I've found ^U to work pretty well (that
      obscures the umm obscure argument passing key combo)

      --
      Were that I say, pancakes?
    2. Re:GNU Screen. by darkwhite · · Score: 2, Informative

      Concur. But even more importantly, screen by default doesn't come with any sort of on-screen window list. This .screenrc line makes a screen session tremendously more comprehensible to me:

      backtick 1 0 0 whoami
      caption always "%>%{kw}%1`@%H %{bw}%?%-Lw%?%{bW}%n*%f %t%?(%u)%?%{bw}%?%+Lw%?%"

      This will put a caption at the bottom of the screen listing your open shells and highlighting the current one.

      --

      [an error occurred while processing this directive]
    3. Re:GNU Screen. by darkwhite · · Score: 2, Informative

      Also, put this in your ~/.bash_profile:

      if [[ `who -m` ]] ; then
                      [ -z "$WINDOW" ] && screen -xdR
      fi

      to start screen automatically on terminal logins and grab the previous screen session.

      --

      [an error occurred while processing this directive]
    4. Re:GNU Screen. by fishbowl · · Score: 1

      Ditto. screen is absolutely essential, no doubt about it. I do wish it had the ability to split terms vertically as well as horizontally. I still miss the terminal sizing ability of desqview, if you go back that far.

      I also map quite a few keybindings in screen, and I make good use of the multiplex capability for collaboration and teaching.

      --
      -fb Everything not expressly forbidden is now mandatory.
    5. Re:GNU Screen. by SamHill · · Score: 1

      I'm surprised at how few serious *NIX Administrators I know are using GNU Screen.

      I used to use screen, back in the days when I had a 2400 baud modem, running a terminal emulator on an Apple //e. These days I have DSL or gigabit Ethernet, a 20" LCD, and X (or Mac OS X). I can open as many terminal windows as I like, rearrange them on the screen, and even have several of them viewable at once so I can, for example, watch log files on multiple machines whilst typing commands that interact with those machines in other terminals.

      Screen was cool in its time, but these days the only time I'm stuck with a text terminal is when X gets screwed up and I have to fix its configuration file. I can imagine using screen again, but it would have to involve working from a smartphone or a PDA.

  59. Re:Mine (3) by chrono13 · · Score: 1

    man man man "Man, I give up."

    --
    You have been eaten by a Hurd of GNU.
  60. Nedit is the only *nix editor worth using. nm. by btobin · · Score: 1

    nm

  61. Poor list... by kosmosik · · Score: 1

    Like telnet? WTF... It is awkard.

    I would point to OpenSSH, OpenLDAP, Samba, Your Favourite Storage Management System, Your Favourite Scripting Language, Your Favourite Intrusion Detection System, Your Favourite Editor, Your Favourite Shell, Your Favourite ... etc. :) I mean editors and password generators are in fact just tools - and as for tools they are a matter of a *prefference*. Essential things are like Samba or OpenLDAP - you need them, they are good. :)

  62. forgot one... by Anonymous Coward · · Score: 0


    FreeBSD

  63. using anything other than vi... by comcn · · Score: 1

    iusually is a big problem for me, as I'm so used to vi commands^[o
    I just can't stop hitting escape after typing things!^[:wq

    1. Re:using anything other than vi... by joecode · · Score: 1

      iclearly you are no serious vi user:
      that extraneous 'o' gives you away.

      long live vi!^[yy1000p:wq!

  64. Fuel for the fire by ctr2sprt · · Score: 2, Interesting
    I'll go ahead and add my list of tools I find myself using all the time. Note that because I admin more than just Linux boxes, I only use tools which are likely to be present on every Unix variant.

    • find. It can be a handy ps replacement for boxes you think might be rooted (find /proc -name exe) in addition to all its other uses.
    • xargs. Everyone uses it with find, but it's also good with...
    • awk and/or cut. Need to reset quotas for 900 users? awk -F: '{if($3 >= 1000) print $1)} | xargs edquota -p protouser.
    • sh. If you need to run more than one command via xargs, you can use a while loop in sh. I actually prefer tcsh as my interactive shell because of its nifty history-completion feature, but it's weaker at scripting.
    • sort and uniq. They get one item because I almost never use them individually. Your webserver's getting DoSed and you want to know what IPs to firewall? netstat -an | awk '$4 ~ /:80$/ {print $5}' | cut -d: -f1 | sort | uniq -c | sort -n.
    • grep -v. Yes, the -v is part of it: I almost never use regular grep for some reason. -v does the opposite of usual grep and excludes matching lines, which for me turns out to be much more useful.
    • telnet. Same reason as in TFA. I mainly use it as a quick way to see if relaying is actually disabled or not, or if a service is hung. (Running according to ps, listening according to netstat, accepting connections, but not doing anything.)
    • less. Mainly because some versions of more are worthless and won't allow you to scroll up, for example.
    • vi. You need an editor, and once you climb the sheer face of vi's learning cliff, this is good at it. I still can't stand to use vi for coding, but for writing and adjusting config files it's great. Also it's pretty much the only editor guaranteed to be in all of Solaris, HP-UX, IRIX, FreeBSD, and RedHat Linux, so it's not like I have much of a choice.
    • ssh. The all-purpose Swiss Army Chainsaw of networking. If you need to move data across a network, ssh can do it. It may be complicated, painful, and slow, but by God it can be done. ssh outer ssh border ssh inner tar czf - / | ssh storage 'cat >inner.tar.gz'.

    There are other useful tools, but I pretty much use those on every single box I touch for any reason.

  65. bootloader by uberjoe · · Score: 1

    What about lilo?

    --

    The days of the digital watch are numbered.

  66. STRONGLY AGREE by kebes · · Score: 1

    Absolutely right. When I first got started with linux, everything was very confusing. Webmin made it much easier to get things configured. The ability to do remote configuration hooked me on linux. Of course, now I always use ssh and do thing via CLI, but again I think it's important to introduce new users to these tools, since they help bridge between the "point and click" style of interfacing with the (more powerful) command-line administration. The fact that Webmin even gives you a CLI if you want it is great!

  67. real tools by Anonymous Coward · · Score: 0

    I don't consider editors much of a tool - really useful things for me are:
    lsof
    iostat
    vmstat
    tcpdump
    nmap
    ndd
    nessus

  68. My Ten Would Be... by Shads · · Score: 2, Interesting

    ... (as a sysadmin)

    grep - Simple, Powerful, Elegant
    sed - Powerful and versitile
    awk - For what sed doesn't do easily
    perl - For what awk doesn't do easily
    vim - In the end there can be only one... it's vim.
    cut - is your friend
    make - automation is good and make makes it easy
    lynx - great for testing web stuff
    slrn - news, it keeps you sane after being locked in the closet for a month
    mtr - just flatout helpful

    --
    Shadus
    1. Re:My Ten Would Be... by Coryoth · · Score: 1

      sed - Powerful and versitile
      awk - For what sed doesn't do easily
      perl - For what awk doesn't do easily


      You can probably add 2 more items to your list by noting that perl -pe make s a great replacement for sed, and perl -F[PATTERN] -ane makes a great replacement for awk -F[PATTERN], and thus removing awk and sed. Perl gives you all the power and flexibility, and is nice enoug to provide commandline switches to take all the hassle out of common operations.

      (For reference "-pe" effectively wraps whatever perl code you write in a while(){...; print;}, and "-F[PATTERN] -ane" wraps your code in while(){@F = split(/PATTERN/,$_); ...})

  69. Wheee by Anonymous Coward · · Score: 0

    288 cd
    263 ls
      82 wine
      66 time
      49 less
      46 man
      41 sudo
      40 ll
      21 unzip
      21 ssh

  70. 'kill -9 1' will get you laid by Flunitrazepam · · Score: 3, Funny

    How about that? Run it and your social life will immediately improve. It is the first step toward a better life. Won't you take it today?

    --
    1) Your analysis is based on bad assumptions so your result is way off. 2) You're a sick bastard for fucking a horse.
    1. Re:'kill -9 1' will get you laid by Ziviyr · · Score: 1

      It said it wouldn't allow the surgery.

      --

      Someone set us up the bomb, so shine we are!
  71. Could name more interesting tools... by bsaxon · · Score: 0

    I don't think the tools he mentions are that interesting at all. In fact, many of the tools have nothing directly to do with sysadmin activities at all. I love abcde too, but what does have to do with Linux administration. GNU Screen does the same things as the default terminals that come with KDE (kterm) or Gnome (gnome-terminal), specifically one window tabbed consoles and detaching. The use of emacs or VIM or even nano is preference/needs based and could be the focus of an entire article, as it has been done before.

    The only tool that was mentioned I found that I thought was worth mentioning was rsync. This is simply because it is not as well known as other tools. Although, its use has spread. I find people using scp or something else, manually or scripted, for things that would be handled much more efficiently with rsync.

    To be fair, dig was worthy of mention, for the simple fact that many people who have become used to using nslookup don't know that another tool exists, perhaps even on their machine, that they may find more advanced. Also, pwgen could be useful, but not crucial by any means. I guess some of these tools may solve some annoyances people may have, but not necessarily working to improve or make the role of a sysadmin dramatically easier.

    It would have been more useful to mention some monitoring tools or some web applications. For instance, tools that I would mention that help syadmin activities include the following:

    - Cacti (http://www.cacti.net/ is a PHP application that uses RRDtool/SNMP to monitor server performance and usage (like disk space, CPU, load average, logged in users, and a lot more).
    - phpMyAdmin/phpPgAdmin/phpLDAPadmin
    - syslog-ng/php-syslog-ng (http://freshmeat.net/projects/php-syslog-ng/)
    - Gregarius (http://www.gregarius.net/) is an a nice web RSS reader. I use this to keep up with the latest version of software releases, a lot of times using the RSS feeds available for all SourceForge.net projects, or otherwise using a feed that may be available on the software's website. Tiny Tiny RSS is another nice RSS reader (http://bah.spb.su/~fox/tt-rss/)

    Since I work on a university campus, web applications help a lot b/c I can be in any lab or at home or on any PC and know exactly what is going on with all systems and even the development of the software that is used on them (RSS). But web applications are usually considered useful because access to them is easy and sometimes leave less room for human error.

  72. There is only one by sl4shd0rk · · Score: 2, Insightful

    Knoppix.

    --
    Join the Slashcott! Feb 10 thru Feb 17!
    1. Re:There is only one by Anonymous Coward · · Score: 0

      I agree, it's the only tool to carry around for fixing/working on system. I wouldn't hire that admin if he was the last one on earth, who's only concern is getting/converting MP3's.

  73. Yes, you can by WindBourne · · Score: 1

    From what I hear from the MS people here, one is already too many.

    --
    I prefer the "u" in honour as it seems to be missing these days.
  74. You may wish to read first by WindBourne · · Score: 2, Funny

    Plain and simple, zonk points out that you can not work all the time. Having that available allows you to rip to your local machine and then listen to them as you work. Made total sense to me.

    --
    I prefer the "u" in honour as it seems to be missing these days.
  75. Subject should be "Why these tools are BORING" by bsaxon · · Score: 0

    and some applications I find useful.

    Furthermore, I would love to see an article that focuses on some "lesser known tools" or "extremely useful that would save you a lot of time but no one talks about."

  76. item 11 by JohnLeFucker · · Score: 0

    freeBSD

    --
    happy
  77. Could be more productive... by Infinityis · · Score: 1

    "Part of the reason for that is the fact that I no longer have to think about using Vi-style keybindings, and adjusting to anything else would seriously hinder my productivity"

    In that case, if you ever want to try to learn Dvorak, you'll be in twice as much pain...I guess you've prematurely optimized for sub-optimal typing.

  78. Ncat, wget, and SSH are all that is needed. by WindBourne · · Score: 1

    After that, you can always find tools available somewhere.

    --
    I prefer the "u" in honour as it seems to be missing these days.
  79. {OT}Re:Vim? Emacs foreva! by poofyhairguy82 · · Score: 0, Offtopic

    Man that post is funny.

  80. Instead of cdargs... by Clueless+Moron · · Score: 3, Informative
    I define these functions in my shell .rc:
    mk() { eval ${1:-MKPWD}=\"`pwd`\"; }
    rt() { eval cd \"\$${1:-MKPWD}\";pwd; }

    You type "mk" (as in "mark") and "rt" (as in "return") to mark a directory and later go back to it.

    Or you can give it a name: do "mk foo", and later on "rt foo" will move you back there.

    But the Big Win? With the above, it gets set as a shell var: $foo is also set to the directory, so you can do things like "cp $foo/*.baz ." to good benefit. In addition, setting up this system is just a trivial matter of setting environment variables in your .profile.

    PS: Trivia: the "mk" and "rt" names were inspired by troff, where those commands were used to keep mark and go back to vertical positions on a page... yeah I'm an oldie.

    1. Re:Instead of cdargs... by honkycat · · Score: 1

      I use bash where you get pushd, popd, and dirs which give similar functionality. One advantage is that you can push multiple directories on to the stack, although I find that I rarely actually need to switch between a couple so that's kind of a boobie prize.

    2. Re:Instead of cdargs... by Kynde · · Score: 1

      I define these functions in my shell .rc: ...

      But the Big Win? With the above, it gets set as a shell var: $foo is also set to the directory, so you can do things like "cp $foo/*.baz ." to good benefit. In addition, setting up this system is just a trivial matter of setting environment variables in your .profile.


      I've used similar shell functions that utilize the environment, too, but on every occasion I've returned to my older scripts that write the same information to file(s). I've found it really practical if the dir aliases are a little less volatile, because it makes them accessible for numerous newer xterms, relogins after network interruptions and even portable using nfs, rsync or likes.

      And since I'm guessing cdargs does just that I will have look at it or finally write a solid version of my own.

      --
      1 Earth is warming, 2 It's us, 3 it's royally bad, 4 we need to take action NOW
    3. Re:Instead of cdargs... by bhadreshl · · Score: 1

      you can also type: 'cd -' which will return you to the previous directory.

    4. Re:Instead of cdargs... by Anonymous Coward · · Score: 0

      Isn't this the same has using the pushd and popd commands?
      pushd "pushes" a directory into a stack. You can do this many times. Then, when you popd you "pop" the last directory that was pushed in.

      So the equivalent to your functions would be "pushd ." and "popd".

    5. Re:Instead of cdargs... by Clueless+Moron · · Score: 1
      No, pushd and popd are a stack. You can only go back to where you just were.

      With this business of "marking" a directory, you can jump around arbitrarily. For example, you'd type "rt src" to go to your source directory, and then "rt mp3" to go to your mp3 collection, and then "rt web" to your website directory, and then "rt src" to go back to your src directory again.

      In other words, there is no stack. I've never liked pushd/popd because I hardly ever access directories in a stack-like fashion.

    6. Re:Instead of cdargs... by Clueless+Moron · · Score: 1
      Yeah, but only having the "previous" directory isn't good enough for me. And I don't like the stack-like behaviour of pushd/popd.

      Most of all I don't like having to remember long arbitrary paths. Where's the web html directory on any given box? If I set $www in my .profile on every box to be wherever the heck it is, then "rt www" gets me there. And if I've downloaded some stuff into some random junk directory somewhere and I now want to copy it to a directory called "new" in the web html place, I would do:

      mk x # remember the current directory in $x
      rt www/new # go to the "new" directory in the web space
      cp $x/*.html . # copy the stuff from $x, wherever that was, to here
      vi *.html # edit it
      rm -rf $x # get rid of the old x directory
      rt cgi # go to the cgi-bin directory and do something else
      ...etc. Not stack based, and you get short mnemonic names for locations. which you can use as variables.
  81. Editor to use depends on what you're doing... by Akaihiryuu · · Score: 1

    My text editor of choice depends on what I'm doing. Vim absolutely rules for config file editing, IMO nothing else touches it for this. I usually use either nano or pico if I'm doing something that requires word wrap (like say composing an email in pine). I tried emacs once or twice, but it had way too many options to wade through that I didn't need for what I was doing.

  82. sed by donweel · · Score: 2, Insightful

    I found sed to be usful when I was writing shell scripts. Find for shure. And to amuse myself wall, for example, fortune -o | wall (add escape codes to kill your banner). Also ps can be important when things go wrong.

    --
    Many a long talk since then I have had with the man in the moon; he had my confidence on the voyage. Joshua Slocum
  83. shell loops by algae · · Score: 1

    My all-time most useful tool for dealing with multiple servers (think 'web farm') is the humble for-loop.

    for host in www{0..9}; do
        ssh $host "do stuff"
    done

    Works best when combined with ssh-agent for that wonderful lack of passwords.

    --
    Causation can cause correlation
    1. Re:shell loops by Jokkey · · Score: 1

      Or user ClusterSSH or a similar tool - it opens up xterms to each of your 10 servers, then you type your command once and watch as it executes on all 10 servers simultaneously.

  84. What about network tools? by Auntie+Virus · · Score: 1

    2 absolutely must-haves: Tcpdump IPTraf I couldn't live without them

    --
    Why yes, I *AM* new here. Why?
  85. Hmmm, Isn't This Exactly What by Master+of+Transhuman · · Score: 0, Flamebait

    the Linux-Is-Harder-Than-Windows crowd says?

    "Part of the reason for that is the fact that I no longer have to think about using Vi-style keybindings, and adjusting to anything else would seriously hinder my productivity."

    In other words, this moron is justifying using twice as many keystrokes to do a job because he doesn't want to spend the time converting to a GUI product.

    Happy metacarpal tunnel syndrome, clown.

    --
    Richard Steven Hack - This sig is TOO GODDAMN SHORT TO DO ANYTHING USEFUL WITH! MORONS!
  86. Mine by Lord+Kano · · Score: 1, Interesting

    Midnight Commander is #1.
    ddrescue #2.

    and I'm not sure what else I need often enough to specifically include it. I'm working on a USB key system for emergency repairs and maintenence.

    LK

    --
    "Hi. This is my friend, Jack Shit, and you don't know him." - Lord Kano
  87. vi and sh by jmyers · · Score: 1

    1. vi
    2. sh

    everything else is application specific

  88. Elinks rocks... by arcadum · · Score: 3, Informative

    Elinks has javascript support. I've deployed elinks to many systems as a last resort for the tech support crew when the ppp connect is hosed.

  89. Tsync by Earlybird · · Score: 3, Interesting

    You may want to check out Tsync, one of the recent Google "Summer of Code" winners: "Tsync is a user-level daemon that provides transparent synchronization amongst a set of computers. Tsync uses a peer-to-peer architecture for scalability, efficiency, and robustness." Unlike rsync, Unison, etc., Tsync is a locally installed daemon which automatically and transparently syncs two or more hosts.

  90. OpenBSD by Ratbert42 · · Score: 1

    The biggest productivity gain I ever got working with my Linux boxes was when I put an OpenBSD gateway/firewall between the Linux boxes and the internet. Trollish, but serious.

  91. dmidecode! by Nailer · · Score: 2, Informative

    Your /proc stuff if great, here's a handy accompaniment: ever logged onto a system and had no idea what it is? Maybe a crappy Dell Poweredge or whiteboxx kit, maybe a nice solid IBM/HP box? Wanted to get the system's asset tag for support reasons?

    dmidecode. Part of the kernel-utilss package on most Linux distros.

  92. Actually by Nailer · · Score: 1

    Yeah, rm, With the options last.

    rm /foo -rf

    Works fine. Yeah, it's GNU, not Unix. But if you git enter too early, you'll be glad.

  93. My List by Anonymous Coward · · Score: 0

    treeps - To see what's going on, by whom and to kill/mod stuff! Also explore /proc
    locate - To find the files quick
    man -k - To find the tools quick
    DirRadar - To get places quick
    sh -x - To see what script magic happens
    awk - Still gawking after all those beers
    grep - To cut to the chase
    ssh/scp - MultiMachine magic tricks - ok to copy configs
    find - still a nice power tool for subspace command execution ;)
    tar/gzip - Still the best transporter technology!

    See http://www.orbit2orbit.com/gmd for treeps/DirRadar.

  94. BitTorrent by yaiba · · Score: 1

    don't forget bittorrent

  95. Checkinstall by Solosoft · · Score: 1

    I can't seem to find a copy of that checkinstall program. The website seems to be down as of 1:06AM EST time. Would someone have a copy (source) that I could maybe have. It looks like a nice program to keep my self compiled programs as nice little .debs.

    Unless someone knows of a .deb of checkinstall the source would be just as nice.

    Thanks in advance :)

  96. Looks good! by J_Omega · · Score: 1

    Seriously, for users of VIM, I could see this being a really nice extension thingy.

    Some nice ideas you have going on there, digitect!

    I'd mod you up if I had the points.

  97. The most important of them all.. by tubamannP · · Score: 1

    Bzflag!

  98. "vim" useful for big files by Animats · · Score: 1

    I'm not a big fan of "vim", but it has its uses. One is looking at very large log files. Its large-file startup time is quite good, and it doesn't choke if you feed it a 50MB file.

  99. multitail by flok · · Score: 2, Informative

    Sorry for plugging my own project but I think MultiTail can be very usefull for a lot of admin tasks. MultiTail lets you view one or multiple files like the original tail program. The difference is that it creates multiple windows on your console (with ncurses). It can also monitor wildcards: if another file matching the wildcard has a more recent modification date, it will automatically switch to that file. That way you can, for example, monitor a complete directory of files. Merging of 2 or even more logfiles is possible. It can also use colors while displaying the logfiles (through regular expressions), for faster recognition of what is important and what not. It can also filter lines (again with regular expressions). It has interactive menus for editing given regular expressions and deleting and adding windows. One can also have windows with the output of shell scripts and other software. When viewing the output of external software, MultiTail can mimic the functionality of tools like 'watch' and such. For a complete list of features, look here. Multitail can be found here: http://www.vanheusden.com/multitail/.

    --

    www.vanheusden.com - home of Multitail, HTTPing, CoffeeSaint, EntropyBroker, rsstail, bsod, listener, nagcon, nagi
  100. HTML in Less? by Vo0k · · Score: 1

    How does one force goddamn Less to display the contents of a html file instead of trying to render it?
    Less is better in many ways than More, but often it tries to be smart TOO hard.
    "This file may be binary, are you sure to open it?" on a text file containing native ISO-8859-2 characters, then showing inverse video hex codes junk in place of the characters instead of using properly configured console font to display them. More works okay, displaying the chars as they are. Same about unicode.

    Please, make Linux commands do one thing and do it well, not to keep prompting the user "You might be an idiot. Are you an idiot (y/n)?"

    --
    Anagram("United States of America") == "Dine out, taste a Mac, fries"
    1. Re:HTML in Less? by Jokkey · · Score: 1
      How does one force goddamn Less to display the contents of a html file instead of trying to render it?

      less -L? Or check your LESSOPEN environment variable and lesspipe configuration.

      Although I'm curious to know what distro you're using; Red Hat / Fedora less displays raw HTML, and I'm surprised to hear that another distro thought it would be a Good Idea to try and render it.

      "This file may be binary, are you sure to open it?" on a text file containing native ISO-8859-2 characters, then showing inverse video hex codes junk in place of the characters instead of using properly configured console font to display them.

      less -r? Or try futzing with your TERM and LANG variables; sorry, this isn't really something I've dealt with.

    2. Re:HTML in Less? by Anonymous Coward · · Score: 0

      gentoo.
      fumed for 3 hours with recovering tcsh from "feature fountain" to "usable" state after an upgrade too.

  101. 0.01 EUR/USD/GBP contribution by VincenzoRomano · · Score: 1

    No words about the text editor choice just like no words about your religion faith.
    I don't like dig as well as the old-fashioned nslookup because of the tight coupling with BIND. I prefer the independent host (read chap.3), an historical DNS tool.
    Finally, if I'd need to do some tests in TCP/UDP I'd choose either netcat or GNU-netcat.
    Of course there is no perefect choice in a absolute sense. I simply have found these tools more effective than the other ones.

    --
    Maybe Computers will never be as intelligent as Humans.
    For sure they won't ever become so stupid. [VR-1988]
  102. Oh yeah? (pr0n howto) by identity0 · · Score: 3, Informative

    As this table shows, curl does not have "Recursive Downloads", which wget does. Which is the most useful feature of wget - you can point it at a pr0n link or gallery site like so:

    wget -r -k -H --level=3

    and it will follow all the pr0n links to three levels down, and retrieve all the pix/movies it links to. Saves you tens of hours of frustrated clicking and saving manually. Not that I personally use it for such vile things, of course :)

    1. Re:Oh yeah? (pr0n howto) by cloudmaster · · Score: 1

      Don't forget the user-agent flag - "-U 'somebrowser/1.1'" gets around those pesky sites which block downloads based on wget's default user-agent (or the user agent of many popular downloaders). :)

    2. Re:Oh yeah? (pr0n howto) by Anonymous Coward · · Score: 0

      I was once going to write a smart pr0n downloader that would attempt variations of the number sequence in a URL, rather than the current one i use which just iterates through a loop of every possible number within a set range using wget. (I hate donwloading all the extra HTML and crap.) Unfortunately, wget is very limited when it comes to programmability/response. It's great for recursive downloading and "try it until you get it", not so great for intelligent scriptability.

  103. abcde as an admin tool? by eleknader · · Score: 1

    In the past, I did most of my CD-to-MP3 conversion with Grip, but since I was turned on to abcde, I've started using it more and more.

    I just can't imagine any administration task you need CD ripping for. Can you?

    Eleknader

  104. Intuitive controls? by The+Impossible · · Score: 1

    If I'd known these when I tried emacs... My first encounter resulted in opening an extra window and killing emacs...

    As I see it there are now 3 mainstreams in behaviour of tools, the stream using vi-like commands, the stream using emacs-like controls and a stream using intuitive controls... I hope the latter will prevail and that I can adept to this way of thinking. (for now, i prefer the vi-like controls)

    Ah well, the times are changing... Adept or forget

    --
    ... Wenn ist das Nunstruck git und Slotermeyer? Ja!... Beiherhund das Oder die Flipperwaldt gersput!
  105. can't grep this by ysegalov · · Score: 0

    rsync was there on his list. But what about grep? How can you live without grep?

  106. simple tools by stroppytux · · Score: 1

    cd
    ps
    grep
    ls
    mv
    | /proc
    netstat
    vim
    bash variables
    sed

    They are all tools that dont take a degree to use, and complete 90% of the tasks.

  107. vi command line editing by Anonymous Coward · · Score: 0

    Man, you're so wrong :-)

    set -o vi is the first thing I type in any bash shell that is not my own.
    You have the normal cursor keys for the command history normal line movement keys (wWBbfF etc...). Want to find an old command: /whatever

    vi command editing is very powerful and useful

    Bart

  108. Here's my list by insomaniac · · Score: 2, Interesting

    Here is my list of tools I can't live with in my admin life:

    #1: vim (My editor of choice for anything)
    #2: netcat (beats telnet for the network testing forte)
    #3: ssh-agent/ssh (for secure remote logins and other nice tricks (like tarring over ssh)
    #4: nmap (for a quick network scan to see what hosts are up in an unknown network or an in depth portscan of a particular machine)
    #5: perl (who needs shell script when you have perl ;))
    #6: mtr (cause traceroute is sooooo 1980's)
    #7: screen (for those long taking operations on a bad network connection)
    #8: grep (the all purpose filter/text finder with -r)
    #9: find (flexible find/recursive operations tool)
    #10: host (quicker and easier name resolves than dig)

    --
    The way to corrupt a youth is to teach him to hold in higher value them who think alike than those who think differently
  109. Even bettererest... by fireboy1919 · · Score: 1

    No - the superlative is unclear as is the reason.

    It should be this:
    "netcat (nc) is the most bettererest than telnet at diagnostimicating"

    --
    Mod me down and I will become more powerful than you can possibly imagine!
  110. My list... by ledow · · Score: 3, Interesting

    - ssh (file transfers, port forwarding, encryption and remote login in one tiny tool. I even use it in place of WEP or WPA)
    - pico (can't stand vi but pico is small and has enough of a help that I don't have to memorise keystrokes)
    - grep, sed (with grep and sed, you can pretty much manipulate any file/program output into whatever you want, strip IP's out of errors/logs, etc.)
    - x11vnc (like any other VNC program but supports Tight encoding and also lets me see what an EXISTING X session is doing. Combined with a script that seds/greps the auth code from the process list and you have automated remote desktop)
    - screen (if for no other reason than it lets you start a job at work (like a kernel compile) and watch it's progress throughout the day even if you have to log off in between. And when you get home, you can still check on it)
    - tinyproxy (wonderful small, easy to use web-proxy that I tunnel into from work to bypass the far-too-restrictive filters in the schools that I work in)
    - slocate (worth it's weight in gold when you have it auto-indexing overnight across all filesystems. Where's that file I used ten years ago that had Xen in the name? a simple command, 2 seconds wait and you get the full path).
    - dnsmasq (tiny util, bung it a massive list of public DNS servers and point your DNS requests to 127.0.0.1 and it will loop through them all until it gets a response. Failover to other servers, built-in full DHCP server, invaluable behind a NAT, simple config. Saved my life I-don't-know-how-many-times when my ISP DNS servers were feeling flaky. No one even noticed that half the time our ISP's weren't responding to DNS at all.)
    - lsusb, lspci, /proc/cpuinfo, free etc. (Invaluable for hardware discovery. Boot a knoppix CD, run those commands and instantly you know everything about the hardware that you need to know.)
    - dd, cat, more, sh, etc.(where would we be without them?)

  111. Re:My 2 cents by linwoes · · Score: 1

    find - Takes longer than slocate but does not require indexing. Also allows execution of commands on found files. Yummy. Probably my most used tool because I use it to execute other tools often. tar - Come on now. It is like sliced bread. (Can be replaced with cpio for those who do not like their bread sliced.)

  112. CVS is top for /etc management. by hkoba · · Score: 1

    Why not CVS?

    I have used CVS for /etc of my linux boxes since 2000. It works very well.
    It can manage most of your change history for /etc and make them recoverable.
    It can even help you with ``cvs diff'' when your /etc is compromised by crackers.

    One annoying point of CVS for /etc is its invasive architecture.
    It always creates CVS/{Entires,Root,Repository}. This affects some app, so you
    need to teach CVS not to handle some files/directories.

    If you use non-invasive revision-control system (like SVK),
    such problem might be avoidable. But I have not enough experience with it yet.
    ----
    If you feel my english is strange, please correct me!

  113. Bash completion by neves · · Score: 1

    How can anyone claim to be productive without BASH COMPLETION?

  114. Cfengine by Jokkey · · Score: 1

    Cfengine is a great Linux admin tool. Define configuration scripts once on a server, then they're automatically pushed out to each configured computer. Saves a lot of manual work keeping a bunch of servers consistent, and when I set up a new server, it's automatically configured by Cfengine.

  115. This is ok for firefighting, but... by sholdowa · · Score: 1

    Surely the job of a sysadmin is to get on top of everything, and then to be proactive in managing their systems. So, for me, things like Big Brother ( http://bb4.com/ ) and mrtg ( http://people.ee.ethz.ch/~oetiker/webtools/mrtg/ ) are the most useful. which editor you use is just a matter of preference. Personally I'm with the author ( and with telnet too ), but that's after 20+ years of picking up bad habits

  116. My very favorites, shamelessly ripped from the Net by SeaGK · · Score: 1

    with appologies to the real (unknown?) author, here are my favorites
    who|grep -i blonde|talk|cd ~ | wine| talk| touch| unzip| touch| strip| gasp| finger| gasp| mount| fsck| more| yes| gasp| umount| make clean| sleep

  117. Uhm by enantiodromia · · Score: 1

    This is newsworthy how? Here are my Top 10: cd ls top ssh netstat wall shutdown nmap BitchX exit
    so interesting...

  118. OH yeah? read the man page by Anonymous Coward · · Score: 0

    you canuse wget -A to only accept certain filetype for download, this way although it will traverse any structure of html's it will only save the particular file type you want. Also use -p to stay within the parent so it doesnt get crosssite ads and finally set the level which the gp explains.

  119. Hypocrites by Anonymous Coward · · Score: 0

    Ya know, this however is the exact same thing that occurs with Windows. People are comfortable with its quirks and do not want to change to something new. Linux zealots scream that it sucks and this new thing is far better but then they also kick and scream when you try to get them to use a new editor or something outside their little turf that they are comfortable saying it sucks and they know how to use their old system

  120. Re:A windows XP CD by brighton · · Score: 1

    You sure about that? I think its a 'fantastic' example of everything that is wrong with proprietary softwware providers trying to passively adapt their products to the Linux environment. Take instead a mysql installation: yum install mysqld Or, if you're afraid of the command line, fire up synaptic click search type "mysql" , click the checkbox next to it, and click 'apply'.