Finder and Hidden Files

In the land of Unix, files prefixed with a period (.) are hidden from view in most situations. When using ls, for instance, they won’t show by default. You can however use the -a parameter to see the hidden files.

OS X’s Finder, however, doesn’t have an option to show hidden files. And sometimes it’s easier to work with some files via a GUI navigation tool like Finder. So what do you do?

Use the defaults command, and issue the following at a command prompt:

    defaults write com.apple.Finder AppleShowAllFiles YES

Because it can make for quite a bit of clutter at times when seeing hidden files isn’t useful, you might want to turn this feature off. To do so, issue the same command with a NO option.

    defaults write com.apple.Finder AppleShowAllFiles YES

Once you’ve executed this command, be sure to restart Finder to have it pick up the change. To restart finder, hold down the option key, and hover over the finder in the dock. You’ll see a menu option to restart Finder.

No grammar constraints (DTD or XML schema) detected for the document

The link below explained what’s going on here. In short, Eclipse is trying to validate XML documents, and in my case, documents that Maven created to do its testing (I think.) To get rid of the warnings, turn off the check for “no grammar specified.”

The steps to disable this check are as follows:

  1. Open Eclipse’s Preferences
  2. Expand the entry “XML”
  3. Expand the sub-entry “XML Files”
  4. Now click on the “Validation” link
  5. Choose “Ignore” from the choice “Indicate when no grammar is specified”
  6. Apply this, then okay.

I learned this by following a link to StackOverflow to here.

Oracle’s sqlplus “show tables” command?

Guess who can never remember how to do the equivalent of “show tables” in Oracle’s SQL*Plus? That’s right: Me. There’s no shorthand for it. You have to use a query like this one:

    select object_name from user_objects;

The user_objects table holds more than just table names, however. So you might want to limit the results to tables. Like this:

    select object_name from user_objects where object_type = 'TABLE';

Some of the types that you my filter on are TABLE, INDEX, SEQUENCE, and FUNCTION. And yep, those are all uppercase, and you’ll have to type ’em in that way if you want it to match on most servers.

Of course, SQL*Plus is useless if you can’t connect…

Can’t connect to your Oracle database like I couldn’t all freakin’ morning? Grrr. I think what I really couldn’t connect to was my tnsnames.ora file. I still have no idea how to get that to work after all these years. But this page explains how to put the connect string on the command line. And that just plain works.

In short, instead of depending on a tnsnames.ora file, you can use a command of the form:

    sqlplus username@'(annoying connect string here)'

On Windows, use double quotes:

    sqlplus username@"(annoying connect string here)"

It’s ugly to be sure, but it gets the job done. And it fits on a single line of some hunk of documentation that you (that is to say, I) have to write, and doesn’t rely on any installation dependent tnsnames.ora file.