Skip navigation

New file at each start ????

949 Views 39 Replies Latest reply: Jan 14, 2013 3:50 AM by Marc Victor Pierre RSS
  • roam Level 6 Level 6 (13,540 points)
    Currently Being Moderated
    Dec 27, 2012 3:03 AM (in response to Marc Victor Pierre)

    Hello Marc,

    Looking at my system I have similar numbers in

    HD/System/Library/LaunchAgents                75  and...

    HD/System/Library/LaunchDaemons            169    both of which are mostly com.apple files.

    HD/System/Library/StartupItems                0

    I think you could rule out those above locations as unremarkable.

     

    That leaves,

    HD/Library/LaunchAgents                       

    HD/Library/LaunchDaemons

    HD/Library/StartupItems

     

    and unfortunately I am not familiar with any of the files contained in them. I don't know what is causing the creation of that Library/Autosave folder. Perhaps someone can offer some techniques to track it down, but I'm sorry to be unable to go any further.

     

    regards, roam

  • Austin Kinsella1 Level 6 Level 6 (11,505 points)
    Currently Being Moderated
    Dec 27, 2012 10:48 AM (in response to roam)

    Time to set a trap for it

     

    Run Applescript Editor (which I think you will find in Applications/Utilities/Applescript Editor) and paste the script below into its window. Use File/Save as to save it with script format in Library/Scripts/Folder Action Scripts - call it AKadd. If no problems are reported, you can quit Applescript Editor.

     

    In Finder, right-click on the icon for your internal hard disk, and select Services/Folder Action Setup (which presumably will be in French, and I don't know enough technical terms ...) and then AKadd from the list of action scripts.

     

    Then, if you haven't already done so, delete the "~" folder. What should happen, when the "~" folder reappears, is that the script will run and make a list of all running processes on your machine, and write it to a file TildaLog.txt in your Documents folder. It will also beep. Then we can browse the process list to see if we have caught the culprit.

     

    I was just looking back at the folder list you gave us in your second post in this thread. I am assuming it is of your hard disk - but why are the Musiques, Livres Photos, Films and Photos folders there? I would expect them to be in your home folder.

     

     

     

    (*

    add - new item alert

     

    Modified AK Dec 2012 to watch for "~" folder

     

    This Folder Action handler is triggered whenever items are added to the attached folder.

    The script will display an alert containing the number of items added and offering the user

    the option to reveal the added items in Finder.

     

    Copyright © 2002–2007 Apple Inc.

     

    You may incorporate this Apple sample code into your program(s) without

    restriction.  This Apple sample code has been provided "AS IS" and the

    responsibility for its operation is yours.  You are not permitted to

    redistribute this Apple sample code as "Apple sample code" after having

    made changes.  If you're going to redistribute the code, we require

    that you make it clear that the code was descended from Apple sample

    code, but that you've made changes.

    *)

     

    --property dialog_timeout : 30 -- set the amount of time before dialogs auto-answer.

     

    on adding folder items to this_folder after receiving added_items

              try

                        tell application "Finder"

      --get the name of the folder

                                  set the folder_name to the name of this_folder

                        end tell

                        repeat with ThisOne in added_items

                                  if (ThisOne as text) contains "~" then

      --display dialog ThisOne as text

                                            set StuffRunning to do shell script "ps aux"

                                            set TheFile to ((path to "docs" as text) & "TildaLog.txt")

                                            set FileRef to open for access file TheFile with write permission

      write StuffRunning to FileRef

      close access FileRef

                                            beep

                                  end if

                        end repeat

      (*

                        -- find out how many new items have been placed in the folder

                        set the item_count to the number of items in the added_items

                        --create the alert string

                        set alert_message to ("Folder Actions Alert:" & return & return) as Unicode text

                        if the item_count is greater than 1 then

                                  set alert_message to alert_message & (the item_count as text) & " new items have "

                        else

                                  set alert_message to alert_message & "One new item has "

                        end if

                        set alert_message to alert_message & "been placed in folder " & «data utxt201C» & the folder_name & «data utxt201D» & "."

                        set the alert_message to (the alert_message & return & return & "Would you like to view the added items?")

     

                        display dialog the alert_message buttons {"Yes", "No"} default button 2 with icon 1 giving up after dialog_timeout

                        set the user_choice to the button returned of the result

     

                        if user_choice is "Yes" then

                                  tell application "Finder"

                                            --go to the desktop

                                            activate

                                            --open the folder

                                            open this_folder

                                            --select the items

                                            reveal the added_items

                                  end tell

                        end if

              *)

              end try

    end adding folder items to

  • Austin Kinsella1 Level 6 Level 6 (11,505 points)
    Currently Being Moderated
    Dec 27, 2012 2:19 PM (in response to Marc Victor Pierre)

    No worries.

     

    So the ~ folder is appearing as part of the start-up process? Does it only appear when you do restart?

     

    Can you confirm that ~ is at the root of the start-up disk?

  • Austin Kinsella1 Level 6 Level 6 (11,505 points)
    Currently Being Moderated
    Dec 30, 2012 7:27 AM (in response to Marc Victor Pierre)

    Marc, where are you seeing this sockets.log? There is nothing in the folder actions script to cause it to appear. You could right-click on the hard disk again and use Services/Folder Action Setup to de-select the AKadd script. I think it won't operate until after you log in, and it seems the ~ folder has already been created at that stage.

     

    I wonder if the creation of ~ is reported in the log files? Delete ~, then restart the computer. Run Console.app (it is in Applications/Utilities) and select system.log. Click anywhere in the right pane, then Command-A to select all the text, and Command-C to copy it. Run TextEdit.app (Applications) and command-V to paste the system.log's text in the TextEdit window. Save it then email the file to me (too big to paste here) (my email address is in my profile). I will see if I can find anything useful in it.

     

    Don't try reading the system.log, as many of the messages in it are scary but harmless. (Or do, if you want - it is, after all, your log file )

     

    Screen shot 2012-12-30 at 15.11.51.png

1 2 3 Previous Next

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.