You are currently browsing the archives for the Uncategorized category.
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 [...]
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
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
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)
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 [...]
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 [...]
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