LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Is a file in writting (https://www.linuxquestions.org/questions/linux-general-1/is-a-file-in-writting-211473/)

stephnane 07-30-2004 10:10 AM

Is a file in writting
 
Hi.

I need to know if some user is writing a file.
Is there any command to know this.

Thanks.

Stephane

Dark_Helmet 07-30-2004 10:43 AM

One possibility would be with the lsof command. It lists open files. Be warned, you will get lots of output. Piping it into grep or to a text file would be advisable :)

EDIT: lsof is a system command. So you'll likely need to be root to execute it...

bigrigdriver 07-30-2004 09:39 PM

The ps command lists all running processes, by user, including the path to applications and files they may be using. Examples of commands: ps aux, ps --User <username>. See the man pages for more info on how to use ps.


All times are GMT -5. The time now is 04:04 PM.