The intent of this document is to make a reference file for the IRF/M’s and Trustee Assignments for a given volume or volumes. In preparing to migrate from our NetWare servers to OES2 Linux I ended up using the trustee.nlm available from Novell.com. As the goal I had was to get the IRF/M’s and Trustee assignments only and then output it to an Excel Spreadsheet for backup/reference, I used egrep and then OpenOffice Calc.
The process starts by searching for and downloading the trustee.nlm zip file from Novell’s web page, which is then extracted and then the trustee.nlm is copied to the sys:\system directory. Caution should be used with this utility as it allows changes to be made to trustee assignments, as well as saving what exits..
As I had a dozen or so volumes that I needed to gather the IRF/M and Trustee assignments from, I named the file that is output as “volumename-irf-trustee.txt”, so that when I would then copy them all to one location I could easily identify which file was for which volume. Following is an example with will output the IRF/M’s, trustee assignments, and full directory paths for the volume “volumename” to the file “volumename-irf-trustee.txt” at the root of the volume “volumename”.
Load Trustee save volumename:\ volumename:\volumename-irf-trustee.txt
After I had done this for numerous volumes, I realized that with some of the txt files approaching 100 MB it would be difficult to reference the IRF/M’s and trustees, and that my need was to be able to make a good backup/reference file that would only include the IRF/M’s and trustees. I then copied the file(s) locally and used the following egrep command to extract only the lines containing either IRM or TRUSTEE and then to write them to a new file.
egrep "IRM|TRUSTEE" volumename-irf-trustee.txt > volumename-irf-trustee-b.txt
For the first several servers this worked fine. I then noticed that one of the files had IRM in one of the directory paths and that more information was in the output file than I wanted. In order to make sure that I got only the information I wanted, I used the egrep command below, which checks for content in the files on lines which begin with “IRM or “TRUSTEE (the lines in the file start with “).
egrep "^\"IRM|^\"TRUSTEE" volumename-irf-trustee.txt > volumename-irf-trustee-b.txt
The ^ in the instance above is for starting at the beginning of the line, and the \ means that the ” sign is to be included as part of the search. Many characters have special meaning and using the \ means to include the special character (one could Google “regular expressions” for more info) that follows as part of the search. So the output of the file will now just include the lines that start with “IRM or “TRUSTEE .
I included the first egrep command as a reference example to demonstrate the different results egrep would give. At this point, you will have a CSV file for each of the volumes that has the associated IRF/M’s and trustee assignments. Right click on the desired file and select Open with OpenOffice.org Calc and make sure that the Separated by Comma check box is selected and click OK. The file can now be saved as a Open Office Calc or an Excel document by clicking File>Save As> and then changing to the file type desired. The file can now be viewed/modified as desired with Excel or OpenOffice and will provide a concise view of IRF/M’s and trustee assignments.