Technical Bulletin #433: Five Cool Things You Can Do With Hopper
Hopper, the graphical file management tool, can do a lot more than just transferring files. Here are a few of the additional features that Hopper has to offer.
1. Synchronize local directories with storage
Problem: You have a long-running simulation writing data to lscratcha. You would like to make periodic backups of the data rather than waiting until the simulation has completed, but you don’t want to make multiple copies of the data.
Solution: Use Hopper’s synchronize feature, which will just copy the items that have been added or changed since the last time you synchronized.
Details: Suppose you have a directory called “run1” in lscratcha that you want to back up, and a run1 directory in storage. Run Hopper (on an LC machine or on your desktop), open a window showing your run1 directory in lscratcha, open another window to storage, drag your run1 data directory and drop it on the run1 directory in storage, then choose “Synchronize this Directory” from the pop-up menu. Hopper will proceed to copy just the necessary files.
2. Automatically connect to your favorite hosts at startup
Problem: After starting Hopper you always do the same setup, such as connecting to storage and traversing to a certain directory.
Solution: Use Hopper’s Favorites feature to not only quickly jump to your favorite hosts or directories, but to automatically create connections to them when you start Hopper.
Details: To create a Favorite, just make the connection to the desired host and traverse to the desired directory. Then choose “Add Connection...” from the Favorites menu. Enter a connection name, such as “Storage:Project1,” or use the default name. Then press the Add Connection button. You will now see this connection in the Favorites menu, ready to use. If you want this connection to be made automatically when Hopper starts, choose “Manage Favorites” from the Favorites menu, select the desired connection, click the Properties button, check the Auto connect box, and finally click the Update button.
3. Search for files by name and/or content
Problem: You have a large source tree consisting of lots of files, and you occasionally need to find all occurrences of a particular string.
Solution: Use Hopper’s expert search feature, which lets you search by file name and, on Unix systems, by file content.
Details: Suppose you want to find all the occurrences in your Fortran source files of the pattern “foo.” Traverse to your top-level source directory in a Hopper window, choose “Search...” from the Ops menu, go into the Expert Search tab, enter “*.f” in the File Name Search field, enter “foo” in the File Content Search field, and press the OK butt on. Hopper displays the results in two panes. The upper pane lists the files matching your search criteria. When you select one of the file names in the upper pane, the actual matching lines from that file are displayed in the lower pane.
4. Easily compare files from different systems
Problem: You want to compare a local file with another version on a remote system or in storage.
Solution: Use Hopper’s compare feature to compare any two local or remote files, even if one or both files are in tar or htar archives.
Details: On Unix and Mac systems, Hopper has a comparison feature that is triggered by dropping one file on top of another. Behind the scenes, any necessary file transfers are performed so that the comparison can be done on the local system. By default, a graphical differencing tool like xdiff or opendiff is launched, but you can override this by setting the xdiff path preference.
5. Determine if a colleague can access one of your files
Problem: You want to share a file with a colleague and have set the permissions on the file itself. But are permissions on all of the file’s parent directories set adequately, too?
Solution: Use Hopper’s “Check Access” feature, which will examine the file and all of its parent directories to show you the users who have read, write, or execute access for the given file or directory.
Details: Select the file or directory for which you want to check access in Hopper, use the right-mouse button to bring up the operations menu (or just choose “Ops→Ops on Selected Entries” from the top menu), and choose “Check Access.” The resulting display shows the information by group in one tab and by user name in the other. If permissions are not adequate to allow the desired access, you can use Hopper to set the permissions and/or group.
For More Information
For details on Hopper’s capabilities and usage, see the Hopper man page, or visit the Hopper webpage at https://hpc.llnl.gov/software/hopper.
PDF of TB433 for download and distribution.