by Ron | Jul 5, 2008 | Linux, Uncategorized
nano /etc/sysconfig/network-scripts/ifcfg-eth0 Should look something like this DEVICE=eth0 BOOTPROTO=static BROADCAST=172.16.0.255 HWADDR=00:00:00:00:00:00 IPADDR=172.16.0.2 NETMASK=255.255.255.0 NETWORK=172.16.0.0 ONBOOT=yes Duplicate that and open the new file cp...
by Ron | Jul 2, 2008 | Apple, Linux
I use wget all the time on my Linux machines, but was surprised to find it missing on my MacBook Pro. Since Mac OS is based on BSD, it uses cURL instead. Here’s a good way to scrape files from a remote server. curl -O...
by Ron | Jul 1, 2008 | Linux, Uncategorized
After a few months of continuous use, I’ve found Ensim to start using too much swap space and getting sluggish. A quick restart via command line, always fixes both: /etc/init.d/epld restart
by Ron | Jun 26, 2008 | Linux, Uncategorized
It’s easy to pause a shell script during execution. Just add: sleep 10 (where 10 is the number of seconds you want the script to pause.) Some code for testing would be… #!/bin/sh before=”$(date +%s)” echo $before sleep 3 after=”$(date...
by Ron | Jun 26, 2008 | Linux, Uncategorized
find /somedir -type f -size +50000k -mtime +1095 -exec ls -lh {} \; | awk ‘{ print $6 “/” $8 ” ” $9 $10 $11 “: ” $5 }’
by Ron | Jun 23, 2008 | Linux, Uncategorized
#!/bin/sh before=”$(date +%s)” echo $before sleep 5 Ymd=”$(date ‘+%Y%m%d’)” echo $Ymd after=”$(date +%s)” echo $after elapsed_seconds=”$(expr $after – $before)” echo Elapsed time for code block:...
by Ron | Jun 20, 2008 | Linux
I occasionally get this error when trying to run a heyu command from CLI. This should fix your problem: (As root) chmod 777 /dev/ttyS0
by Ron | Jun 13, 2008 | Linux
Need to calculate a date in the future or past? $eight_days_ago = date(‘Ymd’, mktime(0,0,0,date(“m”),date(“d”)-8,date(“Y”)));
by Ron | Apr 2, 2008 | Apple
After playing with an iPhone for a few weeks, here are a few of my biggest gripes: Shorter battery life than my Blackberry Slower email composition (more steps) No keyboard shortcuts No consolidated Inbox Ergonomics: isn’t as comfortable in my hand No visual...
Recent Comments