Linux
Primarily Debian based like Ubuntu
Recent Favorite Command line utils
daniel Thu, 08/25/2011 - 4:24pm
To see the top of a file:
head -n 100 filename
Count the number of lines in a file:
wc -l filename
Truncate (empty) a file:
truncate -s 0 filename
To see the directory layout in a recursive layout:
tree
- Read more about Recent Favorite Command line utils
- Log in to post comments
Managing an Apache 2 user dbm with Groovy
daniel Sat, 08/20/2011 - 12:42am
I started working on a library to edit Apache 2 Authentication files (the dbm format) with Groovy.
You can find it on github.com
Unfortunately, it requires JNI to get the job done.
On Ubuntu 10.10, this entails:
sudo apt-get install libdb4.8-java
cp /usr/share/java/libdb4.8-java-4.8.30.jar /path/to/app/using/berkeley/db
Some References:
- Old link from apacheweek, still relevant
- A nice workflow for password recovery at:kornr.net
- Working with Berkeley db cursors
- The Berkeley db java api
- More java api
- Something that gave me a clue about how to compile/use berkeley db with java
As a bonus, there is some code examples about working with Berkeley db's for Perl and Ruby in the documentation directory. Since they are not abstracted away from the os like any jvm language, their access to Berkeley db's is much simpler. Apache's tool for managing the dbm file, dbmmanage is written in Perl.
- Read more about Managing an Apache 2 user dbm with Groovy
- Log in to post comments
Copy First X lines of a file into another file
daniel Wed, 08/17/2011 - 12:36pm
- Read more about Copy First X lines of a file into another file
- Log in to post comments
Add Google Voice Notifications to Ubuntu with gvoice-notifier
daniel Fri, 08/12/2011 - 10:16am
Giving gvoice-notifier a whirl right now, looks promising.
I noticed on omgubuntu.co.uk
Wikipedia entries for Unix Commands
daniel Mon, 08/08/2011 - 9:06am
- Read more about Wikipedia entries for Unix Commands
- Log in to post comments
Nice Irssi (command line IRC) Tutorial
daniel Sun, 08/07/2011 - 10:05pm
- Read more about Nice Irssi (command line IRC) Tutorial
- Log in to post comments
Unix Links - IO Redirection, Exit Status, and more
daniel Wed, 08/03/2011 - 4:06pm
- Read more about Unix Links - IO Redirection, Exit Status, and more
- Log in to post comments
gnome-open
daniel Mon, 08/01/2011 - 10:33am
Interesting command line program of the day
gnome-open: Open a document using the default program:
Examples at embraceubuntu.com
- Read more about gnome-open
- Log in to post comments
The Bash Beginners Guide
daniel Thu, 07/21/2011 - 11:37am
- Read more about The Bash Beginners Guide
- Log in to post comments
Splunk Free on Ubuntu
daniel Wed, 07/20/2011 - 4:48pm
For the most part, Splunk is pretty easy to setup.
I had one issue with the start script not generating appropriately, so here is a copy, just put it in /etc/init.d/splunk:
#!/bin/sh
#
# /etc/init.d/splunk
# init script for Splunk.
# generated by 'splunk enable boot-start'.
#
RETVAL=0
splunk_start() {
echo Starting Splunk...
/bin/su splunk -c '/opt/splunk/bin/splunk start --no-prompt --answer-yes'
RETVAL=$?
}
splunk_stop() {
echo Stopping Splunk...
/bin/su splunk -c '/opt/splunk/bin/splunk stop'
RETVAL=$?
}
splunk_restart() {
echo Restarting Splunk...
/bin/su -c '/opt/splunk/bin/splunk restart'
RETVAL=$?
}
splunk_status() {
echo Splunk status:
/bin/su splunk -c '/opt/splunk/bin/splunk status'
RETVAL=$?
}
case "$1" in
start)
splunk_start
;;
stop)
splunk_stop
;;
restart)
splunk_restart
;;
status)
splunk_status
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
exit $RETVAL
A walkthrough on setting up splunk with grails at Lazygun.net
- Read more about Splunk Free on Ubuntu
- Log in to post comments
