Skip to Content

Delete a Large Number of Files with Find

If you ever come across a directory full of so many files, you can't run an ls on it, here is how to delete a bunch of them, using find.

I recently had to delete all the gzipped files in /var/log because something was misconfigured and things went crazy.

find /var/log/ -iname "*.gz" -exec rm {} \;

Pitchfork Saturday Preview

Cymbals Eat Guitars 1:00 (A)

I really like the album "Why There Are Mountains", especially "Share". Looking forward to starting out Saturday watching this band.

Pitchfork Friday Preview

Pitchfork Music Festival is coming up next week. A lot of great bands are playing should be cool to see.

My Friday Schedule

5:00 Tortoise, 6:10 Yo La Tengo, 7:20 The Jesus Lizard, 8:40 Built To Spill

Tortoise 5:00

Batch thumbnail creation with ImageMagick

command to create thumbnails from all jpg files in a directory:

find *.jpg -maxdepth 0 -print -exec convert "{}" -resize 120x160 "thumbnails/{}" \;

How To Run Multiple IIS WebSites on Windows XP

IIS in Windows XP will not let you create more than one web site.

To get around that you can use a commandline tool to copy the default site.
Run the following from a DOS prompt:

> cd c:\Inetpub\AdminScripts
> cscript adsutil.vbs COPY W3SVC/1 W3SVC/2

Now you can modify the copy as you want. The catch is that only one site can be running at a time, so you'll need to stop one, and start the other to switch sites. This works fine for development purposes though.

I found this info here: http://www.bobshowto.com/iis_servers.htm

Find/Replace across multiple files with Vim

Here is a quick way to find an replace one string with another across multiple files using vim.
Open all the files:
vim file1.txt file2.txt file3.txt
Run this command:
argdo %s/original string/replacement string/gc | wn

This can be very useful, say if you have a static html site, and need to replace an old email address with a new one across all the pages.

Gentoo: equery and USE flags

Running:
equery depends jdk

Returns:

dev-lang/swig-1.3.31 (java? virtual/jdk)
media-libs/pdflib-7.0.2_p8 (java? >=virtual/jdk-1.4)

However, "-java" is set for pdflib:

emerge -pv pdflib

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild R ] media-libs/pdflib-7.0.2_p8 USE="perl python -cxx -doc -java -tcl" 0 kB

"java?" appears to mean that it depends on it IF the java USE flag is set. I couldn't find this documented anywhere, so I'm documenting it here.

New Job

I recently got a new job. I started working at Real Network Solutions, realnets.com, in Park Ridge, IL. It's going very well so far, and the commute is much nicer than driving out to Libertyville.

Vote

To everyone in Illinois, today is the day to vote. (I voted 2 weeks ago, in early voting)

Have a good day.

Rose Bowl Trip

I recently got the chance to go to Pasadena, CA to watch the Fighting Illini play in the Rose Bowl. The trip was a lot of fun, despite the outcome of the game. I will be posting some pictures shortly.

Syndicate content