stuartfrommaeystown

Q: text file gets truncated to single line saying: has been modified and will not be repaired.

I have a text file called "notes" which periodically gets truncated to 44k and the contents become a single line saying:

 

"has been modified and will not be repaired." 


When I run the file command on it I get: 


"notes: OS/2 REXX batch file text". 


I have no idea why,  and have never used an OS/2 batch file.  I'm getting tired of restoring it from backup.  Any ideas?

MacBook Pro, OS X Mavericks (10.9.5)

Posted on Jan 16, 2016 12:31 PM

Close

Q: text file gets truncated to single line saying: has been modified and will not be repaired.

  • All replies
  • Helpful answers

  • by red_menace,

    red_menace red_menace Jan 16, 2016 2:00 PM in response to stuartfrommaeystown
    Level 6 (15,526 points)
    Desktops
    Jan 16, 2016 2:00 PM in response to stuartfrommaeystown

    The file command just tries to determine the file type based on what it knows about various file formats, and is more or less a guess.  The file may have issues with permissions or whatever you are using to edit it.

  • by stuartfrommaeystown,

    stuartfrommaeystown stuartfrommaeystown Jan 16, 2016 3:35 PM in response to red_menace
    Level 1 (0 points)
    Jan 16, 2016 3:35 PM in response to red_menace

    Yes, and the file command is usually pretty accurate.  The question is why is the file getting truncated?  It's not specific to the editor because the file has been  edited with emacs (in terminal), Aquamacs, and TextWrangler.  It is possible, though not verified that it happens after doing "Repair Disk Permissions" in Disk Utility.  There doesn't seem to be anything odd about the permissions: 

     

    -rw-r--r--  1 sg  staff  925857 Jan 16 14:11 notes



  • by rccharles,

    rccharles rccharles Jan 17, 2016 2:04 PM in response to stuartfrommaeystown
    Level 6 (8,486 points)
    Classic Mac OS
    Jan 17, 2016 2:04 PM in response to stuartfrommaeystown

    Perhaps someother app is using the name notes. I'd rename the file.  Create a backup.  Try myComments.txt or notes.txt.  You could try changing the permissions to read only.  Might get some error message.