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."
Condoms! With all the groupies chasing Linux system admins, you can never have too many condoms!
by far the most useful tool in troubleshooting.
.
You're right, with this, Emacs rocks.
"A door is what a dog is perpetually on the wrong side of" - Ogden Nash
the article said "toolkit" not "tool shed, tool warehouse, and tool factory on wheels".
MORTAR COMBAT!
What's telnet? :P
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!
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.
nothing quite like a vi/emacs flame fight to cap off the afternoon, eh? thanks y'all!
The only 3 commands any Emacs user needs to know:
Ctrl-x
Ctrl-c
vi
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
d that bash has made some progress over the years, but zsh is my friend.
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.
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.
Wget sucks, curl rules!
Media that can be recorded and distributed can be recorded and distributed.
-kfg
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.
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.........
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".
rm
preferably with the -Rf options.
Sony ha
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.
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.
The Army reading list
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!
I feel like Ozymandius.
Sniffle.
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.
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.
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/
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.
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!
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.
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.
:syn off)
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
bash$
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) 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.
my iBook is my most useful tool... A portable unix box that never needs to be messed with or tweaked to work!
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.'"
Click here or here.
When did a CD audio ripper become an essential part of an admin's toolkit?
my sig's at the bottom of the page.
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.
also, the pipe character
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.
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.
nmap
:)
tcpdump
ethereal
I thought these were some of the tools sysadmins use
sex is better than war!
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
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.
Nano!!
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?"
Everything here, except replacing vim with $EDITOR. Because everyone has their own favourite, but should learn one console capable editor.
"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.)
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ï
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.
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.
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:
I would say tcpdump is the #1 program for serious problem-solving -- at least with the work I did...
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)
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.'"
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.
:set nohls
Try this --
(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.
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.
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?
cat .bash_history | awk '{print $1}' | sort | uniq -c | sort -nr | head -20
After 10 years of doing system admin I have never needed a CD to mp3 translator. Really can't see that I ever will.
gopher://cramer.plaintext.cc http://cramer.plaintext.cc:70
The Linux cheat code:
rm -f -r /
Use responsibly.
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.
/etc/hosts.allow and /etc/hosts.deny, or where pop3/imap are looking for PEM certificates to configure pop3s/imaps, etc...
/proc filesystem. Favorites include /proc/net/dev, and /proc/uptime, /proc/cpuinfo, /proc/loadavg. Good for aggregating individual server load data in a cluster.
... permissive. Cut down on access to your logfiles and to config files in /etc.
.. might take a while. When you forgot to & your command, use CTRL+Z then bg your job.
strings. Good to check if executables are using
vmstat. Think your system is paging, or a card is generating too many interrupts?
awk and sed. Mentioned elsewhere, but priceless.
chmod. I think the Linux filesystem permissions are too
*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
There may be more, but I can't think of any others right now...
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
man man man "Man, I give up."
You have been eaten by a Hurd of GNU.
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. :)
:q!
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
Emacs forever. </rant>
My other car is first.
nm
Like telnet? WTF... It is awkard.
... 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. :)
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
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
There are other useful tools, but I pretty much use those on every single box I touch for any reason.
What about lilo?
The days of the digital watch are numbered.
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!
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
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".
HIV Crosses Species Barrier... into Muppets
... (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
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.
Knoppix.
Join the Slashcott! Feb 10 thru Feb 17!
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.'"
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.
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.
"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.
(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].)
:q!
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
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.
After that, you can always find tools available somewhere.
I prefer the "u" in honour as it seems to be missing these days.
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.
I am a proud mc user
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 ?
so "no baby, that is just a text editor"
besides: I am installing emacs right now
just these bits could come a bit faster over my dsl 74% [5 emacs21-el 1954800/7151kB 27%] almost there
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.
Craft Beer Programming T-shirts
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.
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.
> 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.
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
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
2 absolutely must-haves: Tcpdump IPTraf I couldn't live without them
Why yes, I *AM* new here. Why?
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
1. vi
2. sh
everything else is application specific
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.
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.
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.
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.
Yeah, rm, With the options last.
/foo -rf
rm
Works fine. Yeah, it's GNU, not Unix. But if you git enter too early, you'll be glad.
don't forget bittorrent
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.
.deb of checkinstall the source would be just as nice.
:)
Unless someone knows of a
Thanks in advance
Solosoft.org - Your Online Resource to Nothing
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.
Bzflag!
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.
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
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"
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]
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
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
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!
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."
cd /proc
ps
grep
ls
mv
|
netstat
vim
bash variables
sed
They are all tools that dont take a degree to use, and complete 90% of the tasks.
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
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!
Personally, my favorite editor is jed. Key bindings of emacs, memory footprint of vi...
Yes Francis, the world has gone crazy.
- ssh (file transfers, port forwarding, encryption and remote login in one tiny tool. I even use it in place of WEP or WPA) /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.)
- 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,
- dd, cat, more, sh, etc.(where would we be without them?)
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.)
Why not CVS?
/etc of my linux boxes since 2000. It works very well. /etc and make them recoverable. /etc is compromised by crackers.
/etc is its invasive architecture.
I have used CVS for
It can manage most of your change history for
It can even help you with ``cvs diff'' when your
One annoying point of CVS for
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!
How can anyone claim to be productive without BASH COMPLETION?
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.
Who was this guy? :-)
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
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
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
This is newsworthy how? Here are my Top 10: cd ls top ssh netstat wall shutdown nmap BitchX exit
so interesting...
What I find amusing is that the gay niggers are intellectually superior to the people writing the lameness filter.
/Gay Nigger/i /GNAA/i
Hey guys...what if you just take out all the other lameness filter rules and replace it with these?
There goes your problem.
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'.