locate

How to find good Scala libraries

This is an excerpt from the Scala Cookbook (partially modified for the internet). This is a short recipe, Recipe 14.7, “How to find good Scala libraries.”

Problem

Ruby has the RubyGems package manager, which lets developers easily distribute and manage the installation of Ruby libraries; does Scala have anything like this?

A collection of Unix/Linux find command examples

Linux/Unix FAQ: Can you share some Linux find command examples?

Sure. The Unix/Linux find command is very powerful. It can search the entire filesystem to find files and directories according to the search criteria you specify. Besides using the find command to locate files, you can also execute other Linux commands (grep, mv, rm, etc.) on the files and directories you find, which makes find extremely powerful. 

An egrep example with multiple regular expressions

Summary: How to use the Linux egrep command with multiple regular expressions (regex patterns).

As a quick note here today, I just used the Linux egrep command to perform a case-insensitive search on multiple regular expressions (regex patterns). Really, what I did was a little more complicated:

locate -i calendar | grep Users | egrep -vi 'twiki|gif|shtml|drupal-7|java|PNG'

As you can see from that command, I did this:

Linux locate command man page

This page shows the contents of the Linux locate comamnd man page. This locate command output was created on a CentOS Linux system.

You can see this same locate command man page output by entering this command on your own Linux system:

Where to save your custom AppleScript programs

I was just working on a new AppleScript program on my Mac, when I had to remember where to install my script so I could access it from the Mac menu bar.

After digging around I saw that I installed all of my original scripts in this Mac folder:

/Library/Scripts/AlsScripts

I think I did this so my scripts would appear near the top of the list of available AppleScript programs, as shown in the following figure:

Perl error: Can't locate module in @INC

From a recent email: Help, I've just run into this Perl error: "Can't locate module in @INC".

Solution: If you get a Perl error message like "Can't locate Foo.pm in @INC", this message means that the Perl module you're trying to include (like the module named Foo) can't be found in Perl's include path, which is represented by the variable named @INC.

Linux find command recipes

Thinking about my own work when using Linux and Unix systems, a lot of the work is based around files, and when you're working with files, tools like the Linux find command are very helpful. So, I've decided to put together this list of find command examples/recipes that I'll update from time to time when I use the find command in different ways.

How to find all files beneath the current directory that end with the .jsp extension:

Finding files that Spotlight is missing

I generally use Spotlight when searching my Mac for a file, but there are times it doesn't work, especially when I'm trying to find a file that contains a phrase I know. For instance, I may have a file named "Fred.txt", and it contains the phrase "foo bar", but when I open Spotlight and type in "foo bar", the file Fred.txt never shows up.

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.