BowerStudios.com

  • My Lab
  • Family
  • Friends
  • Professional
  • About
Home » The Lab

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

  • BSD
  • Linux
  • 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.

  • Groovy
  • Linux
  • 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

From Unix.com
shell:
# head -100 oldfile > newfile

vi:
# vi oldfile
:1,100 w newfile

  • BSD
  • Linux
  • 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

  • Linux
  • Read more about Add Google Voice Notifications to Ubuntu with gvoice-notifier
  • Log in to post comments

Wikipedia entries for Unix Commands

daniel —Mon, 08/08/2011 - 9:06am

Base Unix Commands

  • BSD
  • Linux
  • 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

On Youtube by kenherbin

  • BSD
  • Linux
  • 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

  • Input/Output Redirection in Unix
  • Unix Quick Ref
  • Unix Exit Status
  • Redirect output to syslog
  • Rotate log files with logrotate
  • BSD
  • Linux
  • 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

  • Linux
  • Read more about gnome-open
  • Log in to post comments

The Bash Beginners Guide

daniel —Thu, 07/21/2011 - 11:37am

The Bash Beginners Guide

  • BSD
  • Linux
  • 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

  • Groovy
  • Linux
  • Read more about Splunk Free on Ubuntu
  • Log in to post comments

Pages

  • « first
  • ‹ previous
  • …
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • …
  • next ›
  • last »
Subscribe to RSS - Linux

Navigation

  • Search
  • Recent content
  • Contact Me
  • Mail
  • Pass Hasher
  • Bower Studios Admin

Quotes

daniel —Mon, 02/26/2007 - 12:19pm

Never leave that till tomorrow which you can do today.

—

Benjamin Franklin

  • Log in to post comments
  • daniel's quotes

Popular content

Last viewed:

  • Batch Resize Images in Ubuntu from the command line
  • PHP Security Consortium
  • Encoding with Groovy example code
  • Fun computer stuff to do with young kids (linux)
  • Thomas A. Edison

Copyright 2022 Daniel Bower
  • My Lab
  • Family
  • Friends
  • Professional
  • About