From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,c928d118d4a4b3d X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2002-07-16 12:03:30 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsswitch.lcs.mit.edu!snoopy.risq.qc.ca!newsflash.concordia.ca!not-for-mail From: syl@alcor.concordia.ca (Sylvain Robitaille) Newsgroups: comp.unix.tru64 Subject: Re: Sysadmin favorite commands list Date: 16 Jul 2002 19:03:28 GMT Organization: Concordia University, Montreal, Canada Message-ID: References: <4bb16963.0207110159.15d78cad@posting.google.com> NNTP-Posting-Host: alcor.concordia.ca NNTP-Posting-User: syl User-Agent: slrn/0.9.5.7 (UNIX) Xref: archiver1.google.com comp.unix.tru64:8152 I wrote: >> With any Unix (or "Unix-like") system, there's really only one command >> you need to know how to use: man. Everything else you can look up. On Thu, 11 Jul 2002 22:19:30 -0500, Dave Uhring responded: > That is really not very helpful at all. I'm sorry you feel that way, but I stand by my statement. > I am just beginning to get used to Tru64 Unix and I have found it to > be quite different from other Unices and BSDs, not to mention Linux. Indeed it is, but then again, not all Linux distributions are the same either, let alone BSD vs Solaris or what have you. What you'll find, though, is that the basic components are indeed the same. > Solaris, for instance, has a totally different setup for network > configuration. Tru64's is more similar to FreeBSD. Well, I suppose it does *look* different, but ifconfig is ifconfig is ifconfig... > How do you expect a new user to figure out where the machine's IP > address is to be set without knowing the name of the file where it > is set? rcmgr(8) just does not exist in any BSD, Solaris or Linux. To tell the truth, I don't expect a "new user" to even want that information, and I do expect a sys-admin, regardless of experience with the specific OS to at least be able to take steps towards looking it up. That specific question is answered in the OS installation documentation. I wouldn't define a "good" sys-admin as someone who has memorized a handful of commands for a particular OS, but rather as someone who has demonstrated an ability to find information (among a number of other attributes, of course). My boss did write a program some years ago, called "fsr" (find string recursively), which behaves pretty much like a recursive "grep -l" (this was written before GNU grep). I use that quite extensively. If I wanted to find out in which startup script ifconfig was called, for instance, I might call "fsr /sbin/init.d ifconfig". So alright, to that end, some of my favorites include (it might be worth looking for newer versions than I have): fsr: Locally written recursive grep top: ftp://ftp.groupsys.com/pub/top/top-3.5beta9.tar.gz lsof: ftp://vic.cc.purdue.edu/pub/tools/unix/lsof/lsof_4.40_W.tar.gz perl: ftp://ftp.perl.org pt: ftp://convex.com/pub/perl/scripts/pt.shar.Z vim: ftp://ftp.vim.org/pub/editors/vim/unix/vim-5.7-src.tar.gz tcsh: ftp://tesla.ee.cornell.edu/pub/tcsh/tcsh-6.06.tar.gz Others have already mentioned top and lsof; perl is pretty much ubiquitous these days; pt is a perl script which prints a process tree. Very handy for finding parent processes in one easy step; vim is about the best text editor out there; tcsh is just a very good shell for interactive use. Other favorites (in no particular order) include Gnu's diff and patch (unified context diffs are easiest to read), Ssh, Tripwire, awk, Tcp_Wrappers, trace, procmail, and a number of locally written programs and scripts... Sample pt output: : alcor[syl] ~/tmp; pt $$ USER PID TTY TIME COMMAND root 0 ?? 23:49:12 [kernel idle] root 1 ?? 13:22.62 /sbin/init -a root 724 ?? 7:53.48 /local/bin/sshd root 32607 ?? 0:00.46 /local/bin/sshd syl 31497 ttyw0 0:00.34 -tcsh (tcsh) syl 9365 ttyw0 0:00.04 perl -wT /local/bin/pt 31497 root 4144 ttyw0 0:00.04 /usr/bin/ps axlww -- ---------------------------------------------------------------------- Sylvain Robitaille syl@alcor.concordia.ca Systems analyst Concordia University Instructional & Information Technology Montreal, Quebec, Canada ---------------------------------------------------------------------- : alcor[syl] ~; man -k configur (output trimmed for clarity...) ... ifconfig (8) - Configures or displays network interface parameters inetd.conf (4) - The default configuration file for the inetd daemon ... netconfig (8X) - Manages network configuration processes ... rcmgr, rc.config (8) - Gets and sets run-time configuration variables stored in the files /etc/rc.config and /etc/rc.config.site ... resolv.conf (4) - Resolver configuration file ... sysconfig (8) - Maintains the kernel subsystem configuration ... sysconfigtab (4) - Configurable subsystem definition database file ... (you probably get the idea...)