Hopper is able to open both local and remote files for viewing. Local files are viewed in situ; remote files are first transferred to the local host before being viewed. If you want to launch commands on a remote host, see the section on launching commands.
Viewing a file is as easy as double-clicking on it. Hopper has a built-in viewer which works with text, html, and various common image formats. Using preferences you can change the default viewer based on the file extension. You can also choose an alternative viewer on the fly by using the right mouse menu to invoke the built-in or other viewer. On the Mac the default viewer is the OS X "open" command, which performs the equivalent action as double-clicking on the file in a Finder window.
The built-in viewer has a limit for the size of objects it can display. This is in place to avoid out of memory situations. You can change this maximum size via the preferences. For text files larger than this maximum size, the first part of the file will be displayed. You have the option in the built-in viewer to save a local copy of the entire file.
Preferences related to viewing files are at: File->Preferences->Operations->File Viewer.
Hopper can be used to compare files using a simple drag-and-drop technique -- just drop one file you wish to compare onto the file you want to compare it against. Hopper will automatically perform any necessary file transfers in order to get both files onto the local host where the comparison is performed.
Hopper supports both external differencing tools and a built-in one. On Unix-based systems the default is to use xdiff if available, or diff otherwise. You can specify an alternate external diff tool via the "Path to xdiff" preference at File->Preferences->General->Paths of Executables. If you prefer to use the built-in differencing option instead, this can be set at File->Preferences->Operations->File Comparison. For Windows systems the built-in differencing option is the default as it can run anywhere.
The built-in differencing tool is an Open Source tool called JMeld, which is based on the Meld tool available in many Linux distributions. JMeld supports basic comparisons and document merging. Use the small arrows in the center column between the two file listings to choose one diff over another. Merged files can be saved using the Save icon next to the file names. Once in JMeld, you can perform other diffs, including comparing two local directory structures.
JMeld supplies a variety of keyboard-based operations as well. You can review these via JMeld's Help menu. As improvements to JMeld are made they will be incorporated into future versions of Hopper.
Getting File Info
Details about an individual entry are available via Hopper's Get Info command. First select the item of interest, then choose Get Info from either the right mouse menu or the main Ops->Ops on Selected Entries menu. This is perhaps most useful when your directory window is in Iconic format and you want to see the size, permissions, or other attributes of a given file or directory.
Commands can be launched on local or remote Unix systems using Hopper's Launch Command feature. This can be a useful way to extend Hopper's capabilities, as it makes it convenient to e.g., launch an editor, perform an svn operation, or run lpr to print a file. When you connect to remote hosts through Hopper's ssh option, you can launch the same commands on remote hosts. This makes it easy to edit a remote file without opening a separate terminal window to that remote system.
Launch commands are defined at File->Preferences->Operations->Launch Commands.
Launching Xterm Windows
When you want to do things on a local or remote Unix host outside of Hopper, the Launch Xterm capability is useful. Pressing the Xterm button ( ) in Hopper's toolbar will open an xterm window connected to the given host, and automatically positioned in the same directory as you are viewing in Hopper. Preferences are set at File->Preferences->Operations->Launch Xterm.
The Change Permissions operation is available via the right-mouse menu and the Ops->Operations on Selected Entries menu. By default the control panel in the Change Permissions dialog is very simple:
If you find that the default is too limited, check out the options in File->Preferences->Operations->Change Permissions—you can choose which features are available via the dialog. Typical settings for a power-user would be to check the "Smart X", "Same As", and "Recursive" boxes, which results in this:
Check the Operation checkbox in the preferences to see the full range of all of the dialog's options:
Smart X performs the same function as the upper-case X bit in the Unix chmod command. That is, Smart X will add the "x" (execute) bit if the given item is either a directory or is a file that already has the "x" bit set for some user. An example helps explain how this is useful. Say you have a deep directory structure containing text files at various levels. The tree currently is accessible only to you, but you'd like to make the tree available for your work group. You could recursively change the permissions for the entire tree to add group read and execute bits, which are required to allow people to traverse the directory structure. That incorrectly would mark all of the text files as executable too, though, so you'd need to go back and remove the group execute bit on all of the files. Using the Smart X option you could do this in one step -- it would set the execute bit only where it is appropriate to do so. Smart X is indicated in the dialog as an upper case X.
The Change Permissions operation is available via the right-mouse menu and the Ops->Operations on Selected Entries menu. Note that this is just another tab on the Change Permissions/Owner/Group dialog:
To change the group just type in the name of the desired group and press the OK button. Note that previous owner/group values you've entered are remembered between sessions, so you can also select from the pop-up menus as shown above.
A unique feature in Hopper is the ability to check the access of a file or directory. This operation takes into account the permissions of the item itself, as well as all of its parent directories. The result of the operation is a list of all users with read, write, and execute permission on the given item. This is a good way to confirm that you haven't overlooked the changing of directory permissions when trying to give a colleague access to a file. Or to make sure that your file can only be read by those people you want.
The initial view gives a description of who has access:
The Users tab in this dialog lists the actual user names in the three categories. Note that this information may not always be available.
To delete items in Hopper, first select the item(s) and then click on the Trashcan icon in the toolbar () By default you will be requested to confirm the deletion operation. You can disable the confirmation via File->Preferences->General->Operation Confirmation.
Note that the delete operation in Hopper is recursive. If you delete a directory its contents will also be deleted.
In the special case of working with LLNL HPSS, Hopper's delete operation will simply move the requested items into a directory called ~/.HopperTrashCan in your storage home directory. This is done to allow undoing of unintended deletions, as well as to speed up the otherwise slow delete operation. You can empty the .HopperTrashCan directory by using Hopper's delete operation on it.
To create a new directory, just click on the New Folder icon (. In the resulting dialog type in the name of the directory you wish to create.
Files can be renamed in a couple of ways. The simplest is to select the item to be renamed and press Return. This puts Hopper into rename mode whereby you can edit the name. Alternatively, you can select the Rename operation from the right-mouse menu or the Ops->Ops on Selected Entries menu.
Creating Symbolic Links
Creating symlinks via Hopper is done by highlighting an item and then selecting the "Make Symbolic Link" option in the right-mouse menu or the Ops->Ops on Selected Entries menu. The resulting dialog lets you set the link and target names: