How to unlock file, locked by a process Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Lock and Unlock from USB disk (pendrive)How to unlock screen in Kubuntu 11.10?I seem to be locked out of my accountComputer has locked up, will it recover?Processes allotting excessive disk space to (deleted) .xsession-errors fileiOS 7 Locked Bug via Ubuntu 13.10How do I unlock /var/lib/dpkg/lock?How to unlock locked session?Checking two process in same portWhat is the gmain process?

Bete Noir -- no dairy

How to deal with a team lead who never gives me credit?

Why do people hide their license plates in the EU?

What causes the vertical darker bands in my photo?

What is the role of the transistor and diode in a soft start circuit?

Error "illegal generic type for instanceof" when using local classes

Why are Kinder Surprise Eggs illegal in the USA?

Should I use a zero-interest credit card for a large one-time purchase?

What is the logic behind the Maharil's explanation of why we don't say שעשה ניסים on Pesach?

How to tell that you are a giant?

Why did the rest of the Eastern Bloc not invade Yugoslavia?

Can I cast Passwall to drop an enemy into a 20-foot pit?

How come Sam didn't become Lord of Horn Hill?

Seeking colloquialism for “just because”

English words in a non-english sci-fi novel

How can I make names more distinctive without making them longer?

51k Euros annually for a family of 4 in Berlin: Is it enough?

Denied boarding although I have proper visa and documentation. To whom should I make a complaint?

How to align text above triangle figure

Why was the term "discrete" used in discrete logarithm?

How to answer "Have you ever been terminated?"

What's the meaning of 間時肆拾貳 at a car parking sign

What exactly is a "Meth" in Altered Carbon?

How to react to hostile behavior from a senior developer?



How to unlock file, locked by a process



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Lock and Unlock from USB disk (pendrive)How to unlock screen in Kubuntu 11.10?I seem to be locked out of my accountComputer has locked up, will it recover?Processes allotting excessive disk space to (deleted) .xsession-errors fileiOS 7 Locked Bug via Ubuntu 13.10How do I unlock /var/lib/dpkg/lock?How to unlock locked session?Checking two process in same portWhat is the gmain process?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








4















The file is locked by a process, java in my case. I only want the lock to be released.



lsof | grep /home/user/workspace1


lsof



A temporary solution was to 'End Process' from 'System Monitor'.
End Process
But terminating java(Java Virtual Machine) would terminate all other programs using java. So how shall I release the lock held by any process. For the same purpose Windows has an application called 'Unlocker'.










