The File Manager 

Return to Using CDE


Typing commands vs. using the File Manager

Graphic user interfaces have their place, but there are many tasks that are easier, faster or more thorough using typed commands. For example, it takes several steps to get a list of all HTML files in a directory using the file manager. At the command line, 'ls -l *.html' will accomplish this. Modify this command to 'ls -lR *.html' and you get a list of all HTML files in the current directory and in all its subdirectories. Changing permissions of files is trivial at the command line. For example, the command 'chmod a+r *' will set the permissions of all files in the current directory to be world-readable. In the File Manager, permissions must be set one file or directory at a time. Finally, suppose you wanted to move or delete all files of a given type from a directory. 'mv *.gif ..' would move all GIF files to the next directory up. 'rm *.bak' would remove all files containing the .bak extension.

The take home lesson here is that there are plenty of tasks that are far easier to do at the command line. The File Manager is a good tool for some kind of tasks, but is must be emphasized that it is a supplement for, not a replacement for, typed commands.

Views

The File Manager can be launched either from the Workspace menu, or by typing 'dtfile' at the command line. By default, a copy of the file manager is runnning at the beginning of your CDE session.

The File Manager window above contains menu bars, an iconic path, a text path,  and a viewing area. The current directory can be set by clicking on any directory in the iconic path. The Text Path allows you to type in the name of a directory that you wish to display. The file viewing area lists file information in a format similar to the output of the 'ls -l' command. Additionally, each file is accompanied by a descriptive icon. The icon accompanies ASCII text files. ASCII text files with the .ps extension are presumed to be PostScript files, and are indicated by the icon. Folders (directories) are denoted by the folder icon . Finally, executable files, such as shell scripts, are denoted by the Sun logo icon .
 
 

File tasks are performed on any files that are selected. In the example above, only peaplant.gif is highlighted, indicating selection. There are two ways of selecting multiple files. One is to click SELECT on the first file to be selected, and then click ADJUST on each additional file. Alternatively, selection can be done by dragging SELECT across several adjacent files. When several files are selected, they can all be dragged en masse to another location eg. another File Manager window.

The file window also has a menu that can be accessed by holding down the MENU button. The window above has been scrolled to display the 'public_html' . The currently-selected directory, 'peaplant.gif', is highighted. Also, the MENU button has been pushed next to the  file pealeaf.gif, showing operations that can be done on that file. For example, Put in Workspace put an icon representing this file onto the workspace.

Closing the File Manager window replaces it with an icon containing the name of the current directory:

Properties

Many aspects of the File Manager can be customized to the user's needs. Choosing View -> Set View Options will bring up the Set View Options menu:

The settings shown above correspond to the view of the file manager shown in the previous figure.

Choosing View --> Set filter options  allows you to choose the types of files to be displayed in the View window:

Launching applications and viewing files

Executable files denoted by the icon can be executed by double clicking on the icon. In the case of shell scripts, a popup window will open, asking for you to type arguments to be sent to the script. X-windows applications will be run in the background as independent client windows.

Clicking on an icon for a non-executable file will launch whatever application is associated with a particular file type, as determined by the file extension. Where files do not have a recognizeable extension, they are opened by default in the text editor. Postscript files are opened in a PostScript viewer, such as Ghostview.
 

Moving, deleting and copying files

Files can be manipulated either using the Selected menu, or by dragging and dropping. Dragging selected files from one View Window to another moves those files. Both files and folders can be dragged and dropped. Dropping files over a folder icon moves those files to the target folder. Files can be deleted by dragging and dropping onto the wastebasket icon, found on the CDE control panel.