Linux find command - reverse the meaning of a file search

Summary: How to reverse the meaning of a Linux find command.

I spent last night doing a bunch of work on my source code warehouse. At the end of the night I needed to do a search for all files in many subdirectories whose filenames did not end with "*.java". It's easy enough to find filenames that do end with "*.java", using the find command like this:

vi/vim arrow keys

vi/vim FAQ: Help, I'm on an older Unix system; what are the vi/vim arrow keys?

On older Unix systems, including HP-UX and other systems I've run across recently, you may not have access to the vim editor, and may just have access to the older vi editor. In that case the arrow keys on your keyboard may not work, and you'll have to use the "simulated" vi arrow keys on your keyboard to move up, down, left, and right. These vi arrow keys are:

Oracle's plans for Sun technologies: Java, MySQL, SPARC, Solaris, Sun Cloud, and OpenSSO

Here's a brief look at several news stories related to Oracle's purchase of Sun, along with direct links to Oracle documents detailing their plans for Sun technologies like Java and MySQL on the Oracle website.

Oracle plans for Java

Looking at various Oracle/Sun news stories, it looks like Java is safe for the time being. As one reporter at ZDNet says it, Oracle's Java strategy is 'business as usual'".

A Linux mail command tip

If you're ever working on a Unix or Linux system, and need to email a file to someone else, it may be helpful to know that you can send your email message right from the Unix command line. You don't need to hop into mutt or any other Unix or Linux mail client to email the file.

How to sort Linux ls command file output

A couple of days ago I was asked how to sort the output from the Unix and Linux ls command. Off the top of my head I knew how to sort the ls output by file modification time, and also knew how to sort ls with the Linux sort command, but I didn't realize there were other cool file sorting options available until I looked them up.

In this short tutorial I'll demonstrate the Unix/Linux ls command file sorting options I just learned.

grep reverse: how to reverse the meaning of a `grep` search


You need to reverse the meaning of a search you're performing with the grep command. For instance, you've been searching for pepperoni pizza orders like this:

grep pepperoni pizza-orders.txt

and now you need to find all orders that don't have pepperoni.


Just add the -v switch to your grep search command, like this:

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.


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).

Linux chmod - how to make a Perl script executable

Linux chmod FAQ: Can you share an example of how to make a shell script executable with the Unix/Linux chmod command?

A lot of times in the web world you're given a Perl script by someone, and they say, "Put this script on your server, make it executable, and yada yada yada." Skipping the yada-yada part, some times people gloss over the "Make this file executable" part. So, here's a quick lesson of how to use the Linux chmod command to make a Perl script (or any Unix file) executable.

Exploring the Linux locate command

The Linux locate command lets you easily find files in the filesystem. It works by maintaining a system-wide database of "all files which are publicly accessible". The database itself is updated periodically by a background process. Because of this approach it returns results much faster than the find command, which only looks for files when you tell it to. Depending on your system, the locate command may need to be configured initially, or it may be pre-configured to work out of the box.

Linux cat command examples

The Linux cat command means "concatenate and print files". Usually all I use it for is to display a file's contents, like this command that displays the contents of a file named "":