1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Opened File Accessor

Discussion in 'Operating System' started by Gabriel9999, May 28, 2019.

  1. Gabriel9999

    Gabriel9999 New Member

    Joined:
    Mar 12, 2019
    Messages:
    17
    Likes Received:
    1
    Trophy Points:
    3
    I want to remove a file in my home directory. But when i try to remove with rm command i can not because given file is used by other processes. How can a find or list the processes which is opened or using this file?
     
  2. samueltarcin9999

    samueltarcin9999 New Member

    Joined:
    Mar 12, 2019
    Messages:
    15
    Likes Received:
    10
    Trophy Points:
    3
    There are a lot different ways to a process which is using given file. But fuser command can be used to list users who is using given files. Fuser/home/john/test.txt will list processes wich opened test.txt file.
    For more details: poftut.com/use-fuser-match-user-process/
     
    Gabriel9999 likes this.

Share This Page