Editing files
There are a number of options for editing files at TACC. These fall into three categories:
- Linux text editors installed at TACC (nano, vi, emacs). These run in your terminal window. vi and emacs are extremely powerful but also quite complex, so nano may be the best choice as a first local text editor.
- Text editors or IDEs that run on your local computer but have an SFTP (secure FTP) interface that lets you connect to a remote computer (Notepad++ or Komodo Edit). Once you connect to the remote host, you can navigate its directory structure and edit files. When you open a file, its contents are brought over the network into the text editor's edit window, then saved back when you save the file.
- Software that will allow you to mount your home directory on TACC as if it were a normal disk (MacFuse/MacFusion). Then, you can use any text editor to open files and copy them to your computer with the usual drag-drop.
We'll go over nano together in class, but you may find these other options more useful for your day-to-day work.
MacFuse/MacFusion/TextWrangler for Mac
Want your Lonestar files to appear like any other place on your hard drive? You can do this using MacFuse/MacFusion on a Mac. Want to edit files on TACC without having to use nano? You might want to use TextWrangler, a text editor that can edit files over ssh.
Connecting to TACC Like a Hard Drive: MacFuse/MacFusion
Here are the steps for an installation:
- Download and install FUSE for OS X.
- Check the option to install the "compatibility layer"
- Download MacFusion.
- Move the app that gets downloaded to your Applications folder
- Restart your computer.
- Open the MacFusion application.
- Click the + menu in the window and select SSHFS. Enter your login information for lonestar. Choose connect. The remote file system will appear in Finder (depending on your settings it may be on the desktop or inside the computer shortcut in the side of a Finder window). You can also click on the mounted volume within MacFusion and choose "Reveal" from the gear menu.
In order to make navigating to the different file systems on lonestar easier ($SCRATCH and $WORK), you can set up some shortcuts with these commands that create folders that "link" to those locations. (Run the commands when logged into Lonestar with a terminal, from your home directory).
ln -s $SCRATCH scratch ln -s $WORK work
Editing Text Files on TACC: TextWrangler
TextWrangler is a recommended FreeWare text editor for MacOS X. (It even keeps with the theme TACC has going with naming its clusters!) You can use it to directly edit text files on Lonestar with OSXFuse/MacFusion using a nice GUI. It is a much more powerful text editor than TextEdit, and won't trip you up by wrapping lines etc., if you learn to use it.
Even if you cannot install OSXFuse/MacFusion, TextWrangler allows you to edit a remote file via SSH. To do this:
- Select *File > Open from FTP/SFTP Server...
- Type
lonestar.tacc.utexas.edu, your username, and your password into the appropriate boxes. - Check the You need to check the SFTP box.
- Click connect.
- You will now have a file browser window. You can create new files and edit existing files on lonsetar, but won't be able to drag-and-drop copy files.
Tip: Files beginning in a dot (.) like (.profile_user) are "hidden" and won't show up when you are navigating in Finder (if using OSXFuse/MacFusion). There is a way to turn on showing these files in finder, but it can get annoying because they will show up everywhere. If you use the TextWrangler "open" command to open a file, there is a box that you can check to show these files.
Copying Files To and From TACC: SFTP Clients
If you can't get OSXFuse/MacFusion to work, you can still copy files back and forth between your computer and TACC using a secure FTP (SFTP) client. Some examples of free programs for Mac are:
Now let's wrap up this brief linux tutorial.