I have many processes running on my Ubuntu. One day later, I find that one file has been changed. Now I want to know which process touched my file.  What can I do? (I can not modify the running processes)
11478
Three files have suddenly appeared in my home directory, called "client_state.xml", "lockfile", and "time_stats_log". The last two are empty. I'm wondering how they got there. It's not the first time it has happened, but the last time was weeks ago; I deleted the files and nothing broke or complained. I haven't been able to think of what I was doing at the time reported by stat $filename. Is there any way I can find out where they came from?  Alternatively, is there a way to monitor the home directory (but not sub-directories) for the creation of files?
103220
I would like to monitor one process's memory / cpu usage in real time. Similar to top but targeted at only one process, preferably with a history graph of some sort.
32836
I need to make sure that user can run only one instance of my program at a time. Which means, that I have to check programatically, whether the same program is already running, and quit in such case.  The first thing that came to my mind was to create a file somewhere, when the program starts. Then, each other instance of the program would check for this file and exit if it found it. The trouble is, that the program must always exit gracefully and be able to delete the file it created, for this to work. In case of, say, power outage, the lock file remains in place and the program can't be started again.  To solve this, I decided to store the first program's process ID into the lock file and when another instance starts, it checks if the PID from the file is attached to some running process. If the file doesn't exist, is empty, or the PID doesn't correspond to any existing process, the program continues to run and writes its own PID to the file.  This seems to work quite fine - even after an unexpected shutdown, the chance that the (now obsolete) process ID will be associated with some other program, seems to be quite low.  But it still doesn't feel right (there is a chance of getting locked by some unrelated process) and working with process IDs seems to go beyond the standard C++ and probably isn't very portable either.  So, is there another (more clean and secure) way of doing this? Ideally one that would work with the ISO 98 C++ standard and on Windows and *nix alike. If it cannot be done platform-independently, Linux/Unix is a priority for me.
15189
time is a brilliant command if you want to figure out how much CPU time a given command takes.  I am looking for something similar that can list the files being accessed by a program and its children. Either in real time or as a report afterwards.  Currently I use:  #!/bin/bash  strace -ff -e trace=file "$@" 2&gt;&amp;1 | perl -ne 's/^[^"]+"(([^\\"]|\\[\\"nt])*)".*/$1/ &amp;&amp; print'   but its fails if the command to run involves sudo. It is not very intelligent (it would be nice if it could only list files existing or that had permission problems or group them into files that are read and files that are written). Also strace is slow, so it would be good with a faster choice.
28780
I'm looking for a tool or method to find out what command line parameters have been passed to a program, for example when it was run by another program (launcher-application scenario).
59988
For example, when I type ping 8.8.8.8 &amp;, why can we see ping process working? And when I type find / -name '*test*' &amp; , it's also seen on monitor.  Why is that? Is it not really in background?
43489
I would like to keep the original time stamp of a file when synchronizing with Ubuntu One.  Now Ubuntu One is messing with my time stamps, and I no longer know when I last worked on the file.  Ubuntu One also seem to mess up time stamps on the original source host.  This really is a show stopper, and we are just about to implement Ubuntu One across the many users in the organization.
5306
Is there any way to find out what process created a given icon in the system tray? A new icon has appeared that I don't recognize and I would like to find out what process spawned it.
37357
Say, for example, that there's one process that's writing to a file. While the process is running, I opened the file in notepad. The process keeps  writing to the file.   Other than closing and reopening the file, is there any way for me to "refresh" the data that notepad is showing?
19828
I've seen several of answers about using  or , but I would like to be able to find out in my own code (C#) which process is locking a file. I have a nasty feeling that I'm going to have to spelunk around in the win32 API, but if anyone has already done this and can put me on the right track, I'd really appreciate the help. Update Links to similar questions
42795
How do i tell if one instance of my program is running? I thought I  could do this with a data file but it would just be messy :(  I want to do this as I only want 1 instance to ever be open at one point.
108801
Accidentally a rm -rf command was launched to my root directory instead of current directory. I stopped file removing by Ctrl+C but some files has already been removed. Is there a LINUX command to list all recently removed files from the system to get the affected applications ?  Operating System: CentOS 6.3
103511
Possible Duplicate:          In Windows Task Manager it seems that I have multiple Chrome processes running, even though I only have one Chrome window open.   How is this possible? I always thought each open program represented one process.
57571
Sometimes, I have a rogue Java process which takes up 100% of my CPU and makes it jump about 30C in temperature (usually resulting in a crash if not killed).  Problem is, I can never really identify it (its got a long list of parameters and stuff) or analyze it because I have to kill it so quickly.  Is there a sort of log I can look at to see the identity of past processes I have killed? If not, is there a way for me to catch that process next time it shows up?  If it matters I'm OpenSuse 11.4.
40152
How can I see which application and what processes are running recently after the login using terminal command.
94555
I've just executed a long-running process from the bash prompt. In hindsight, I wish I'd run time on it, or noted down the time at which I kicked it off.  Is there any way of getting this information retrospectively? The .bash_history doesn't seem to include timestamps.  In my particular case it's Mac OS X, but I'm interested in general Unix/Linux solutions.  To clarify, the process has now completed, and I'd prefer not to run it again unless absolutely necessary!
57261
Is there any logging mechanism in Windows XP to know whether a user has done a specific file operation (create/modify/delete)?