You can use the fuser
command, which is part of the psmisc
package, like:
fuser file_name
You will receive a list of processes using the file.
You can use different flags with it, in order to receive a more detailed output.
You can find more info in the fuser’s Wikipedia article, or in the man
pages.
Related Contents:
- How to convert DOS/Windows newline (CRLF) to Unix newline (LF) in a Bash script
- How do I use sudo to redirect output to a location I don’t have permission to write to? [closed]
- How can I symlink a file in Linux? [closed]
- How do I change the number of open files limit in Linux? [closed]
- Linux Blocking vs. non Blocking Serial Read
- Get exit code of a background process
- How to exclude a directory in find . command
- Merge / convert multiple PDF files into one PDF [closed]
- How to parse a CSV file in Bash?
- Delete empty lines using sed
- Linux default behavior of executable .data section changed between 5.4 and 5.9?
- Is there a way to ‘uniq’ by column?
- Linking against an old version of libc to provide greater application coverage
- How to escape single quotes in Bash/Grep?
- Linux: copy and create destination dir if it does not exist
- Forward host port to docker container
- How to obtain the number of CPUs/cores in Linux from the command line?
- Get most recent file in a directory on Linux
- How can I kill a process by name instead of PID, on Linux? [duplicate]
- How do I exclude a directory when using `find`?
- Hello, world in assembly language with Linux system calls?
- How can I set up & run PhantomJS on Ubuntu?
- Extract file basename without path and extension in bash [duplicate]
- How to only get file name with Linux ‘find’?
- How do I disassemble raw 16-bit x86 machine code?
- Why are the backslash and semicolon required with the find command’s -exec option?
- Using grep to get the next WORD after a match in each line
- Can _start be the thumb function?
- How can I generate a list of files with their absolute path in Linux?
- How do I run multiple background commands in bash in a single line?
- How to run a shell script on a Unix console or Mac terminal?
- Is there a way to get gcc to output raw binary?
- How to avoid STT_GNU_IFUNC symbols in your binary?
- system wide keyboard hook on X under linux
- How do I get cURL to not show the progress bar?
- How to remove non UTF-8 characters from text file
- How can I split one text file into multiple *.txt files?
- How do I set up cron to run a file just once at a specific time? [closed]
- why is the output of `du` often so different from `du -b`
- How to prevent writer starvation in a read write lock in pthreads
- Add file extension to files with bash
- How to set up a Subversion (SVN) server on GNU/Linux – Ubuntu [closed]
- GDB: Listing all mapped memory regions for a crashed process
- How to tell CMake where to put build files?
- Git status ignore line endings / identical files / windows & linux environment / dropbox / meld
- How to find directory of some command?
- How do I get the path of a process in Unix / Linux?
- What is the correct way to start a mongod service on linux / OS X?
- How can I trim white space from a variable in awk?
- How can I find all files containing specific text (string) on Linux?