A Toolbox for the X User
At first glance, the wide variety of file managers (xfilemanager, xdtm, mfm, xfm, xgroups, et. al.) that comes with every Linux distribution seems to be promising. However, almost all of these tools are either very basic, very ugly or both. TkDesk by Christian Bolik is the only exception I have encountered.
Actually, TkDesk is much more than a simple file manager (see “Introducing TkDesk” by John Blair in LJ, March 1998). By default, it even starts a separate button bar that reigns over the desktop. This obtrusive behaviour is easily turned off via the menu “TkDesk”->“Toggle Appbar”. When I started using TkDesk, it often stuck for indefinite intervals with no obvious reason. It took me some time to realize that it was trying to create sound effects not supported by my system. If this default setting causes trouble, it can be turned off in the menu “Options”<->“Use Sound”.
I use TkDesk primarily for browsing files that are buried deep in my system directory trees. This can be done very fast, since TkDesk has a built-in file browser/editor. Moreover, it displays files in three directory list boxes, making it easy to change directories back and forth. Three is the default, but you can change it to any number you wish.
Often, there is a need to check the differences between two versions of a file. You can use the shell command diff for this purpose, but the output of the graphical tools mgdiff or tkdiff is much easier to read.
mgdiff by Daniel Williams can be invoked like diff with two file names as command-line parameters. Alternatively, it allows interactive file selection from the “File”->“Open” menu; hence, it is possible to invoke mgdiff from your window manager's program menu. mgdiff displays the selected files in two boxes and shows an overview of differences in a small bar on the right (see Figure 3). Changes, insertions and deletions are highlighted in different colors, which can be customized by the corresponding X-resources in your .xresources or .xdefaults file; see mgdiff's man page for details. Moreover, you can easily merge the compared files into a new file simply by clicking on the respective versions of the differences and saving the result with the “File”->“Save As” menu.
For programmers using a version control system, tkdiff by John M. Klassa is another useful difference tool. In contrast to mgdiff, tkdiff can be invoked only from the shell prompt because it requires file names as command-line arguments. tkdiff has an internal help function but no external man page, which occasionally makes it inconvenient to get usage information. Beside these trifles, tkdiff offers the same functionality as mgdiff. Moreover, you can check a file versus different versions of that file registered in a version control system (RCS, CVS or SCCS). For example, the command tkdiff -r filename compares filename with the revision most recently checked in.
The standard data exchange format between different UNIX computers is the tape archive format (tar). Additionally, these archives are often compressed with compress (commercial UNIX systems) or gzip (Linux), resulting in tgz files. You can use the shell command tar to create, extract or list the contents of a tar file. Alternatively, xtar and tkzip provide graphical front ends to tar.
xtar by Rik Turnbull can only list and extract archives, but normally that is all you need. When you open an archive with xtar, it displays a list of all files in the archive. A double click on a file in the list starts a built-in file browser. This is very useful for new software packages, because you can read the installation instructions and README files before unpacking the archive.
If you prefer a graphical tool for creating archives, you need a more elaborate package such as TkZip by Robert Woodside. In my opinion, TkZip is too elaborate: each mouse click opens a new window, which quickly becomes confusing, and my eyes cannot get accustomed to the colored frames and buttons.
When fired up, TkZip displays a list of the files in the current directory; archive files can be opened with a double click on the respective file. As with xtar, you can browse text files by clicking on the files in the archive list. However, you must first specify a graphical viewer (e.g., xless) from the viewer list; otherwise, TkZip will write the contents of the file to standard output.
Creating archives with TkZip is a bit more involved, since it requires hopping through a suite of file selection dialogs:
From the main window, select “File”->“New Archive”.
Enter the archive type and the archive file name and choose “Create”.
Click on “Add” in the pop-up archive-list window.
Select single files for the archive by clicking on files in the next window and choose the “Add” button.
Clicking on “Close” in the archive-list window eventually writes the archive file.
Compared to the tar shell command, creating an archive with TkZip is much more intricate and can save time only in the rare situation when you want to pack several files from different ends of your file system into one archive. In the more common case, when you simply want to pack files from one or two directories, the shell command is both faster and easier to use.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
- High-Performance Networking Programming in C
- Best of Technical Support
- Running a Net Radio Station With Open-Source Software
- Introducing Enhydra
- VirtualBox: Bits and Bytes Masquerading as Machines
- Use SSH to Create an HTTP Proxy
- Using Named Pipes (FIFOs) with Bash
- Tech Tip: Really Simple HTTP Server with Python
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide