This Application Note is based on
the application note: www.ee.ualberta.ca/~elliott/ee552/studentAppNotes/2000f/misc/max2clean.
I have extended the concept of deleting useless maxplus2 files by providing
two, more user-friendlier, methods. Method
A uses a c-shell script which can easily be downloaded and implemented, and
Method B uses simple Unix commands to easily
delete files. Only a few modifications to the users local environment
files are required for both methods.
A
simple C-Shell script has been created to easily remove excess maxplus2 files in
a user-friendly manner. The script does not need to be compiled, only a
few modifications need to be made to implement the script.
Note: Currently the script will remove: *.snf *.sym *.ttf *.vho *.cnf *.fit *.mmf *.hex
*.hif *.ndb *.pin *.pof *.rpt files.
If
more files are required to be deleted, simply add them to the list in the
script, or vice-versa, remove them from the list in the file.
To
implement this method, the following procedure has been outlined:
1.
Create a bin directory
%mkdir bin
2.
Download the file to bin directory
FileClean
3.
Change the permissions on the file to make it an executable
%chmod +x FileClean
4.
Modify the local .login file to allow the path to recognize the script
file. This will allow you to execute the program from any shell.
%vi .login
Inside
the .login file add the following line:
set
path = ( $path ~/bin )
Save and exit from the file.
5.
Now you can run the script FileClean from any new shell created to remove any
excess maxplus 2 files.
This
implementation is very simple, and may be a little more flexible for the user.
Using the alias command, we can set a "macro" to run anytime we
execute the command. A simple modification is needed to the user's local
environmental file file. The following procedure is outlined:
1.
Edit the local .cshrc file
%vi .cshrc
Inside the .cshrc file add the
following line:
alias FileClean rm *.snf *.sof
*.sym *.ttf *.vho *.cnf *.acf
Save and exit from the file.
2.
In a new terminal window simply type the name of the alias to execute the command
%FileClean
This will remove all files
listed by the alias.
This
is very flexible for the user to add more files to list of files to be removed,
or vice-versa, to delete files.
www.ee.ualberta.ca/~elliott/ee552/studentAppNotes/2000f/misc/max2clean
by Julien Lamoureux
By: Satneev Bhamra