|
Handy Commands and Tips
foreach i (`ls /export/home/user`)
rm -rf ${i}/.netscape/cache/*
end
bash
for PS in `ps -fu jhyu | awk '{print $2}'` ; do kill -STOP $PS ; done
for PS in `ps -fu jhyu | awk '{print $2}'` ; do kill -9 $PS ; done
I'm sure several of you have noticed that NSI has messed around with the whois database several times over the past year. The latest change is that you can't get important info like contact information unless you use whois.networksolutions.com as your whois server. so, for example, to get Andy Davenport's phone number, I would have to use "whois -h whois.networksolutions.com hmc.edu" instead of just "whois hmc.edu" I guess this is just part of allowing competing dns registrars. Probably for any domain registered with someone other than NSI, you'd have to use that other company's whois server to get full information. Luckily, the default whois server now tells you what server has the full information.
In order to send the mail on the command line without any other intervention, cat foo | /usr/lib/sendmail recipient1 recipient2 ... To set a subject or other headers, just include the headers at the top of the file, with a blank line between the headers and the body.
change /usr/bin/lp -cto /usr/bin/lp -o duplex man -s5 signal or /usr/include/sys/signal.h use psoptions script: cat presentation.ps | psoptions slides > presentation.slides.ps use lpr to send file to cso lpr -P cso presentation.slides.ps all at one time: cat slideCurrentWarnings.ps | psoptions slides | lpr -P cso
ncpmount -s name mountpt -U guest -n -n is no passwd from command line Other useful commands: slist tksmb
tar cvf latex2html-99.2beta6.tar latex2html-99.2beta6
awk ' BEGIN { FS = " " } { print $1, $2, "\t", $6 }' retreatmealcards.txt
77 > foreach i (`find . -type f`) foreach? chmod 644 $i foreach? end 78 > foreach i ( `find . -type d` ) foreach? chmod g-s $i foreach? end groff -Tascii -man manpage.1 | less Do not change init state to S (single-user, no mounted filesystems) while logged in as anyone else but root - turing will kill your session, and pop up an infinite loop of dialog boxes that say user logins are disabled. You cannot get to console, and can't ssh in to fix it from another machine. Copyright (c) HMC Computer Science Department.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with the no Invariant Sections, with no
Front-Cover Texts, and with no Back-Cover Texts.
A copy of the license is included in the section entitled ``GNU Free Documentation License.''
HMC Computer Science Department Contact Information |