Lots of 0kB text files in home directory

I am using a MacBook Pro with Mac OS X 10.7.2.  Last week, I had a hard drive corruption and restored my MB Pro from a Time machine backup and the Lion Startup partition.  While I was fortunate that only a days worth of data was lost, all has not been completely smooth.
1)  There are a lot of text files of 0 kB with either no name or non-sensical names beginning with a percent sign and other non-sensical characters (e.g.  %E1%DB %F6ޝo^%EF%FEۆ%83%A7wkx8) in my home directory /Users/isaac.
2) The 500 GB partition that I have been using for Time Machine to back up the internal 320 GB hard disk is now not large enough to back up the volume.  There is only one backup on the drive (the one I used to restore), but Time Machine won't complete the backup although there is 197.5 GB available.  I thought that time machine didn't make complete backups and wondered why this has become a problem after the recent re-install.
There have been some runaway processes that I can't isolate that heat up the computer (72 F) and start the fan a whirring 4400 rpm.
I don't know if these are related to previous kernel panics that would intermittenly freeze and crash my Mac (the ciscovpn agent seemed to be the process that was always the final process before the crash), but I thought I'd mention them anyway.
Are these issues foreshadowing future doom?
Your thoughts are welcome.  Thank you.
Aric

Aric Newton wrote:
2) The 500 GB partition that I have been using for Time Machine to back up the internal 320 GB hard disk is now not large enough to back up the volume.  There is only one backup on the drive (the one I used to restore), but Time Machine won't complete the backup although there is 197.5 GB available.  I thought that time machine didn't make complete backups and wondered why this has become a problem after the recent re-install.
Sounds like TM wasn't able to figure out what happened.   When you did the restore, the disk got a new UUID (Universally Unique IDentifier), that OSX uses to keep track of drives (rather than the name).  So it's treated as a different drive.   Ordinarily, when you do a restore, it leaves a "trail" so Time Machine can automatically connect the "new" drive to the old backups.  Sometimes, though, it doesn't.
You may be able to get it to "associate" the "new" disk with the backups, per #B6 in Time Machine - Troubleshooting.

