Tuesday, September 22, 2009

Interesting Unix commands

if you are looking to change/solve a problem and
have no idea what command to use (an extreme situation)

man -k whatever

might come handy

___________________________________________

A script that telnet and submits a password
ina very NON secure way

echo "password" | telnet machine

in certain situations where u r telneting dumb machines
ina local network that have default passwords that can be handy
a better but more complex approach is using "expect"

Scheduling jobs on OSX

Hello,

While MacOSX is bsd based, coming from a unix/linux background you would automatically look
for cron to schedule your jobs and maintenance scripts.

However, MacOSX adopted launchd as a replacement for many tools including

After a bad experience with cron on MacOSX in which I configured a job to run at 14
* 14 * * * * /myscript and instead of running once at 14 the script kept running and running
what definitely lead to other problems and server load averages increasing dramatically.

the trick was that I had to specify the minute of hour, so the line in crontab -e would look
0 14 * * * * /myscript, that ran the script once properly.

A more neat and Macky way to do it is using launchctl, a tool that makes things easy
is lingon by Peter Borg http://lingon.sourceforge.net/.

.... to be continued



Followers