share|improve this question




























    4















    The file is locked by a process, java in my case. I only want the lock to be released.



    lsof | grep /home/user/workspace1


    lsof



    A temporary solution was to 'End Process' from 'System Monitor'.
    End Process
    But terminating java(Java Virtual Machine) would terminate all other programs using java. So how shall I release the lock held by any process. For the same purpose Windows has an application called 'Unlocker'.










    share|improve this question
























      4












      4








      4


      1






      The file is locked by a process, java in my case. I only want the lock to be released.



      lsof | grep /home/user/workspace1


      lsof



      A temporary solution was to 'End Process' from 'System Monitor'.
      End Process
      But terminating java(Java Virtual Machine) would terminate all other programs using java. So how shall I release the lock held by any process. For the same purpose Windows has an application called 'Unlocker'.










      share|improve this question














      The file is locked by a process, java in my case. I only want the lock to be released.



      lsof | grep /home/user/workspace1


      lsof



      A temporary solution was to 'End Process' from 'System Monitor'.
      End Process
      But terminating java(Java Virtual Machine) would terminate all other programs using java. So how shall I release the lock held by any process. For the same purpose Windows has an application called 'Unlocker'.







      java lock lsof






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked May 1 '14 at 7:45









      arpitarpit

      120310




      120310




















          2 Answers
          2






          active

          oldest

          votes


















          0














          Try lockf.




          lockf - apply, test or remove a POSIX lock on an open file



          The lockf() function allows sections of a file to be locked with
          advisory-mode locks. Calls to lockf() from other processes which
          attempt to lock the locked file section will either return an error
          value or block until the section becomes unlocked. All the locks for a
          process are removed when the process terminates. Record locking with
          lockf() is supported for regular files.IBM







          share|improve this answer

























          • This is a C function, not a program. Not sure how it will help the OP.

            – terdon
            May 1 '14 at 10:46


















          0














          I am not at all sure this will work on your particular lockfiles but lock-remove might be worth a try:



           lockfile-remove [--lock-name] filename

          DESCRIPTION
          Lockfile-progs provides a set a programs that can be used to lock and
          unlock mailboxes and files safely (via liblockfile):


          So, try something like



          lockfile-remove /home/user/workspace1/.metadata/.lock


          Another, more brutal approach, is to simply delete the lockfile.






          share|improve this answer























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "89"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f458736%2fhow-to-unlock-file-locked-by-a-process%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Try lockf.




            lockf - apply, test or remove a POSIX lock on an open file



            The lockf() function allows sections of a file to be locked with
            advisory-mode locks. Calls to lockf() from other processes which
            attempt to lock the locked file section will either return an error
            value or block until the section becomes unlocked. All the locks for a
            process are removed when the process terminates. Record locking with
            lockf() is supported for regular files.IBM







            share|improve this answer

























            • This is a C function, not a program. Not sure how it will help the OP.

              – terdon
              May 1 '14 at 10:46















            0














            Try lockf.




            lockf - apply, test or remove a POSIX lock on an open file



            The lockf() function allows sections of a file to be locked with
            advisory-mode locks. Calls to lockf() from other processes which
            attempt to lock the locked file section will either return an error
            value or block until the section becomes unlocked. All the locks for a
            process are removed when the process terminates. Record locking with
            lockf() is supported for regular files.IBM







            share|improve this answer

























            • This is a C function, not a program. Not sure how it will help the OP.

              – terdon
              May 1 '14 at 10:46













            0












            0








            0







            Try lockf.




            lockf - apply, test or remove a POSIX lock on an open file



            The lockf() function allows sections of a file to be locked with
            advisory-mode locks. Calls to lockf() from other processes which
            attempt to lock the locked file section will either return an error
            value or block until the section becomes unlocked. All the locks for a
            process are removed when the process terminates. Record locking with
            lockf() is supported for regular files.IBM







            share|improve this answer















            Try lockf.




            lockf - apply, test or remove a POSIX lock on an open file



            The lockf() function allows sections of a file to be locked with
            advisory-mode locks. Calls to lockf() from other processes which
            attempt to lock the locked file section will either return an error
            value or block until the section becomes unlocked. All the locks for a
            process are removed when the process terminates. Record locking with
            lockf() is supported for regular files.IBM








            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited May 1 '14 at 10:44









            terdon

            67.9k13140223




            67.9k13140223










            answered May 1 '14 at 10:01









            MitchMitch

            85.8k14174232




            85.8k14174232












            • This is a C function, not a program. Not sure how it will help the OP.

              – terdon
              May 1 '14 at 10:46

















            • This is a C function, not a program. Not sure how it will help the OP.

              – terdon
              May 1 '14 at 10:46
















            This is a C function, not a program. Not sure how it will help the OP.

            – terdon
            May 1 '14 at 10:46





            This is a C function, not a program. Not sure how it will help the OP.

            – terdon
            May 1 '14 at 10:46













            0














            I am not at all sure this will work on your particular lockfiles but lock-remove might be worth a try:



             lockfile-remove [--lock-name] filename

            DESCRIPTION
            Lockfile-progs provides a set a programs that can be used to lock and
            unlock mailboxes and files safely (via liblockfile):


            So, try something like



            lockfile-remove /home/user/workspace1/.metadata/.lock


            Another, more brutal approach, is to simply delete the lockfile.






            share|improve this answer



























              0














              I am not at all sure this will work on your particular lockfiles but lock-remove might be worth a try:



               lockfile-remove [--lock-name] filename

              DESCRIPTION
              Lockfile-progs provides a set a programs that can be used to lock and
              unlock mailboxes and files safely (via liblockfile):


              So, try something like



              lockfile-remove /home/user/workspace1/.metadata/.lock


              Another, more brutal approach, is to simply delete the lockfile.






              share|improve this answer

























                0












                0








                0







                I am not at all sure this will work on your particular lockfiles but lock-remove might be worth a try:



                 lockfile-remove [--lock-name] filename

                DESCRIPTION
                Lockfile-progs provides a set a programs that can be used to lock and
                unlock mailboxes and files safely (via liblockfile):


                So, try something like



                lockfile-remove /home/user/workspace1/.metadata/.lock


                Another, more brutal approach, is to simply delete the lockfile.






                share|improve this answer













                I am not at all sure this will work on your particular lockfiles but lock-remove might be worth a try:



                 lockfile-remove [--lock-name] filename

                DESCRIPTION
                Lockfile-progs provides a set a programs that can be used to lock and
                unlock mailboxes and files safely (via liblockfile):


                So, try something like



                lockfile-remove /home/user/workspace1/.metadata/.lock


                Another, more brutal approach, is to simply delete the lockfile.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered May 1 '14 at 10:49









                terdonterdon

                67.9k13140223




                67.9k13140223



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Ask Ubuntu!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f458736%2fhow-to-unlock-file-locked-by-a-process%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Tamil (spriik) Luke uk diar | Nawigatjuun

                    Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

                    Training a classifier when some of the features are unknownWhy does Gradient Boosting regression predict negative values when there are no negative y-values in my training set?How to improve an existing (trained) classifier?What is effect when I set up some self defined predisctor variables?Why Matlab neural network classification returns decimal values on prediction dataset?Fitting and transforming text data in training, testing, and validation setsHow to quantify the performance of the classifier (multi-class SVM) using the test data?How do I control for some patients providing multiple samples in my training data?Training and Test setTraining a convolutional neural network for image denoising in MatlabShouldn't an autoencoder with #(neurons in hidden layer) = #(neurons in input layer) be “perfect”?