Similar Messages

  • How can I Cache the data I'm reading from a collection of text files in a directory using a TreeMap?

    How can I Cache the data I'm reading from a collection of text files in a directory using a TreeMap? Currently my program reads the data from several text files in a directory and the saves that information in a text file called output.txt. I would like to cache this data in order to use it later. How can I do this using the TreeMap Class? These are the keys,values: TreeMap The data I'd like to Cache is (date from the file, time of the file, current time).
    import java.io.*;
    public class CacheData {
      public static void main(String[] args) throws IOException {
      String target_dir = "C:\\Files";
      String output = "C:\\Files\output.txt";
      File dir = new File(target_dir);
      File[] files = dir.listFiles();
      // open the Printwriter before your loop
      PrintWriter outputStream = new PrintWriter(output);
      for (File textfiles : files) {
      if (textfiles.isFile() && textfiles.getName().endsWith(".txt")) {
      BufferedReader inputStream = null;
      // close the outputstream after the loop
      outputStream.close();
      try {
      inputStream = new BufferedReader(new FileReader(textfiles));
      String line;
      while ((line = inputStream.readLine()) != null) {
      System.out.println(line);
      // Write Content
      outputStream.println(line);
      } finally {
      if (inputStream != null) {
      inputStream.close();

    How can I Cache the data I'm reading from a collection of text files in a directory using a TreeMap? Currently my program reads the data from several text files in a directory and the saves that information in a text file called output.txt. I would like to cache this data in order to use it later. How can I do this using the TreeMap Class?
    I don't understand your question.
    If you don't know how to use TreeMap why do you think a TreeMap is the correct solution for what you want to do?
    If you are just asking how to use TreeMap then there are PLENTY of tutorials on the internet and the Java API provides the methods that area available.
    TreeMap (Java Platform SE 7 )
    Are you sure you want a map and not a tree instead?
    https://docs.oracle.com/javase/tutorial/uiswing/components/tree.html

  • How can I read only text files in a directory.

    I've written a program to read files in a directory but I'd like for it to only read the text files of that directory.
    import java.io.*;
    public class Data {
      public static void main(String[] args) throws IOException {
      String target_dir = "C:\\files";
      File dir = new File(target_dir);
      File[] files = dir.listFiles();
      for (File textfiles : files) {
      if (textfiles.isFile()) {
      BufferedReader inputStream = null;
      try {
      inputStream = new BufferedReader(new FileReader(textfiles));
      String line;
      while ((line = inputStream.readLine()) != null) {
      System.out.println(line);
      } finally {
      if (inputStream != null) {
      inputStream.close();

    You have mentioned you want to read only text files.
    If you are referring to some specific set of extentions, you can filter based on that.
    ex: you want to read only .txt files, you can add an if condition as below :
              if(textfiles.getName().endsWith(".txt")) {
                  // Add your code here
    Cheers
    AJ

  • Suspicious .nyiyeverc file in home directory

    I found a hidden file called ".nyiyeverc" sitting in my home (~/) directory and I can't find any info on what it is, or if it could be something malicious or unwanted. I searched Google, as well as other search engines, and got absolutely nothing.
    I opened it with TextEdit and it appears to be a single line of text reading "awcnsawcnsawcnsawcnsawoolwascully wa". Very weird! I googled that too, but still nothing.
    It's 8 KB, listed as a UNIX executable, created 2/19/12, modified 9/26/12 (two days ago). I am perplexed!

    More than suspicious I'd say, & the fact that it isn't searchable would indicate very  sophisticated Malware.
    Installed anything lately?
    ClamXAV, free Virus scanner...
    http://www.clamxav.com/
    Free Sophos...
    http://www.sophos.com/en-us/products/free-tools/sophos-antivirus-for-mac-home-ed ition/features.aspx
    ClamXAV, free Virus scanner...
    http://www.clamxav.com/
    Free Sophos...
    http://www.sophos.com/en-us/products/free-tools/sophos-antivirus-for-mac-home-ed ition/features.aspx
    Get MacScan...
    http://www.apple.com/downloads/macosx/networking_security/macscan.html
    See these for a list of some key loggers...
    http://forums.macosxhints.com/archive/index.php/t-41204.html
    http://www.keylogger-mac.com/mac-keylogger-perfect-keylogger-for-mac-os-x.html
    http://uglypufferfish.com/2008/10/31/mac-keyloggers/

  • How to include text file in classes directory of war file.

    I have a project that uses a text file called cache.ccf (JCS configuration file) when debugging the webservices, I have to dig into the inflated war file directory and manually place the cache.ccf file in the WEB-INF/classes/ directory/
    How can i have JDeveloper wrap the file up in the war file in the WEB-INF/classes directory. both for debugging and when the war file is actually built for deployment.
    Thanks,
    Bart

    Nevermind, I figured it out using the Project Properties->Deployment and include it in the WEB-INF/classes

  • Conf file in home directory

    No idea what section to post this in, I'm using kde4.1.1 if thats got any relevance.  Something keeps creating a file called config in home directory, I keep deleting it and it keeps coming back, its annoying! I've no idea whats doing it, the file contains only
    0.0

    omg this is driving me mad... anyone any ideas? The file is created whenever I log in so god knows what prog is creating it

  • Macbinary file in home directory

    Hello, I have noted lately that there is a mac binary file in my home directory, does anyone know what is this for? I did not notice this file a month and half ago. Everything else is ok with my mac but I am very curious about this file. I tried opening it and it did nothing. Any ideas? The name of the file is profiles.bin. Although I have used Mac for a while I do not know some details associated to Unix and Mac System. Appreciate any help, thanks.

    Hi, vitoman.
    You wrote: "I googled it and did not find anything. "
    This Google search turns up a couple of threads concerning this file on forums in Germany and Italy. The "Translate this Page" links yield some rough translations, at least one of which seems to imply it may be related to installing the latest Office update.
    Another user seemed to indicate that he deleted the file but it later reappeared, implying it might be caused by a Startup or Login Item. If that's the case, ee my "Troubleshooting Startup and Login Items" FAQ for steps that might help you with this problem.
    If you speak/read German or Italian, perhaps you can get more from those Google results than the translations yielded.
    Good luck!
    Dr. Smoke
    Author: Troubleshooting Mac® OS X
    Note: The information provided in the link(s) above is freely available. However, because I own The X Lab™, a commercial Web site to which some of these links point, the Apple Discussions Terms of Use require I include the following disclosure statement with this post:
    I may receive some form of compensation, financial or otherwise, from my recommendation or link.

  • MacOS keep open file in home directory

    I don't know if I've changed anything but my Mac keeps open every files written in the HOME directory with the default editor. Any idea to modify this behavior? I'm using Mac OS X 10.6
    Thank you in advance.

    Never mind. I was able to fix it. Just delete every thing from ~/Library/Preferences (or move all files to another location and then move them back if you don't want to lose your settings).

  • Why can't create file under /home directory?

    I user solaris10, and login as root,I find I can't create any file or directory under /home directory! It say "operation not applicable" ,Why? I am puzzled it for a long time. Anyone could tell how to do it?
    Thanks

    For Solaris,
    /home is not an on-disk file system, it is a file system under the
    control of the automounter, and only the automounter can create
    directories/files in it.
    If you don't want the automounter to manage /home, then remove the
    "/home" entry from /etc/auto_master
    (and issue the command "automount -v" to force the file
    to be reread, or reboot).
    However, the typical setup for Solaris is to locate user's home directories
    in /export/home.
    Kapil Khanna

  • Sample code to read a text file from UNIX directory.

    I am using 9i Developer Suite, application server is 9.0.4. I want some help on how to read a flat file from UNIX environment. A sample code could be very helpful.
    In windows, i use this kind of code:-
    I declare an object & then write to a file using these sample staements:-
    file_handle text_io.file_type;
    filename := 'd:\ran\egs\uninvoiced.txt';
    file_handle:=text_io.fopen(filename,'w');
    text_io.put_line(file_handle, 'MOBILE NO '||'COUPON NO ' || 'DATE');
    I hope, my question is clear. Please help in solving the doubt.
    Regards.

    filename := 'd:\ran\egs\uninvoiced.txt';This is a Windows directory, so it won't work on Unix.
    For the rest of the code: see examples in the Forms Builder Online Help.

  • A strange file in home directory

    Hi
    Something is creating a strange file in my home direcotry:
    http://s2.postimg.org/drgqt0c3t/shot.png
    Can anyone tell me that? how can I track that which app is creating that file?
    And, how can I prevent creation of this file in the future?
    Regards
    Last edited by zetrotrack000 (2013-09-02 15:42:11)

    kaszak696 wrote:Does that file have any contents that would help identify it? Also, could you provide more info about your setup? What processes and services you have running etc. If you can, upload the entire output of lsof +d $HOME or lsof +D $HOME , don't remember which one is non-recursive.
    Here is the output of 'lsof +d $HOME':
    COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
    startkde 308 zetro cwd DIR 8,6 4096 14942209 /home/zetro
    startkde 308 zetro 1w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    startkde 308 zetro 2w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    kdeinit4 366 zetro cwd DIR 8,6 4096 14942209 /home/zetro
    kdeinit4 366 zetro 1w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    kdeinit4 366 zetro 2w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    klauncher 367 zetro cwd DIR 8,6 4096 14942209 /home/zetro
    klauncher 367 zetro 1w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    klauncher 367 zetro 2w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    kded4 369 zetro cwd DIR 8,6 4096 14942209 /home/zetro
    kded4 369 zetro 1w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    kded4 369 zetro 2w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    kglobalac 380 zetro cwd DIR 8,6 4096 14942209 /home/zetro
    kglobalac 380 zetro 1w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    kglobalac 380 zetro 2w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    kactivity 385 zetro cwd DIR 8,6 4096 14942209 /home/zetro
    kactivity 385 zetro 1w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    kactivity 385 zetro 2w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    kwrapper4 394 zetro cwd DIR 8,6 4096 14942209 /home/zetro
    kwrapper4 394 zetro 1w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    kwrapper4 394 zetro 2w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    ksmserver 396 zetro cwd DIR 8,6 4096 14942209 /home/zetro
    ksmserver 396 zetro 1w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    ksmserver 396 zetro 2w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    kwin 461 zetro cwd DIR 8,6 4096 14942209 /home/zetro
    kwin 461 zetro 1w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    kwin 461 zetro 2w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    knotify4 463 zetro cwd DIR 8,6 4096 14942209 /home/zetro
    knotify4 463 zetro 1w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    knotify4 463 zetro 2w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    plasma-de 468 zetro cwd DIR 8,6 4096 14942209 /home/zetro
    plasma-de 468 zetro 1w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    plasma-de 468 zetro 2w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    ksysguard 498 zetro cwd DIR 8,6 4096 14942209 /home/zetro
    kio_deskt 503 zetro cwd DIR 8,6 4096 14942209 /home/zetro
    kio_deskt 503 zetro 1w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    kio_deskt 503 zetro 2w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    kio_trash 504 zetro cwd DIR 8,6 4096 14942209 /home/zetro
    kio_trash 504 zetro 1w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    kio_trash 504 zetro 2w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    kio_file 507 zetro cwd DIR 8,6 4096 14942209 /home/zetro
    kio_file 507 zetro 1w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    kio_file 507 zetro 2w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    krunner 515 zetro cwd DIR 8,6 4096 14942209 /home/zetro
    krunner 515 zetro 1w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    krunner 515 zetro 2w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    nepomukse 517 zetro cwd DIR 8,6 4096 14942209 /home/zetro
    nepomukse 517 zetro 1w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    nepomukse 517 zetro 2w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    nepomukst 520 zetro cwd DIR 8,6 4096 14942209 /home/zetro
    nepomukst 520 zetro 1w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    nepomukst 520 zetro 2w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    thunderbi 525 zetro cwd DIR 8,6 4096 14942209 /home/zetro
    thunderbi 525 zetro 1w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    thunderbi 525 zetro 2w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    CopyAgent 528 zetro cwd DIR 8,6 4096 14942209 /home/zetro
    CopyAgent 528 zetro 1w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    CopyAgent 528 zetro 2w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    polkit-kd 537 zetro cwd DIR 8,6 4096 14942209 /home/zetro
    polkit-kd 537 zetro 1w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    polkit-kd 537 zetro 2w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    kmix 539 zetro cwd DIR 8,6 4096 14942209 /home/zetro
    kmix 539 zetro 1w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    kmix 539 zetro 2w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    konsole 541 zetro cwd DIR 8,6 4096 14942209 /home/zetro
    konsole 541 zetro 1w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    konsole 541 zetro 2w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    bash 558 zetro cwd DIR 8,6 4096 14942209 /home/zetro
    kio_trash 613 zetro cwd DIR 8,6 4096 14942209 /home/zetro
    kio_trash 613 zetro 1w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    kio_trash 613 zetro 2w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    nepomukfi 616 zetro cwd DIR 8,6 4096 14942209 /home/zetro
    nepomukfi 616 zetro 1w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    nepomukfi 616 zetro 2w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    nepomukfi 617 zetro cwd DIR 8,6 4096 14942209 /home/zetro
    nepomukfi 617 zetro 1w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    nepomukfi 617 zetro 2w REG 8,6 13974 14942277 /home/zetro/.xsession-errors
    lsof 627 zetro cwd DIR 8,6 4096 14942209 /home/zetro
    lsof 627 zetro 1w REG 8,6 0 14950316 /home/zetro/lsof_output
    lsof 628 zetro cwd DIR 8,6 4096 14942209 /home/zetro

  • Help with makin an interface for text files in a directory

    hi all..
    i m in need to help for making a GUI, that takes all the filenames from a directory, count them,
    display all their names on the GUI in form of radio buttons... for the user to choose from..
    and then their shud be some options of changin the data inside the particular file that is chosen..
    and storin it back...
    i thought to do the GUI part in applet... and other program in simple java code....
    but there is some problem in insert that code in applet...
    can anyone help tellin me .. if this task can be fully done in java itself..
    or can suggest anyother language,,,,
    i also have problem in readin the filenames from directory..
    and showin it as a option in interface????
    please help...
    thanks to all

    Hello, I'm trying to do a thing pretty much the same although more simple.
    I'm trying to list all contents of a directory, then check if the directory has a directory inside it named according to the contents of the file readed. To summarize, I'm trying to repeatedly open files and compare them.
    Here is the code I've written so far:
    package archivos;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.io.File;
    import java.util.StringTokenizer;
    class ej18 extends Frame implements ActionListener
         private TextField tf;
         private Button b;
         private TextArea ta1,ta2,ta3,ta4;
         private Label la;
         ej18()
              setLayout(new FlowLayout());
              setSize(200,200);
              setVisible(true);
              la = new Label("Escribe el nombre del directorio donde se encuentra patrones y patrones.txt:");
              tf = new TextField("",20);
              ta1 = new TextArea(15,40);
                    ta2 = new TextArea(15,40);
                    ta3 = new TextArea(15,40);
                    ta4 = new TextArea(15,40);
                    b = new Button("Comenzar");
              b.addActionListener(this);
              add(la);
              add(tf);
              add(b);
              add(ta1);
          add(ta2);
          add(ta3);
              add(ta4);
          pack();
         public void actionPerformed(ActionEvent e1)     
              String x,y;
              Button Boton;
              Boton = (Button)e1.getSource();
              int op=0;
              if(Boton==b)
                   try
                     x=tf.getText();
                   File patrones = new File(x);
                   if(patrones.exists()&&patrones.isDirectory())
                   {ta1.append("******\nDirectorio <patrones> existe\n");}
                   else{ta1.append("Directorio <patrones> no existe\n");}
                   String[] files1 = patrones.list();
                   ta1.append( "Archivos:\n" );
                   for( String file : files1 ){ta1.append( file + "\n");}
                   File textfile = new File(x,"patrones.txt");
                   if(textfile.exists()&&textfile.isFile())
                   {{ta2.append("******\nArchivo <patrones.txt> existe\nContenido:\n");
                    BufferedReader in = new BufferedReader(new FileReader(textfile));
                        String s="";
                             //tokeinzer
                       while ( s != null )
                   ta2.append(s+"\n");
                        s = in.readLine();
                             String rs=s;
                   String[] result = rs.split(",");
                             String r = result[result.length-1];
                             File textfile1 = new File(x,r);
                   if(textfile1.exists()&&textfile1.isFile())
                             {ta3.append("*****\nArchivo <"+r+"> existe\nContenido\n");
                   StringTokenizer st = new StringTokenizer(r,".");
                   String rr=st.nextToken();
                             File textdir = new File(x,rr);
                   if(textdir.exists()&&textdir.isDirectory())
                             {ta4.append("*****\nEl directorio <"+rr+"> existe\n");
                   String[] files2 = textdir.list();
                   ta4.append( "Archivos:\n" );
                   for( String file : files2 ){ta4.append( file + "\n");}
                             else{ta4.append("*****\nEl directorio <"+rr+"> no existe\n");}
                   BufferedReader in1 = new BufferedReader(new FileReader(textfile1));
                             String ss="";
                       while ( ss != null )
                          ta3.append(ss+"\n");
                          ss = in1.readLine();
                             else{ta3.append("*****\nArchivo <"+r+">  no existe\n");}
                             //!tokenizer
                        in.close();}}
                   else{{ta2.append("Archivo <patrones.txt> no existe\n");}}
                   catch (Exception e2)
                        System.err.println("File input error");
    class Intanciador_ej18
         public static void main(String ar[])
              ej18 obj = new ej18();
    }

  • Creating a text file in an oracle directory

    Hello all,
    I created a directory in oracle called sampledata (create directory sampledata as 'c:sampledata'). How do I create a new text file in that directory? That's it.
    Thanks,
    Ad

    I created a directory in oracle called sampledataYou mean you created with sys, right? I think only sys can create directories. Make sure you grant privileges to your user. So let's walk trough this:
    connect sys@orcl as sysdba;
    create or replace directory temp_directory as 'c:\temp';
    grant read, write on directory temp_directory to scott;
    connect scott@orcl;
    declare
      output_file utl_file.file_type;
    begin
        output_file := utl_file.fopen('DIR_TEMP', 'test_file.txt', 'w');
        utl_file.put_line(f, 'Testing output file');
        utl_file.fclose(output_file);
    end;
    /hth,
    gleisson henrique
    I granted priveleges to a different directory that I created. Take a look here:
    http://www.adp-gmbh.ch/ora/sql/create_directory.html
    Pretty good examples.
    Message was edited by:
    Gleisson Henrique

  • I have to give password to file changes in my home directory

    From yesterday, when I try to change files in my home directory, a dialog box pops up to ask the password.
    That happens even after make the file permission to 644. I tried to change the whole /Users/myplace permisson, but it doesn't work.
    The owner of the file is set as myself, but there might be something broken with this.
    This actually made everything not working, dropbox takes for ever to delete a file, evernote can't even start and on and on.
    I just happen to add New Person with the same user name that I use now in Sharing, but I'm not sure this is the cause of the problem.
    How can I solve this issue? How can I delete/move files in home directory without giving passwords?
    Thanks,
    smcho

    Your username is "smcho"? So your home folder is named "smcho"?
    Yeah for the System Folders "Movies", "Music", "Pictures", "Library", "Public" and "Desktop" there is an ACL, so you can't rename or delte them.
    It's just for your safety because these folders are used by the system and should be not renamed or removed!
    Additionally you made something wrong by chmodding your home folder to 644 - or as it showing here to 730!?!
    Normally the user home folder and the included folders should be at 700 and the Public folder at 755. Additionally the folders have an acl for "everyone deny delete".  so something get messed up!

  • How to store file into a directory?

    i want to save the file(text file) into the directory which i have created using File object in the codes below. how do i do it?
    public void saveString(String filename, String string)
              //declare textfile to be null
              PrintWriter textFile = null;
              String line = null;
              try {
                   // writes to write.txt
                   textFile = new PrintWriter (new FileWriter(filename,true));
                   line = string;
                   // save string in textfile
                   textFile.println(line);
                   textFile.close();
                   // create a directory (to store (output).xml file)
              File fobj = new File("Testing");
              fobj.mkdir();
              catch (IOException e) {
                   System.out.println("Error in opening file");
                   System.exit(0);
         }

    create the directory first and then create the file u want liek this
    File f = new File (fobj,filename);
    and then open the fiel to write like this
    textFile = new PrintWriter (new FileWriter(f,true));
    regards
    rohan

Maybe you are looking for