Finding out that an open file has changed

Hi. I'm working on a java app to monitor a log file. Unfortunately, when the log file rotation occurs (by moving the file to "log.1" and creating a new "log") I can't figure out how to determine that from my app; the code just goes it's merry way. When the file is renamed, the open file in the java app continues to have access to the original file (under the new name) and if I add lines to the "log.1" file, the java app continues to read them.
This is on JDK 1.4.0 for Linux, and I'm using a RandomAccessFile object.
Any ideas? Other than (wastefully) opening a new File everytime through the monitor loop I can't think of a clean solution.
mike ([email protected])

use getLastModified date

Similar Messages

  • I have a file it has a Hold - There are a number of holds in the hold list how do i find out which one this file has

    Hi
    I have a file which has a Hold.
    However, It could be one of a number of Holds as defined by the Holds list. How do I (ideally in PowerShell) find out which hold is being used to hold the file and how can I remove that Hold from the file so I can change it and re-apply the hold ?
    Thanks
    Nigel
    Nigel Price NJPEnterprises

    Hi,
    According to your post, my understanding is that you want to remove Hold from the file.
    If an item has been added to more than one hold, you can view the list of holds that pertain to that by using the Compliance Details command.
    Open the list or library that contains the item for which you want to view the hold information.
    Point to the item that you want, click the arrow that appears, and then click Compliance Details.
    On the Compliance Details dialog, click Add/Remove from hold.
    On the Hold Status page, click the arrow under the Remove from hold option to view a list of holds the item is associated with.
    You can use the Compliance Details command to remove an individual item from a hold.
    Open the list or library that contains the item that you want to remove from a hold.
    Point to the item that you want, click the arrow that appears, and then click Compliance Details.
    In the Hold Status section, click Add/Remove from a hold.
    On the Item Hold Status page, select the Remove from hold option and then select the hold from which you want to release the item.
    Click Save.
    For more information, you can refer to:
    Create a hold to suspend documents or items
    Thanks,
    Linda Li                
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Linda Li
    TechNet Community Support

  • How do I find out if a class file has deprecated functions

    Currently I'm having problems with a old Visual Cafe class.
    It is definately using deprecated awt funcions.
    My question is..
    1) Without the source code how do I find out what deprecated functions the CLASS file is using.
    2) Has any deprecated class been truly scrapped ? If so, I cannot find
    it in the JDK API documentation or the java.sun.com search engine..

    Here is what I did, to answer your question. I unzipped the symantec jar and used a decompiler (JAD works fine, or cavaj) to create an entire src tree (you can do this with 1 command). Then, compile using your target version of Java. There are well over 100 warnings (with -deprecation on) ranging from Cafe's use of awt.Component methods (mostly), Thread.suspend in their Timer class, to the use of java.util.Date in their Calendar component.
    Cheers!

  • How to find out that an art item has spot color using script?

    Hi all,
    I have a number of art items on a document, some of them are filled with spot colors and some of them are with process color.
    Is there any method by which I can find out which color type(spot or process) is applied to the selected art item?
    Thanx in advance...

    Thanx for the reply carlos....
    But I am not able to use "icolor.typename". There is nothing like "typename" showing in the properties.
    I am using it like this:
    var app:com.adobe.illustrator.Application = Illustrator.app;
                                            var pathArt:PathItem;
                                            var allPaths:PathItems           = doc.pathItems;
                                            if ( app.documents.length > 0 && doc.pathItems.length > 0)
                                                           var colorValue:com.adobe.illustrator.Color;
                                                           //Fill color to the selected object.
                                                           for (var i:int = 0; i < doc.pathItems.length ; ++i)
                                                                          pathArt = allPaths.index(i);
                                                                          if(pathArt.selected)
                                                                                         colorValue = pathArt.fillColor;
                                                                                         trace(colorValue.typename);              //But colorValue doesn't show any property like "typename".
    Do am i missing some thing?
    Thanks...

  • How can i completely delete a file that i already deleted. i downloaded an app in the apple store and after deciding for quite some time i decided to delete the file from my phone. and find out that the download file is still there and cant delete it.

    guys hele me please..

    If you would like to contact one of the UK based BT Care Team who moderate this forum, they should be able to help you.
    They can be contacted using this link BT Care Team
    They normally respond by phone or e-mail, within three working days, however you should get an immediate confirmation, with a tracking number.
    There are some useful help pages here, for BT Broadband customers only, on my personal website.
    BT Broadband customers - help with broadband, WiFi, networking, e-mail and phones.

  • Has any body tried using canon printer driver with Mac OS X v10.7. I just bought a new printer only finding out that I cannot use it. Any suggestions. Thanks

    I just bought a canon pixma iX6540 printer only to find out that the driver is not supported. I am using Mac OS X v10.7. Can someone help please. Thanks

    Although it mentions OS 10.6 on the link, have you tried downloading the latest drivers - if you haven't already - from the Apple Support site, maybe they'll work:
    http://support.apple.com/kb/DL899

  • Finder smart folder:  "Search for:Today" has changed

    I noticed today that the smart folder has changed and now only seems to be showing applications and not files also.
    I'm not sure what changed it initially, but to try to "fix" it, I went to the finder toolbar and selected "Action>Show Search Criteria". What should the default settings be for this folder as installed by Mac OSX Leopard?

    The default criteria for Today and Yesterday, Apple's canned searches, are "Last Opened date is today" or "yesterday" plus "None of the following are true---Kind is Folders." If your are correct and aren't returning what you want, construct your own search that does what you want, then save it as a misnamed "Smart Folder"--be sure to check the box in the Save dialog to have it appear in the Sidebar.
    Francine
    Francine
    Schwieder

  • Finder beeps when I open files

    All of a sudden today, the Finder beeps when I open files from one of my external Firewire drives. Only one drive is affected. It doesn't matter what kind of document it is. The files seem to open okay, but the Finder beeps, as if there is a problem, when I open any of them. I've tried dismounting and re-mounting the drive, but it makes no difference. I've also tried re-starting the Finder, but that didn't change anything either.

    Could be Finder prefs.
    Navigate to ~(yourhome)/library/preferences and trash these two files:
    com.apple.finder.plist
    com.apple.sidebarlists.plist
    Then log out and back in again. Or restart.
    (You will have to reset a few finder prefs the way you like them.)
    Let us know.
    -mj
    [email protected]

  • Hello everyone i have macbook air, hello everyone i have macbook air and my startup disc is full i checked everything and and find out that all space is of OTHER and i dont know what is it and what i have to do with that

    hello everyone i have macbook air, hello everyone i have macbook air and my startup disc is full i checked everything and and find out that all space is of OTHER and i dont know what is it and what i have to do with that

    First, empty the Trash if you haven't already done so. Then reboot. That will temporarily free up some space.
    According to Apple documentation, you need at least 9 GB of available space on the startup volume (as shown in the Finder Info window) for normal operation. You also need enough space left over to allow for growth of your data. There is little or no performance advantage to having more available space than the minimum Apple recommends. Available storage space that you'll never use is wasted space.
    If you're using Time Machine to back up a portable Mac, some of the available space will be used to make local snapshots, which are backup copies of files you've recently deleted. The space occupied by local snapshots is reported as available by the Finder, and should be considered as such. In the Storage display of System Information, local snapshots are shown as "Backups." The snapshots are automatically deleted when they expire or when free space falls below a certain level. You ordinarily don't need to, and should not, delete local snapshots yourself.
    To locate large files, you can use Spotlight. That method may not find large folders that contain a lot of small files.
    You can more effectively use a tool such as OmniDiskSweeper (ODS) to explore your volume and find out what's taking up the space. You can also delete files with it, but don't do that unless you're sure that you know what you're deleting and that all data is safely backed up. That means you have multiple backups, not just one.
    Deleting files inside an iPhoto or Aperture library will corrupt the library. Any changes to a photo library must be made from within the application that created it. The same goes for Mail files.
    Proceed further only if the problem isn't solved by the above steps.
    ODS can't see the whole filesystem when you run it just by double-clicking; it only sees files that you have permission to read. To see everything, you have to run it as root.
    Back up all data now.
    Install ODS in the Applications folder as usual. Quit it if it's running.
    Triple-click the line of text below to select it, then copy the selected text to the Clipboard (command-C):sudo /Applications/OmniDiskSweeper.app/Contents/MacOS/OmniDiskSweeper
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The application window will open, eventually showing all files in all folders. It may take some minutes for ODS to list all the files.
    I don't recommend that you make a habit of doing this. Don't delete anything while running ODS as root. If something needs to be deleted, make sure you know what it is and how it got there, and then delete it by other, safer, means. When in doubt, leave it alone or ask for guidance.
    When you're done with ODS, quit it and also quit Terminal.

  • Using migration assistant I transferred my complete MacBookPro to my nex iMac. Now I find out that all jampacks are missing in GarageBand. Can anyone advise? Thanks!

    Using migration assistant I transferred my complete MacBookPro to my nex iMac. Now I find out that all jampacks are missing in GarageBand. Can anyone advise? Thanks!

    I would think the migration assistant transfers 100% of all contents...
    When you are setting up a new Mac you can use Setup assistant the moment you boot the mac the first time. Setup Assistant will usually transfer everything. If you miss tha t moment and later launch Migration Assistant some library files will not be transferred. Migration assistant will not transfer system files, only User Files and Application files. I think, that is why your files are missing.
    so could you please tell how this copying is done?
    Best take an external drive with plenty of free disk space and plug it into your MacBook Pro.
    Open the System drive, your Macintosh HD in the Finder and open the folder "Library", then "Application Support", then "GarageBand". Copy the folder
    /Library/Application Support/GarageBand/Instrument Library/  to your external drive by dragging it there.
    Then open again the folder "Library" on your Macintosh HD, and this time open the folder "Audio" inside. Copy the folder
    /Library/Audio/Apple Loops/
    to your externall drive. Eject the drive and plug it into your iMac.
    Now compare the AppleLoops folders and instrument library folders and copy all missing items over to the corresponding folders in the iMac's Library.
    Afterwards you need to reindex the loops, by dragging any loop you newly installed onto the Loop Browser in garageband, see: Rebuilding the Loop Index in GarageBand

  • Could not find application that created this file error in Acrobat

    What is going on? I have an InDesign file that I want to convert by opening Acrobat and then converting to PDF. I am getting the error "Could not find application that created this file. [file name] Please select a file created by an application that resides on your computer."
    I most often use this functionality when I have multiple files of different origins and need to combine them into one document. Now I'm reading the forums and some are saying this functionality is no longer supported by Acrobat. Pardon my language, but WTF?!?! This is functionality that is commonly used by me and I can only assume other users. Now you have two Adobe products that won't communicate? If so, then all the hoopla stating how great the Adobe suite is should be edited. I have never seen these products take such a step backward!
    Sorry for the rant, but I find this to be ridiculous. What is the workaround, besides converting every document to PDF inside its own software and then combing the PDFs?

    InDesign uses a different method of making PDF files when you use the File->Export option in InDesign (even with Acrobat installed, it uses an internal copy of the PDF Library engine). As such, the two applications do not communicate directly with each other.
    Support for driving the PDF conversion process from within Acrobat has been removed from Acrobat X, beacuse with the new features in InDesign CS4+, Acrobat doesn't have access to the settings it needs to control things such as multimedia, spreads and transitions. ID CS5 divides PDFs into two concepts - "print" and "interactive", neither of which match the presets used by Distiller. Creating PDFs from InDesign files must therefore take place from within InDesign itself.

  • How to find out that recovery is sufficient

    HEllo all,
    Lets say I am running recovery of database (no RMAN) and I apply few redologs. How can I find out that recovery done on datafiles so far is sufficient and datafiles are in consistent state so I can open DB w/o problems? I mean , I know that I would get error in case I try to open DB and datafiles need more recovery, but I would like to see some kind of proof on my screen that recovery is not finished (probably some v$ view or something ).
    Or it does not have to be an option that I am running recovery of DB, it can be that my DB is running and there is some failure which will require media recovery . Where can I see expect logs that I need to recover because of this or that does not match (I guess in some v$view for datafiles will be mismatch of some numbers comparing to v$controlfile or v$database view.....or??? )
    I hope you guys got it what I mean :)))if not just let me know I'll try to explain it better
    thx

    You claim to have done an Offline Backup. And yet, Oracle asked for Recovery. Then there might be something wrong with your backup.
    Here I do a normal shutdown of the database and when I MOUNT, I see that the files are NOT Fuzzy :
    ora10204>sqlplus '/ as sysdba'
    SQL*Plus: Release 10.2.0.4.0 - Production on Thu Aug 27 23:24:40 2009
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    Connected to an idle instance.
    SQL> startup
    ORACLE instance started.
    Total System Global Area  880803840 bytes
    Fixed Size                  2087992 bytes
    Variable Size             197133256 bytes
    Database Buffers          675282944 bytes
    Redo Buffers                6299648 bytes
    Database mounted.
    Database opened.
    SQL> select file#,fuzzy, checkpoint_change#, to_char(checkpoint_time,'DD-MON HH24:MI:SS') from v$datafile_header order by 1;
         FILE# FUZ CHECKPOINT_CHANGE# TO_CHAR(CHECKPO
             1 YES            2063978 27-AUG 23:24:48
             2 YES            2063978 27-AUG 23:24:48
             3 YES            2063978 27-AUG 23:24:48
             4 YES            2063978 27-AUG 23:24:48
             5 YES            2063978 27-AUG 23:24:48
    SQL> shutdown
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup mount
    ORACLE instance started.
    Total System Global Area  880803840 bytes
    Fixed Size                  2087992 bytes
    Variable Size             197133256 bytes
    Database Buffers          675282944 bytes
    Redo Buffers                6299648 bytes
    Database mounted.
    SQL> select file#,fuzzy, checkpoint_change#, to_char(checkpoint_time,'DD-MON HH24:MI:SS') from v$datafile_header order by 1;
         FILE# FUZ CHECKPOINT_CHANGE# TO_CHAR(CHECKPO
             1 NO             2064344 27-AUG 23:25:36
             2 NO             2064344 27-AUG 23:25:36
             3 NO             2064344 27-AUG 23:25:36
             4 NO             2064344 27-AUG 23:25:36
             5 NO             2064344 27-AUG 23:25:36
    SQL> alter database open;
    Database altered.
    SQL> select file#,fuzzy, checkpoint_change#, to_char(checkpoint_time,'DD-MON HH24:MI:SS') from v$datafile_header order by 1;
         FILE# FUZ CHECKPOINT_CHANGE# TO_CHAR(CHECKPO
             1 YES            2064345 27-AUG 23:28:49
             2 YES            2064345 27-AUG 23:28:49
             3 YES            2064345 27-AUG 23:28:49
             4 YES            2064345 27-AUG 23:28:49
             5 YES            2064345 27-AUG 23:28:49
    SQL> The MOUNT after a NORMAL Shutdown that would have been used for an Offline Backup, shows "NO" for Fuzziness of datafiles.
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • How to find out if your BB line has been capped?

    Is there somewhere I can go to find out if my BB line has been capped? I had an email form BT about a month ago warning me I might exceed my download limit. In the end I did not exceed my limit for the month. But it was shortly after that my BB speed was cut in half and has remained that way ever since. I have had 2 engineers out who can find nothing wrong with the exchange, the line or the equipment in my house. Despite at least 3 SNR resets, my IP profile has been fixed at 750k for the whole time. My IP profile was 2000k or more before the speed was cut.
    I just wonder if there is anyway to tell if your BB line has been throttled.

    "it is very likely a local noise issue that your line is picking up it is not a line fault this is is why bt cannot find the fault the problem could be caused by many things microwaves central heating pumps computer monitors poweresupplies and many similar items"
    If there is a local noise issue as you suggest, How would one detect such a thing? You can't just switch everything off in a house and leave it for 3 to 5 days to see if the BB speed increases. Surely the tests the the engineers did when they came out to see me would have detected any noise on the line when they tested the line.
    The thing I find most frustrating is BT don't even seem able to admit I have any sort of problem at all. The fact I have had a stable connection for years and then suddenly it drops by half overnight seems not to be considered a problem. I think I might just change to another ISP. I really don't think it can be any worse than this.

  • I am trying to find out how to assign files with particular extensions to the appropriate software. At the moment when I create a file using Word it is apparently given the extension .docx but Word doesn't recognise its own files. How do I alocate th

    I am trying to find out how to assign files with particular extensions to the appropriate software. At the moment when I create a file using Word it is apparently given the extension .docx but Word doesn't recognise its own files. How do I allocate the extension .docx to Word? There used to be a way of doing it, I think under "Preferences" but I can't seem to find it.

    Still in the same location:
    File > Get Info > Open with (select) > Change All (button)

  • HT201257 I just bought an imac in september 2012.  And i just find out that my microphone is not working.  So i did an apple hardware test and with no problems found?  I have sound but no one can hear me, not even the computer.  Should i bring it back to

    I just bought an imac in september 2012.  And i just find out that my microphone is not working.  So i did an apple hardware test and with no problems found?  I have sound but no one can hear me, not even the computer.  Should i bring it back to the store

    Before you go through that trouble open About this Mac > More Info... > System Report > Audio and see if the system actually knows it has a microphone.  Then you can look into Applications > Utilities >  Audio MIDI Setup and see if the microphone is there, select it and make sure the sliders are set to full. Then in System Preferences look for Sound > Input and make sure it shows up there and the sliders are at least half way up. If none of that works do a
    SMC RESET
    http://support.apple.com/kb/HT3964
    Shut down the computer.
    Unplug the computer's power cord and ALL peripherals.
    Wait 15 seconds.
    Attach the computers power cable.
    Wait another 5 seconds and press the power button to turn on the computer.
    It is the 5 second timing that initiates the reset.
    then go through the process of looking for the microphone again as the reset may reenable the mic.

