Japanese Site 
  Overview

Concept
XMLTable

Applications

Download
Requirements

Documentation

User
Developer
Benchmark

Training

MUSASHI Tutorial
Data Mining Studies
Artificial Data

Development

Bug Reports
Roadmap
CVS
Join Us

 

How to use FDclone

FDclone is a filer which can be used on UNIX. Imitating FD which is popular in MS-DOS, Takashi Shirai developed a filer, a clone of FD which can be run on UNIX OS. After many revisions, this now becomes quite something which is now compatible with Bourne Shell.

Figure 1. Screen shot of FDclone on Tera Term

Since MUSASHI is a file base system, it does not provide a file management system. Using FDclone enables a user to conduct efficient file management.

Extended features added for MUSASHI

Here we explain several features newly added for file management of MUSASHI.

FDclone reads /etc/fd2rc as setting file when started up. That file contains extended features for MUSASHI which are described as follows:

  1. Help for extended features(p)
  2. Create script sample(S)
  3. Execute script with log file creation(X)
  4. Convert xmlTable to html file(H)
  5. Upload *.html,*.txt and *.sh to www server(F)
  6. Automatic generation of a batch file for more than one script file(B)
  7. Copy by rename(^c)

An alphabet parenthesized located at the last position of the above explanation for each feature stands for binded key. By pressing the key corresponding to the alphabet on the screen of FDclone, each feature is executed.

2. Creating a script sample(S)

Data processing is done in MUSASHI in principle by describing bash script and executing it. For this purpose, a typical script sample is automatically created t the current directly as in the figure below. On pressing "S", you are asked to input a script name. When inputting a script name, you do not need to add suffix ".sh" which can be automatically added after you press "Enter". If the name already exists, an error occurs.

#/bin/bash
#===============================================================
# MUSASHI bash script
#===============================================================

#---- title
title=""

#---- comment
comment=""

   #---- definition of variables (you need to modify appropriately)
inPath="/home/hamuro/tmp"

#---------------------------------------------------------------
# command
#---------------------------------------------------------------
xtcut -f -i $inPath/dat.xt |
xtheader -l $title -c $comment -o dat.xt
#===============================================================

3. Execution of a script with log file creation(X)

  When you want to execute a script, you can use "x" prepared in the original FDclone. There are two reasons why we have developed "X"; 1) process completion message or error message output by MUSASHI are automatically written into "log" file at the current directory, and 2) We wanted to make it possible that time consuming processes want to be processed in background.
If you move the cursor to the script you want to execute and press "X", you will then be asked about whether in foreground or background you want to execute the script.
It should be noticed that the script for which "X" can be executed must have the suffix ".sh" and its execution status must be "ON". If the execution status is "ON", "*" is displayed at the right of the file name. All files created by using the above sample script have the execution status "ON", but notice that the script created in the other way may not have.

4. Conversion of xmlTable to html file (H)

  Data created by executing a MUSASHI command is normally an xmlTable (file with prefix .xt). Since an xmlTable is difficult to read as plain text file, we add the feature which converts an xmlTable into html or plainText file in order to increase the readability of the file. Moving the cursor to xmlTable file on FDclone screen, and pressing "H", the file is converted to html file. If you move the cursor to a directory instead of a file and press "H", all *.xt files under the directory are converted into html files. Exactly speaking, you can choose the format (i.e. text, html, or both) of the file you want to convert.
The file you have converted can be uploaded to www server for later use.

5. Upload of *.html, *.txt and *.sh files to www server (F)

  When you choose the file you want to upload to www server, and press "F", ftp is automatically started up. After you enter the password, the file transfer starts. If you choose a directory instead of a file, all the files under the directory are transferred. Notice that the files to be transferred are those with suffix .html, .txt, and .sh. Files with other suffixes are disregarded.

  The following is a list of cruxes to successfully use this feature.

  • There must be an account on www server which is the same as the one on the machine you use FDclone.
  • In your account on www server, you must create a directory at which you can look at www files (normally public_html) in advance.
  • In file transfer, the current path is applied to "public_html/HOSTname". Namely, supposing that user "foo" on the machine whose name is mac moves the cursor to /home/foo/Mine/data/dat.html for uploading the file, then the file is transferred to /home/foo/public_html/mac/Mine/dat/dat.html on www server. The directory on the destination machine is automatically created, and thus it is not necessary to create in beforehand.

6. Automatic generation of a batch file for more than one script file (B)

When using MUSASHI, you may often encounter the situation where you want to process a sequence of scripts as batch processing. For this purpose, we prepare the feature such that if you choose the directory containing the files for which you want to make a batch processing and press "B", a script for the batch processing can be automatically generated as the name "bat.sh" at the current directory. When you execute the batch script by pressing "X", batch processing you desired is done and the log file is output to the file "log".

7. Copy by rename (^c)

  By pressing "^c" (pressing "c" together with ctrl key), you can copy the file at the cursor by renaming it. This is useful when you want to create the same file with a different name.

Functions which are often used in FDclone

?: help
→←↓↑: shift of the cursor
PageUp, PageDown: scroll of a page
1,2,3,5: change the number columns on the screen
space: selection
+: selection of all files/no files
Enter: move to the subdirectory, look at the file content
BS: move to the parent directory
e: edit a file
c: copy a file
C:copy a file using tree-structure representation
m: move a file
d: delete a file
k: create a directory
D: delete a directory
‚”: display a directory tree
‚ˆ: start a child process     

MUSASHI publications development team related links mailing list user group