RandomAccessFile: How do I Clear the txt file and write multiple lines of..

Hello all,
I am a 6th grade teacher and am taking a not so "Advanced Java Programming" class. Could someone please help me with the following problem.
I am having trouble with RandomAccessFile.
What I want to do is:
1. Write multiple lines of text to a file
2. Be able to delete previous entries in the file
3. It would also be nice to be able to go to a certian line of text but not manditory.
import java.io.*;
public class Logger
RandomAccessFile raf;
public Logger()
     try
          raf=new RandomAccessFile("default.txt","rw");
          raf.seek(0);
          raf.writeBytes("");
     catch(Exception e)
          e.printStackTrace();
public Logger(String fileName)
     try
          raf=new RandomAccessFile(fileName,"rw");
          raf.seek(0);
          raf.writeBytes("");
     catch(Exception e)
          e.printStackTrace();
public void writeLine(String line)
     try
          long index=0;
          raf.seek(raf.length());          
          raf.writeBytes(index+" "+line);
     catch(Exception e)
          e.printStackTrace();
public void closeFile()
     try
          raf.close();
     catch(Exception e)
          e.printStackTrace();
     }

Enjoy! The length of the code is highly attributable to the test harness/shell thingy at the end. But anyway seems to work nicely.
import java.io.*;
/** File structure is as follows. 1st four bytes (int) with number of live records. Followed by records.
<p>Records are structured as follows<ul>
<li>Alive or dead - int
<li>Length of data - int
<li>Data
</ul>*/
public class SequentialAccessStringFile{
  private static int ALIVE = 1;
  private static int DEAD = 0;
  private int numRecords, currentRecord;
  private RandomAccessFile raf;
  /** Creates a SequentialAccessStringFile from a previously created file. */
  public SequentialAccessStringFile(String filename)throws IOException{
    this(filename,false);
  /** Creates a SequentialAccessStringFile. If createnew is true then a new file is created or if it
      already exists the old one is blown away. You must call this constructor with true if you do
      not have an existing file. */
  public SequentialAccessStringFile(String filename, boolean createnew)throws IOException{
    this.raf = new RandomAccessFile(filename,"rw");
    if(createnew){
      truncate();
    this.currentRecord = 0;
    this.raf.seek(0);
    this.numRecords = raf.readInt();
  /** Truncates the file deleting all existing records. */
  public void truncate()throws IOException{
    this.numRecords = 0;
    this.currentRecord = 0;
    this.raf.setLength(0);
    this.raf.writeInt(this.numRecords);
  /** Adds the given String to the end of this file.*/
  public void addRecord(String toAdd)throws IOException{
    this.raf.seek(this.raf.length());//jump to end of file
    byte[] buff = toAdd.getBytes();// uses default encoding you may want to change this
    this.raf.writeInt(ALIVE);
    this.raf.writeInt(buff.length);
    this.raf.write(buff);
    numRecords++;
    this.raf.seek(0);
    this.raf.writeInt(this.numRecords);
    this.currentRecord = 0;   
  /** Returns the record at given index. Indexing starts at zero. */
  public String getRecord(int index)throws IOException{
    seekToRecord(index);
    int buffLength = this.raf.readInt();
    byte[] buff = new byte[buffLength];
    this.raf.readFully(buff);
    this.currentRecord++;
    return new String(buff); // again with the default charset
  /** Returns the number of records in this file. */
  public int recordCount(){
    return this.numRecords;
  /** Deletes the record at given index. This does not physically delete the file but simply marks the record as "dead" */
  public void deleteRecord(int index)throws IOException{
    seekToRecord(index);
    this.raf.seek(this.raf.getFilePointer()-4);
    this.raf.writeInt(DEAD);
    this.numRecords--;
    this.raf.seek(0);
    this.raf.writeInt(this.numRecords);
    this.currentRecord = 0;
  /** Removes dead space from file.*/
  public void optimizeFile()throws IOException{
    // excercise left for reader
  public void close()throws IOException{
    this.raf.close();
  /** Positions the file pointer just before the size attribute for the record we want to read*/
  private void seekToRecord(int index)throws IOException{
    if(index>=this.numRecords){
      throw new IOException("Record "+index+" out of range.");           
    if(index<this.currentRecord){
      this.raf.seek(4);
      currentRecord = 0;     
    int isAlive, toSkip;
    while(this.currentRecord<index){
      //skip a record
      isAlive = this.raf.readInt();
      toSkip = this.raf.readInt();
      this.raf.skipBytes(toSkip);
      if(isAlive==ALIVE){
           this.currentRecord++;
    // the next live record is the record we want
    isAlive = this.raf.readInt();
    while(isAlive==DEAD){
      toSkip = this.raf.readInt();
      this.raf.skipBytes(toSkip);
      isAlive = this.raf.readInt();     
  public static void main(String args[])throws Exception{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    System.out.println("Create a new file? y/n");
    System.out.println("(No assumes file exists)");
    System.out.print("> ");
    String command = br.readLine();
    SequentialAccessStringFile test = null;
    if(command.equalsIgnoreCase("y")){
      System.out.println("Name of file");
      System.out.print("> ");
      command = br.readLine();
      test = new SequentialAccessStringFile(command,true);     
    }else{
      System.out.println("Name of file");
      System.out.print("> ");
      command = br.readLine();
      test = new SequentialAccessStringFile(command);     
    System.out.println("File loaded. Type ? for help");
    boolean alive = true;
    while(alive){
      System.out.print("> ");
      command = br.readLine();
      boolean understood = false;
      String[] commandArgs = command.split("\\s");
      if(commandArgs.length<1){
           continue;
      if(commandArgs[0].equalsIgnoreCase("quit")){
           test.close();           
           alive = false;
           understood = true;           
      if(commandArgs[0].equalsIgnoreCase("list")){
           System.out.println("#\tValue");
           for(int i=0;i<test.recordCount();i++){
             System.out.println(i+"\t"+test.getRecord(i));
           understood = true;
      if(commandArgs[0].equalsIgnoreCase("truncate")){
           test.truncate();
           understood = true;
           System.out.println("File truncated");
      if(commandArgs[0].equalsIgnoreCase("add")){
            test.addRecord(commandArgs[1]);
            understood = true;
            System.out.println("Record added");
      if(commandArgs[0].equalsIgnoreCase("delete")){
            int toDelete = Integer.parseInt(commandArgs[1]);
            if((toDelete<0)||(toDelete>=test.recordCount())){
              System.out.println("Record "+toDelete+" does not exist");
            }else{
              test.deleteRecord(toDelete);
              System.out.println("Record deleted");
            understood = true;
      if(commandArgs[0].equals("?")){
           understood = true;
      if(!understood){
           System.out.println("'"+command+"' unrecognized");
           commandArgs[0] = "?";
      if(commandArgs[0].equals("?")){
           System.out.println("list - prints current file contents");
           System.out.println("add [data] - adds data to file");
           System.out.println("delete [record index] - deletes record from file");
           System.out.println("truncate - truncates file (deletes all record)");
           System.out.println("quit - quit this program");
           System.out.println("? - displays this help");
    System.out.println("Bye!");
}Sample output with test program
C:\>java SequentialAccessStringFile
Create a new file? y/n
(No assumes file exists)
yName of file
mystringsFile loaded. Type ? for help
add appleRecord added
add orangeRecord added
add cherryRecord added
add pineappleRecord added
list#       Value
0       apple
1       orange
2       cherry
3       pineapple
delete 5Record 5 does not exist
delete 1Record deleted
list#       Value
0       apple
1       cherry
2       pineapple
add kiwiRecord added
list#       Value
0       apple
1       cherry
2       pineapple
3       kiwi
quitBye

Similar Messages

  • I have bought a new IPad 2 and I want to give my old one to my Daughter.  How do I clear the old one and reinstall my appps to the new one?

    I have purchased a IPad2 and I want to give my old IPad to my daughter.  How do I clear the old IPad and transfer my apps and purchased item to the new IPad2?

    You can copy any purchased items that aren't already on your computer's iTunes via File > Transfer Purchases. If you want to copy everything over to the new iPad then you can back up the old iPad by right-clicking (command-clicking on a Mac) the iPad under Devices when connected to your computer's iTunes, and you can then restore that backup onto the new iPad.
    When you are happy that eveything has copied over you can log out of you account on the old iPad by tapping on your id in Settings > Store and then wipe its content via Settings > General > Reset > Erase All Content And Setings.

  • I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?

    I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?
    Attachments:
    try2.txt ‏2 KB
    read_array.vi ‏21 KB

    The problem is in the delimiters in your text file. By default, Read From Spreadsheet File.vi expects a tab delimited file. You can specify a delimiter (like a space), but Read From Spreadsheet File.vi has a problem with repeated delimiters: if you specify a single space as a delimiter and Read From Spreadsheet File.vi finds two spaces back-to-back, it stops reading that line. Your file (as I got it from your earlier post) is delimited by 4 spaces.
    Here are some of your choices to fix your problem.
    1. Change the source file to a tab delimited file. Your VI will then run as is.
    2. Change the source file to be delimited by a single space (rather than 4), then wire a string constant containing one space to the delimiter input of Read From Spreadsheet File.vi.
    3. Wire a string constant containing 4 spaces to the delimiter input of Read From Spreadsheet File.vi. Then your text file will run as is.
    Depending on where your text file comes from (see more comments below), I'd vote for choice 1: a tab delimited text file. It's the most common text output of spreadsheet programs.
    Comments for choices 1 and 2: Where does the text file come from? Is it automatically generated or manually generated? Will it be generated multiple times or just once? If it's manually generated or generated just once, you can use any text editor to change 4 spaces to a tab or to a single space. Note: if you want to change it to a tab delimited file, you can't enter a tab directly into a box in the search & replace dialog of many programs like notepad, but you can do a cut and paste. Before you start your search and replace (just in the text window of the editor), press tab. A tab character will be entered. Press Shift-LeftArrow (not Backspace) to highlight the tab character. Press Ctrl-X to cut the tab character. Start your search and replace (Ctrl-H in notepad in Windows 2000). Click into the Find What box. Enter four spaces. Click into the Replace With box. Press Ctrl-V to paste the tab character. And another thing: older versions of notepad don't have search and replace. Use any editor or word processor that does.

  • How XI will read the .txt file

    Experts,
    i AM WORKING ON A FILE BAPI synchrounous scenario.
    Sender will drop the required file on XI directory and XI will pull the file and map it with the BAPI u2013 and crate services  entries in SAP SCM. If errors are encountered during the process they are returned to the client in a report or as erroneous file.
       *I have a .txt file( tab delimitted file)  in the folowing structure
    H                       NAME                        date            ***                 data_txt                         676869*
      C             a                           b             c
      C             d                           e             f
    H                      name                           Account            brat                     abcc                             12333
      C             a                             b               c
      C             d                             e               f                          hjhdkf
    like this  multiple entries, ll be getting .
    Based on H ( indicator), Have to get the data. How will I do in XI file  adapter?  Please help me how should I design the file adapter so that It can read the .txt file.
    I have created the sender data type similarly to the structure of BAPI.
    Note; H indicates teh Header and D indicates teh sublines. Together it is called one service entry. Aagain Next 'H' indicates the strat of next service entry.
    Thanks
    Veeru

    Nutan,
      I want the flat file  data in teh following xml format
    <Records>
        <Header>
             <Item>
                    <data1>1</data1>
                    <data2>2</data2>
              </item>
       </header>
    <Header1>
             <Item>
                    <data1>1</data1>
                    <data2>2</data2>
              </item>
       </header1>
    </Records>
    Records-- o to unbounded
    Header--- 0 to 1
    header1-- 0 to 1
    Item--- 0 to unbounded
    My input .txt file ,  fields are separated by a tab. I mean its a tab delimitted file.
    The main tag Records is 0 to unbounded.
    How to do the content conversion for the  same.
    Thanks
    Veeru
    Edited by: viru srivastava on Dec 20, 2009 2:56 AM

  • How to read the data file and write into the same file without a temp table

    Hi,
    I have a requirement as below:
    We are running lockbox process for several business, but for a few businesses we have requirement where in we receive a flat file in different format other than how the transmission format is defined.
    This is a 10.7 to 11.10 migration. In 10.7 the users are using a custom table into which they are first loading the raw data and writing a pl/sql validation on that and loading it into a new flat file and then running the lockbox process.
    But in 11.10 we want to restrict using temp table how can we achieve this.
    Can we read the file first and then do validations accordingly and then write to the same file and process the lockbox.
    Any inputs are highly appreciated.
    Thanks & Regards,
    Lakshmi Kalyan Vara Prasad.

    Hello Gurus,
    Let me tell you about my requirement clearly with an example.
    Problem:
    i am receiving a dat file from bank in below format
    105A371273020563007 07030415509174REF3178503 001367423860020015E129045
    in this detail 1 record starting from 38th character to next 15 characters is merchant reference number
    REF3178503 --- REF denotes it as Sales Order
    ACC denotes it as Customer No
    INV denotes it as Transaction Number
    based on this 15 characters......my validation comes.
    If i see REF i need to pick that complete record and then fill that record with the SO details as per my system and then submit the file for lockbox processing.
    In 10.7 they created a temporary table into which they are loading the data using a control file....once the data is loaded into the temporary table then they are doing a validation and updating the record exactly as required and then creating one another file and then submitting the file for lockbox processing.
    Where as in 11.10 they want to bypass these temporary tables and writing it into a different file.
    Can this be handled by writing a pl/sql procedure ??
    My findings:
    May be i am wrong.......but i think .......if we first get the data into ar_payments_interface_all table and then do the validations and then complete the lockbox process may help.
    Any suggestions from Oracle GURUS is highly appreciated.
    Thanks & Regards,
    Lakshmi Kalyan Vara Prasad.

  • How can i read only .txt file and skip other files in Mail Sender Adapter ?

    Hi Friends ,
                       <b> I am working on scenario like , I have to read an mail attachement and send the data to R3.</b>
                        It is working fine if only the .txt file comes.
                      <b>Some times ,html files also coming along with that .txt files. That time my Mail adapter fails to read the .txt file.</b>
                       I am using PayLoadSwap Bean and MessageTransformBean to swap and send the attachment as payload .
                         <b>Michal as told to write the Adapter module to skip the files .But i am not ware of the adapter moduel . If any blogs is there for this kind of scenarios please give me the link.</b>
                           Otherwise , please tell me how to write adapter module for Mail  Sender Adapter?
                      How to download the following
                        newest patch of XI ADAPTER FRAMEWORK CORE 3.0
    from SAP Service Marketplace. Open the file with WinZip and extract the following
    SDAs:
    &#61589;&#61472;aii_af_lib.sda, aii_af_svc.sda
    &#61589;&#61472;aii_af_cpa_svc.sda
                        I have searche in servive market place .But i couldn't find that . Can you please provide me the link to download the above .
                      If any other suggestions other than this please let me know.
    Regards.,
    V.Rangarajan

    =P
    Dude, netiquette. Messages like "i need this now! Do it!" are really offensive and no one here is being payed to answer anyone's questions. We're here because we like to contribute to the community.
    Anyway, in your case, just perform some search on how you could filter the files that are attached to the message. The sample module is just an example, you'll have to implement your own. Tips would be to query the filename of the attachments (or maybe content type) and for the ones which are not text, remove them.
    Regards,
    Henrique.

  • How to recognize string in txt file and set it as variable

    Hi, 
    I have txt file and somwhere in it string starting with:
    data directory....:
    How (using batch file) find it in the text, read and set the value as a variable? I mean the string is:
    data directory....: c:\datadir
    where what I mean value is  in this case "c:\datadir". So I want batch file to read the txt file, find string starting with "data directory....:" and then set "c:\datadir" as a variable. 
    Best, mac

    It's not very intuitive to do this sort of thing in a batch file. If you have the option to use PowerShell instead, I'd highly recommend it. It's the new way for performing command-line tasks in Windows, and there's no need to struggle with the old command
    prompt anymore.
    Here are PowerShell and batch examples of doing this type of string parsing:
    # PowerShell:
    $dataDirectory = Get-Content .\test.txt |
    ForEach-Object {
    if ($_ -match '^\s*data directory\.*:\s*(.+?)\s*$')
    $matches[1]
    break
    $dataDirectory
    # Batch file:
    @echo off
    setlocal EnableDelayedExpansion
    set DATA_DIRECTORY=
    for /F "tokens=1,* delims=:" %%a in (test.txt) do (
    set PROPERTY=%%a
    set PROPERTY=!PROPERTY:~0,14!
    if /I "!PROPERTY!" equ "data directory" (
    set DATA_DIRECTORY=%%b
    :RemovingSpaces
    if "%DATA_DIRECTORY:~0,1%" neq " " goto :SpacesRemoved
    set DATA_DIRECTORY=%DATA_DIRECTORY:~1%
    goto :RemovingSpaces
    :SpacesRemoved
    echo %DATA_DIRECTORY%
    endlocal

  • How can I see the hidden file and erase it?

    I had to make a file starting "." and had to put it on my FTP client. I made it by Text Edit and Microsoft word and save it. Since it is hidden file, I can't see on my Mac but when I use the FTP client and click post, the file listing was showed up and I can check as "Show Hidden file". Then I could post the files on the FTP client. However, since I don't need it on my computer, I'd like to erase it but can't find the files. How can I find the hidden files? Thank you.

    if you know the folder then navigate to that folder. Open the Terminal application in your Utiities folder and do the following::
    Enable Finder to Show Invisible Files and Folders
    Open the Terminal application in your Utilities folder. At the prompt enter or paste the following command line then press RETURN.
    defaults write com.apple.finder AppleShowAllFiles TRUE
    To turn off the display of invisible files and folders enter or paste the following command line and press RETURN.
    defaults write com.apple.finder AppleShowAllFiles FALSE
    Alternatively you can use one of the numerous third-party utilities such as TinkerTool or ShowHideInvisibleFiles - VersionTracker or MacUpdate.

  • How can I read the bootstrap files and extract the fragment-URLs and fragment-numbers in plain text?

    How can I read the bootstrap files of any HDS Live stream and extract the fragment-URLs and fragment-numbers in plain text?
    Could it be that it is some kind of compressed format in the bootstrap? Can I uncompress it wirh  f4fpackager.exe? Could not find any download for f4fpackager.exe. I would prefere less code to do so. Is there something in Java of JavaScript, that can extract the fragment-numbers?
    Thank you!

    Doesn't sound too hard to me. Your class User (the convention says to capitalize class names) will have an ArrayList or Vector in it to represent the queue, and a method to store a Packet object into the List. An array or ArrayList or Vector will hold the 10 user objects. You will find the right user object from packet.user_id and call the method.
    Please try to write some code yourself. You won't learn anything from having someone else write it for you. Look at sample code using ArrayList and Vector, there's plenty out there. Post in the forum again if your code turns out not to behave.

  • WRT54G - How do you clear the log files?

    How does one "Clear" both the Incoming/Outgoing log files?
    Thanks.

    Turn the logs off and click save.  When it is confirmed that your settings were saved, go back into the logs and turn them back on.  Make sure you save your changes.  That should clear your log files.
    I hope that helps.

  • How do I read a txt file and keep only IP addresses based on the first 2 or 3 octets of the IP?

    Hello,
    I have a text file and each line contains random text followed by an IP address as follows.
    some text....172.30.25.30
    some text.....172.30.85.10
    some text..172.30.25.35
    some text.......172.30.85.11
    some text....172.30.15.1
    some text...172.30.15.2
    some text.......172.10.1.1
    some text...172.20.4.2
    some text..172.10.1.2
    some text.....172.20.5.1
    I'd like to create an output file which has only one entry for each unique entry in the file where either the first 2 or 3 octets are unique as follows:
    Output File
    172.30.25
    172.30.85
    172.30.15
    172.10.1
    172.20
    Any suggestions are appreciated!
    Thanks for your help! SdeDot

    Thanks mjolinor.  Works great!
    Two questions.
    1. Could you plz suggest how this could be modified so this code would read the file in or accept it from the pipeline instead of wrapping the (@' around the data?
    2. Could you plz briefly describe some of the details of the code so I can further research and understand.
    Thanks for your help.
    Thanks for your help! SdeDot
    1. It already reads in the file.  The (@' .. '@) bits are just there to create a file using your test data to demonstrate that it works.
    2.  Not user what kind of "details" you want.  There really isn't much there, and get-help on the cmdlets used should provide information on what's going on with them in that script.
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • How to pull all the txt files from an application server to oracle server

    hi
    i got some 30 txt files on java application server. i have two questions
    1) can java guys will be able to move those files to some oracle directory that will be used by create external table command.
    2) can oracle do that using a stored procedure ..but then for it i think i have to create ftppkg and ftpbdy and call and connect each time...
    which one is better and why?
    regards
    raj

    Hi,
    You can create procedure to move file from application server to oracle server.
    Code for list all files in directory
    ops$tkyte@8i> GRANT JAVAUSERPRIV to ops$tkyte
      2  /
    Grant succeeded.
    That grant must be given to the owner of the procedure..  Allows them to read
    directories.
    ops$tkyte@8i> create global temporary table DIR_LIST
      2  ( filename varchar2(255) )
      3  on commit delete rows
      4  /
    Table created.
    ops$tkyte@8i> create or replace
      2     and compile java source named "DirList"
      3  as
      4  import java.io.*;
      5  import java.sql.*;
      6 
      7  public class DirList
      8  {
      9  public static void getList(String directory)
    10                     throws SQLException
    11  {
    12      File path = new File( directory );
    13      String[] list = path.list();
    14      String element;
    15 
    16      for(int i = 0; i < list.length; i++)
    17      {
    18          element = list;
    19 #sql { INSERT INTO DIR_LIST (FILENAME)
    20 VALUES (:element) };
    21 }
    22 }
    23
    24 }
    25 /
    Java created.
    ops$tkyte@8i>
    ops$tkyte@8i> create or replace
    2 procedure get_dir_list( p_directory in varchar2 )
    3 as language java
    4 name 'DirList.getList( java.lang.String )';
    5 /
    Procedure created.
    ops$tkyte@8i>
    ops$tkyte@8i> exec get_dir_list( '/tmp' );
    PL/SQL procedure successfully completed.
    ops$tkyte@8i> select * from dir_list where rownum < 5;
    FILENAME
    data.dat
    .rpc_door
    .pcmcia
    ps_data
    http://asktom.oracle.com/pls/asktom/f?p=100:11:3597961203953876::::P11_QUESTION_ID:439619916584

  • How can we locate the property file and read from it in .js page?

    HI
    I am having an static html page where in the url is hardcoded,so i wanted to read it from a property file and which can be done by using .js files
    i wanted to know how to deal with property files in .js?
    Thankx

    I assume you know that Java and JavaScript only share a name and they are both programming languages but little else.
    You can load JavaScript in Java 6. However for questions on what the JavaScript should do I suggest you try a javascript forum.

  • How can FMS create a text file and write data into it in the Server application folders?

    Recently, I writed a programe about creating a text file and writing data into it in the server application folder. My code is as following:
               var fileObj = new File("/MyApp/test.txt");
               if( fileObj !=  null)
                      if(fileObj.open( "text", "append"))
                            fileObj.write( "                                                      ———— Chat Info Backup ————\r\n" );
                            fileObj.close( );
                            trace("Chat info backup document :" +  fileObj.name + " has been created successfully!");    
    But when I run it, FMS throw the error as following: File operation open failed  ;  TypeError: fileObj has no properties.
    Can you help me ? Thanks in advance.
    Supplement: The text file named test.txt doesn't exist before create the fileObj, an instance of File Class.

    Is MyApp the name of the application directory, or is it a child of the application directory? If myApp is the app name, just use test.txt as the path flag in the file constructor.

  • How Can I clear the hard drive and install Tiger?

    I bought a used iBook. I do not have the original discs, but I do have Tiger on DVD. Is it possible to clear the hard drive completley and put on a fresh copy of Tiger? How can I do this?

    Rolesh:
    Formatting, Partitioning Erasing a Hard Disk Drive
    • With computer shut down insert install disk in optical drive.
    • Hit Power button and immediately after chime hold down the "C" key.
    • Select language
    • Go to the Utilities menu (Tiger) Installer menu (Panther & earlier) and launch Disk Utility.
    • Select your HDD (manufacturer ID) in left side bar.
    • Select Partition tab in main panel. (You are about to create a single partition volume.)
    • Click on Options button
    • Select Apple Partition Map (PPC Macs) or GUID Partition Table (Intel Macs)
    • Click OK
    • Select number of partitions in pull-down menu above Volume diagram.
    (Note 1: One partition is normally preferable for an internal HDD.)
    • Type in name in Name field (usually Macintosh HD)
    • Select Volume Format as Mac OS Extended (Journaled)
    • Click Partition button at bottom of panel.
    • Select Erase tab
    • Select the sub-volume (indented) under Manufacturer ID (usually Macintosh HD).
    • Check to be sure your Volume Name and Volume Format are correct.
    • Click Erase button
    • Quit Disk Utility.
    Open installer and begin installation process.
    Installation Process
    (If you are still booted from the install disk skip first three steps)
    • With computer shut down insert install disk in optical drive.
    • Hit Power button and immediately after chime hold down the "C" key.
    • Select language
    • Open Installer and begin installation.
    • Select installation option
    • Choose to Customize and deselect Foreign Language Translations and Additional Printer drivers.
    Optional: Check box to install X11 (Tiger and later) BSD Subsystems (Panther & earlier).
    • Proceed with installation.
    • After installation computer will restart for setup.
    • After setup, reboot computer.
    • Go to Applications > Utilities > Disk Utility.
    • Select your HDD (manufacturer ID) in left side bar.
    • Select First Aid in main panel.
    • Click Repair Disk Permissions.
    • Connect to Internet.
    • Download and install Mac OS X 10.4.11 Combo update (PPC) (Tiger)
    Computer will restart.
    • Repair Disk Permissions as previously.
    • Go to Apple Menu > Software Update.
    • Install all updates.
    Computer may restart after updates.
    • Go to Applications > Utilities > Disk Utility.
    • Select your HDD (manufacturer ID) in left side bar.
    • Select First Aid in main panel.
    • Click Repair Disk Permissions.
    Please post back with questions, comments or update.
    Good luck.
    cornelius

Maybe you are looking for

  • How do I export a video without a heavy blue cast

    I use imovie 3. I can download and edit my movies. The finished product looks good on the computer. However, when I export, the video has a very heavy blue cast even when viewing on the computer. But, if I export as an email or web file then the colo

  • Using work managers to process WorkItems in a message driven bean

    Hi, I'm trying to get to grips with using a work manager (in 10.3) to process WorkItems concurrently, with the whole process being triggered by a JMS message. I've got everything working using the default work manager but I'm having problems switchin

  • Paste a form onto a pdf?

    I am trying to find a way to create a little interactivity to pdf documents. i scan in my records as pdfs but need to track certain peices of information for them, i tried to create a dynamic stamp but it flattens once its created meaingin i cannot e

  • 2008 Macbook Pro - need to update operating system!

    Hello Apple friends! I have a late 2008 Macbook Pro which is operating on OS X Version 10.5.8. I would like to update my computer to the most current possible operating system, and I need to know the steps I should take and software I'll need to get

  • E mail verification and password

    I have been asked by Blackberry twice to verify my e mail address and password to continue receiving e mails - is this above board and ok to proceed?