3
votes
1answer
23 views

How to find the file corresponding to a pipe opened by a process?

I created this script, which listens for characters received on a hardcoded pipe, and tries to eval those characters. I call my script loop_executor.sh This is all it contains: !/bin/bash while : do ...
8
votes
2answers
270 views

How can I tell when a process has finished writing to a file?

I have a process which has been spawned from a shell. It is running as a background process and exporting a DB to a CSV file in /tmp. How can I tell when the background process has completed ...
1
vote
2answers
58 views

Remove unneeded file lock in script

I have some script using flock executable. It works well. Problem is when this script calls another script, and it creates background process. In this situation background process inherits file locked ...
3
votes
1answer
79 views

Monitoring filesystem activity

Say, I have a program, and I want to monitor its filesystem activity (what files/directories are created/modified/deleted etc.) This program may be capable of spawning further processes, and thus, I ...
1
vote
2answers
37 views

List of files accessed by application

I want to install propertiary AMD driver but I would also like to know which files were created/changed by installer. Is there some application which can observe (probably by inotify) which files were ...
1
vote
1answer
58 views

How do I identify the user that is attempting to create a file?

I have a PHP script that is attempting to create a file, but it can not because of permissions. I would like to identify which user the system sees as the one requesting to create the file. I would ...
1
vote
4answers
1k views

monitoring file changes + process access to files

I would like to see what's happening in my app server folders, which files are changed by process x or which *.war files has been changed (replaced/created) in last x minutes. I am software developer ...
5
votes
2answers
11k views

How to list processes locking file?

Using flock, several processes can have a shared lock at the same time, or be waiting to acquire a write lock. How do I get a list of these processes? That is, for a given file X, ideally to find the ...
5
votes
3answers
347 views

Dynamic file content generation: Satisfying a 'file open' by a 'process execution'

I have a read-only file, F. A program, P, that I'm not the author of, needs to read F. I want the content of F to come from another 'generator' program, G, whenever P tries to read F (taking F to ...
1
vote
2answers
100 views

Single process accessible temporary file

I want to create a file that is only accessible to the process that created it (and potentially its children), and that disappears when the process exits, ideally never persisting the file to disk. As ...
16
votes
3answers
20k views

Find and remove large files that are open but have been deleted

How does one find large files that have been deleted but are still open in an application? How can one remove such a file, even though a process has it open? The situation is that we are running a ...
12
votes
4answers
584 views

Is there a top-like command that shows the network bandwidths and file accesses of running processes

For example, we'd like to see: PROCESS IF TX RX FILE(regular) R/W prog1 eth0 200kB/s 12kB/s -- -- wlan0 12kB/s 100kB/s -- ...
2
votes
1answer
131 views

vim not shown in fuser

First use Vim to edit a file, say /tmp/A. Assuming that vim process is the only one that accesses /tmp/A, then use "ctrl+z" to suspend the process, and execute fuser /tmp/A Then you see nothing ...
2
votes
1answer
59 views

remotely query text file associated with an instance of vi

I have opened several text files (a.txt, b.txt, c.txt, ...) in different sessions of vi launched from different instances of a bash shell. Having then accessed that machine remotely, I wish to ...
4
votes
3answers
389 views

Why is there a type for process ids (pid_t), but not for file descriptors (fd)?

I see that pid_t is typedef'd in unistd.h, and file descriptors are defined to be int in fcntl.h. But since they are used in similar ways, wouldn't it make sense to have a typedef for file ...
3
votes
1answer
419 views

Redirecting/grep'ing an existing shell's STDOUT

I run a lot of long running processes (simulations) that print progress to STDOUT. I occasionally forget to redirect to STDOUT to a file I can grep, and it's usually too far along to restart. ...
1
vote
1answer
91 views

Command to list in real time all the actions of a process

I cannot remember this command (and googling was unsuccessful), but there is a way to get the list of actions performed by a process, that outputs something like # listprocessactions -p 1234 ...
1
vote
1answer
836 views

Automount lookup failed. How to determine what is trying to access the file?

Is there a way to find out what is trying to mount this file? Jul 13 14:27:24 myhost automount[13527]: lookup(file): lookup for tmp_dir failed Something is looking for "tmp_dir", and I've ...
2
votes
1answer
132 views

Is there a way to determine which process creates a file on osx 10.6.8

I would like to know which process has created files on os X 10.6. I'm trying DTrace, which probably will give the right answer, but I have not eyes to see the method. I'm doing this because I think ...
23
votes
5answers
14k views

Determine which process is creating a file

Given file path, how can I determine which process creates it (and/or reads/writes to it)?
2
votes
3answers
455 views

process that only root can run

I have created a process and it is running in the background as a daemon it.Now I want that only root should be able to view the output of that process.My process is something like "top" which ...