You are currently browsing the archives for the Uncategorized category.

<<'EOF'

Lately I’ve been entranced by Amazon’s EC2 and S3 systems, but it has brought up some good ideas to share here. This one came in handy when writing a shell script to automate installation of Debian in a loopback file mount, and I needed the script to write another script itself. I’ll get [...]

SVN Commit Log Message Correction

Have you ever done a commit and then realized that the message you put wasn’t quite right? It is possible to change those messages using the Subversion admin tools.
From the Subversion book: Commit Log Message Correction
Example:
[admin@svn]$ echo “Here is the new, correct log message” > newlog.txt
[admin@svn]$ svnadmin setlog myrepos newlog.txt -r 388 –bypass-hooks

How to flush your DNS cache on OS X

It’s not often that I need to do this, but I always end up looking it up.
From the command line:
sudo lookupd -flushcache
And just for fun, you can examine your resolver configuration using:
lookupd -configuration

Erase the contents of a file.

I had been using cat /dev/null > /path/to/file for a long time. Whlie reading through a friend’s shell script for creating Amazon EC2 images I found out another way of erasing the contents of a file.
> /path/to/file
That results in the open system call being called with the O_TRUNC flag.
open(“/path/to/file”, O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666)

dpkg -S

Debian and Ubuntu tip #1
You can use dpkg to figure out what package installed a file on your system. For instance, I don’t particularly like emacs so was suprised to find /etc/emacs is installed with a default Debian Etch install.
debian:~# dpkg -S /etc/emacs
dictionaries-common: /etc/emacs
To see more information about that package (to decide what to [...]

Which package does a file belong to? (RPM Style)

If you want to figure out which package a file belongs to you can use rpm to find out (On a system that uses rpm). Which package does /bin/bash belong to?

[root@host ~]# rpm -qf /bin/bash
bash-3.0-19.3

So /bin/bash belongs to bash-3.0-19.3
The -q option lets rpm know that you want to do a query of the database. The [...]

Site restructuring

Moving to a WordPress site for easier multi-user blogging/writing with comments and other such neat schtuff. You can still access the MoinMoin wiki

  • September 2010
    M T W T F S S
    « Sep    
     12345
    6789101112
    13141516171819
    20212223242526
    27282930  
  • Author

    A little something about you, the author. Nothing lengthy, just an overview.