Maybe you are looking for

  • Site Definitions not working in CC 2014

    Since the update, my site definitions are no longer working. I try to set up a new site, navigate to the correct folder and get the warning: 'site is inside the site "x"' This may cause conflicts - ' etc. The site folder isn't inside another site at

  • How to localize Google Search?

    I am living in Switzerland running Mac OS X Leopard with English UI. If I type a search term in the Google search windows in the upper right corner, Safari by default searches google.com. Is there a way to set this default to google.ch?

  • Counter in After FX CS4

    I can't seem to find a way to make a counter that goes further than 30,000! I need a counter that goes all the way to maybe 5 million or so... anybody know how to do that? I need it for a video were there's stats and stuff flying around... please hel

  • Exchange Server 2010 on Windows Server 2012 Standard

    Hello, I'm trying to install Exchange 2010 on Server 2012 STD.  The process halts after one of the pre-requisites does not get installed.  Following is the error message: Configuring Prerequisites Failed Error: The following error was generated when

  • Limit SSID Broadcasts with WCS or WLC

    Is it possible to limit which SSID's particular AP's broadcast? I've tried using AP Groups, but that only segments the VLAN broadcast domain. The AP still broadcasts all SSID's. I have 2 APs in a jury waiting room - I only want to broadcast their SSI