The open-files tag has no wiki summary.
2
votes
2answers
67 views
Bizarre Disk Use Problem
I have an external hard drive on which I use rsync to backup my home directory. Today, I tried to umount the drive. It said it was busy. So, I used fuser to figure out who was using it:
/media/Panp9 ...
1
vote
2answers
48 views
Tracking which files are used by program
I am looking for a way to track which files are used by program installer(InstallAnywhere). I cannot use lsof because as far as I know it works on active processes and I want a tool which will work ...
1
vote
1answer
70 views
Strange behavior in mv command - maybe open sys call issue?
I'm noticing very strange behavior from the "mv" command that may (or may not) be related to the "open" system call. We're running RedHat v5. There are two separate storage devices, one mounted to ...
0
votes
4answers
170 views
Show running processes with file name(s)?
I am using putty to connect my linux server which my sites are in. I can run
# ps aux | less
to show running processes. But I want to display which files running these processes ?
I have also ...
5
votes
2answers
587 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 ...
3
votes
1answer
50 views
lsof doesn't return files open by the same user
Consider this simple scenario:
I open a text file ~/textfile.txt with vim in one terminal (tried with both edit and read-only modes).
In a different terminal, I run
/usr/sbin/lsof ~/textfile.txt
...
2
votes
1answer
96 views
How can I access a deleted open file on Linux (output of a running crontab task)?
I have an hourly hour-long crontab job running with some mtr (traceroute) output every 10 minutes (that is going to go for over an hour prior to it being emailed back to me), and I want to see the ...
3
votes
1answer
97 views
Using xdg-open for accessing network with normal explorer
I'm working with small network and I want to start network explorer from a terminal. When I tried to type xdg-open network:///server it opened google chrome and did nothing. I also tried to type ...
9
votes
1answer
272 views
How do I monitor opened files of a process in realtime?
I know I can view the open files of a process using lsof at that moment in time on my Linux machine. However, a process can open, alter and close a file so quickly that I won't be able to see it when ...
2
votes
1answer
74 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
80 views
Max Open Files, clarification needed
On my machine,
ulimit -n returns 2560
Given that -n returns
The maximum number of open file descriptors.
Does it mean that system won't allow more then 2560 open files to be out there at any ...
4
votes
3answers
167 views
vim: How to switch to the directory listing from file view?
I have opened a dir vim some/dir. I can navigate within the tree, yet once I opened a file I wonder, how do I close the file view in order to go back to the directory listing to navigate to another ...
1
vote
2answers
454 views
File delete versus overwrite and link at /proc/pid/fd
It is well known that UNIX systems won't actually delete a file on disk while the file is in use. So if a file is being accessed by process 1 and process 2 deletes the file using rm, process 1 ...
1
vote
0answers
42 views
how to open a knote file on knote
I was wondering if there is any way to open a knote file within knote. There is a knote save option but I am not sure how to open one. Any ideas? Any other program that could open .ics files?
Thanks!
...
3
votes
2answers
1k views
File descriptor linked to socket or pipe in proc [duplicate]
Possible Duplicate:
/proc/PID/fd/X link number
i have a question regarding the file descriptors and their linkage in the proc file system. I've observed that if i list the file descriptors ...
3
votes
1answer
100 views
Efficient mechanism to determine if open file has been externally modified?
For example, the IDE I'm using at the moment (Aptana Studio) notifies me as soon as a file's contents it has open have been changed by some external program.
I can imagine having a periodic loop run ...
4
votes
1answer
196 views
Which command will open the default browser on a system to a given web page (terminal)?
Title says it all. Is there a way to open the default browser on a user's system to a specific page from within a Bash script, or other-language script?
1
vote
1answer
160 views
What happens if a cron script tries to copy a directory at the same time as another process is writing to it?
For example, if I have a java process that (once every 2 hours) takes a backup of a large file, like 500mb, and places it into folder A on HDD A, and I want to schedule a cron script to copy the ...
14
votes
2answers
3k views
Why is number of open files limited in Linux?
Right now, I know that:
Find open files limit per process: ulimit -n
Count all opened files by all process: lsof | wc -l
Get maximum open files count allowd: cat /proc/sys/fs/file-max
My ...
3
votes
0answers
212 views
How can I configure OpenBox session for opening files by mime type?
I've started using OpenBox and I really like it.
But my chromium opens everything with firefox.
Is there any fix for that? I'm looking for most lightweight solution, but also with easy and fast ...
6
votes
2answers
696 views
How to find out the file offset of an opened file?
My problem is that with
lsof -p pid
I can find out the list of opened file of a process whose process id is pid. But is there a way to find out the file offset of each accessed file ?
Please give me ...
4
votes
2answers
1k views
Change default applications used by gnome-open, exo-open, xdg-open, gvfs-open and kde-open
How to change the applications associated with certain file-types for gnome-open, exo-open, xdg-open, gvfs-open and kde-open?
Is there a way by editing config files or by a command-line command?
Is ...
5
votes
2answers
261 views
Recover deleted file that is currently being written to
I started downloading a big file and accidently deleted it a while ago. I know how to get its current contents by cping /proc/<pid>/fd/<fd> but since the download is still in progress ...
12
votes
3answers
1k views
Monitor what is being sent to /dev/null?
Just for fun:
Is there a way to monitor/capture/dump whatever is being written to /dev/null?
On Debian, or FreeBSD, if it matters, any other OS specific solutions are also welcome.
3
votes
2answers
1k views
How to find out which file is currently written by a process
My situation is that from time to time a specific process (in this case, it's Thunderbird) doesn't react to user input for a minute or so. I found out using iotop that during this time, it writes ...
13
votes
1answer
6k views
ulimit: difference between hard and soft limits
What is the difference between hard and soft limits in ulimit?
For number of open files, I have a soft limit of 1024 and a hard limit of 10240.
It is possible to run programs opening more than 1024 ...
3
votes
2answers
230 views
Capturing new output after deleting the output file
I'm runnig a java server on Debian with this command:
java -jar myapp.jar [args] >> log.txt
Once I gzipped the log file to send it and then I realized the original file was gone, leaving me ...
4
votes
2answers
122 views
Can I move a directory with open files?
Imagine a bunch of processes using a /home/user/logs directory. They have some logs open for a longer time.
5
votes
4answers
1k views
How can same fd in different processes point to the same file?
Say I have process 1 and process 2. Both have a file descriptor corresponding to the integer 4.
In each process however the file descriptor 4 points to a totally different file in the Open File Table ...
1
vote
2answers
171 views
display sco unix 5.0.6 samba usage
Is there a command on sco unix which will show which files are being accessed by the samba process ?
Something like lsof in linux maybe, or similar.
12
votes
3answers
705 views
Where do open file handles go when they die?
What happens to the files that are deleted while they have a file handle open to them?
I have been wondering this ever since I figured out I could delete a video file while it was playing in MPlayer ...
7
votes
1answer
322 views
file descriptors and /dev/fd
Are file descriptors unique across a process, or throughout the whole system. Because every file seems the use the same descriptor for stdin and stdout. Is there something special with these? How ...
7
votes
2answers
978 views
What happens when I close() a file descriptor?
I am trying to get the whole picture with file descriptors. Say I have process1 which initially has these file descriptors:
_process1_
| |
| 0 stdin |
| 1 stdout |
| 2 stderr |
...
4
votes
2answers
140 views
Emacs' file extension recognition
How do I get Emacs to recognize new file extensions? For example if I have a .c file and I open it in Emacs, I get the correct syntax highlighting for C, but if I have a .bob file format (which I know ...
5
votes
3answers
263 views
rewrite existing file so that it gets replaced by new version atomically, only once fully written
I vaguely recall reading somewhere that there used to be, in some Unices a way to open an existing file for writing, with a flag that asked the kernel to use the old version (for other processes ...
5
votes
0answers
88 views
How can different file descriptors point to the same file in open file table? [duplicate]
Possible Duplicate:
How can same fd in different processes point to the same file?
I have a hard time grasping the two ideas of File Descriptor Table and Open File Table.
Open File Table ...
7
votes
3answers
2k views
How to remove Notepad from the applications list?
After installing Wine, Notepad has became a default application to open unknown textual files by double click. I'd like to eliminate this behaviour and remove Notepad from the list of applications ...
6
votes
3answers
10k views
Alternatives for “lsof” command?
In many cases "lsof" is not installed on the machines that with I have to work, but the "function" of lsof would be needed very much (ex. on AIX). :\
Are there any "lsof" like applications in the ...
4
votes
1answer
680 views
File descriptor limits are lost after a system reboot
I'm trying to increase the default file descriptor limits for processes on my system. Specifically I'm trying to get the limits to apply to the Condor daemon and its sub-processes when the machine ...
16
votes
2answers
3k views
Who's got the other end of this unix socketpair?
I want to determine what process has the other end of a unix socket, that was created with socketpair().
I have a program parent which creates a socketpair(AF_UNIX, SOCK_STREAM, 0, fds), and fork()s. ...
3
votes
2answers
155 views
How does bash continue to work correctly when you move its working directory?
On Linux, I moved a directory to another directory using mv, and in another shell, my working directory happened to be the directory that was moved.
I ran hg pull in that shell, and to my surprise, ...
7
votes
2answers
1k views
See the STDOUT redirect of a running process
If I start an app with this command:
/path/to/my/command >> /var/log/command.log
And the command doesn't return, is there a way, from another prompt, to see what the STDOUT redirect is set ...
4
votes
3answers
852 views
Gedit opening an “Unsaved document” on opening files with mouse
When I open files by double-clicking a file with mouse I always get one additional "Unsaved Document X".. which is very annoying, because I have to close tham all, and click "Close without save" every ...
4
votes
2answers
868 views
What is the referent of a file descriptor?
My understanding is that a file descriptor is an integer which is a key in the kernel's per-process mapping to objects such as open()ed files, pipes, sockets, etc.
Is there a proper, short, and ...
7
votes
2answers
3k views
/proc/PID/fd/X link number
In Linux, in /proc/PID/fd/X, the links for file descriptors that are pipes or sockets have a number, like:
l-wx------ 1 user user 64 Mar 24 00:05 1 -> pipe:[6839]
l-wx------ 1 user user 64 Mar 24 ...
13
votes
2answers
2k views
How do open files behave on linux systems?
I just renamed a log file to "foo.log.old", and assumed that the application will start writing a new logfile at "foo.log". I was surprised to discover that it tracked the logfile to its new name, and ...
3
votes
2answers
346 views
retrieving names of all open pdf files (in evince or otherwise)
I constantly have many PDF files open. These are usually downloaded using chrome and immediately opened using evince.
I sometimes want to persist the state of all my open PDF files, so I could ...
1
vote
1answer
199 views
Release a port owned by third party application?
I have been consulted about any way to release a port owned by a third party application that is listening to it. Say the application uses sockets and is listening for an specific port the root now ...
4
votes
1answer
659 views
How do I tell a script to wait for a process to start accepting requests on a port?
I need a command that will wait for a process to start accepting requests on a specific port.
Is there something in linux that does that?
while (checkAlive -host localhost -port 13000 == false)
...
1
vote
1answer
172 views
Prevent libflashplayer.so from deleting a file?
I'm trying the preview release of Flash Player "Square" for Linux and noticed that video files are now being deleted from the /tmp/ folder.
Yet the files are still in use (I can see them with lsof):
...
