How to synchronize the shell view and Finder view of a directory

command linefinder

Using the shell, I opened a tar file that was full of db dumps that were compressed with bzip2. For each dump file, I (1) unzipped, (2) loaded, (3) deleted.

From the shell, the directory where I worked looks perfect. Using Finder, the directory view has frozen on what the directory looked like immediately after I untarred. None of the changes caused by ~/WorkArea/bzip2 -d *dmp.bz2 or ~/WorkArea/rm *dmp are reflected. Also, mysteriously a directory titled Disk1 is now viewable in Finder. That directory was never viewable in the shell.

Trying to move or delete any file with Finder in that directory gives a
The operation can't be completed because an unexpected error occurred (error code -1407).

How can Finder get synchronized with the work I did in the shell?

Best Answer

This is a known quirk with Finder; it's supposed to refresh automatically, but sometime it's won't. Unlike Windows, there is no refresh button nor can you press F5 to refresh the window.

There are more details and workarounds to this in the article Refreshing Finder Windows in Mac OS X. However, I find that the easiest thing is to just go up one directory and then back.

If you use Keyboard Maestro, you could create a "refresh keystroke" of sorts by mapping a key combo to something like Command Shift A and then Command [ which will take to you the Applications Folder then back to where you were.