cygwin

A Unix shell script to rename many files at one time

Summary: A Unix/Linux shell script that can be used to rename multiple files (many files) with one shell script command.

Problem

You're on a Mac OS X, Unix, or Linux system, and you'd like to be able to rename a large number of files at once. In particular, you'd like to be able to change the extensions of a large number of files, such as from *.JPG to *.jpg (changing the case of each file extension from upper case to lower case).

Cygwin and crontab - How to get crontab started running when using Cygwin

Cygwin crontab FAQ: How do I get the crontab system started when using Cygwin?

I can't remember where I found it, but using this series of commands from the Cygwin prompt got the Cygwin crontab system enabled for me. First this command:

cygrunsrv -I cron -p /usr/sbin/cron -a -D

followed by:

net start cron

I haven't used this cygwin feature before, so it feels weird knowing that crontab is running on my Windows system under cygwin.

Using the Linux ‘find’ command with multiple filename patterns

Someone asked me the other day how they could search for files with different names with one Linux find command. They wanted to create a list of all files that ended with the extensions .class and .sh.

Although this is actually very easy to do with the find command, the syntax is obscure and probably not well documented, so let's look at how to do this.

My Linux/Cygwin command prompt

As each day passes I use Cygwin more and more. One of the things I like to do on Unix platforms is to control what my command prompt looks like. On Cygwin, I edited my .bash_profile to include a multi-line entry like this:

PS1='
$PWD
yo: '

This may look bizarre, but I like the results. It makes my command line prompt look like this:

Linux backups: Using find, xargs, and tar to create a huge archive

I did something wrong in a previous blog entry that led me to use the "pax" command to create a large backup/archive. There's nothing wrong with using the pax command -- other than the fact that it's not available for Cygwin -- and I really needed to created a huge archive. (I know that pax is available for our Linux and Unix systems, but I can't find a version for Cygwin.)

Glimpse and Cygwin - how to install Glimpse under Cygwin on Windows

Over the weekend I downloaded and installed the Glimpse search utility on my Windows laptop. Actually, what I'm doing is running glimpse under Cygwin. Because glimpse is generally just available as a source code distribution, I looked around and found a reference to a user who installed it under Cygwin. With that as my encouragement, I downloaded the glimpse source code and had at it.