The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
66 views

Daemon's open file limit is reached even though the system limits have been increased

I am running Debian wheezy. File limits are increased to 100000 for every user. ulimit -a and ulimit -Hn / -Sn show me the right amounts of maximum open file limits even in screen. But for some reason ...
9
votes
3answers
30k 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 ...
5
votes
2answers
203 views

Why does process substitution result in a file called /dev/fd/63 which is a pipe?

I am trying to understand named pipes in the context of this particular example. I type <(ls -l) in my terminal and get the output as, bash: /dev/fd/63: Permission denied. If I type cat <(ls ...
13
votes
2answers
804 views

How to find out what process is writing to STDOUT?

I have two instances of a process running. One of them is "frEAkIng oUT!" and printing errors non stop to STDOUT. I want to kill the broken process but I have to make sure I don't terminate the wrong ...
5
votes
2answers
2k 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) ...
0
votes
1answer
86 views

“Open file” dialog: Focus jumps to text field (LMDE / Cinnamon)

I have a usability problem with the "Open file" dialog. The questions would be: Is there any way out? E.g. can I disable the autocomplete? Otherwise, I might post a bug report.. Why does this ...
7
votes
3answers
623 views

How can a log program continue to log to a deleted file?

From the Unix Power Tools, 3rd Edition: Instead of Removing a File, Empty It section: If an active process has the file open (not uncommon for log files), removing the file and creating a new ...
12
votes
2answers
2k 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 | ...
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 ...
14
votes
2answers
1k views

How do I “cat and follow” a file?

A file is being sequentially downloaded by wget. If I start unpacking it with cat myfile.tar.bz2 | tar -xj, it may unpack correctly or fail with "Unexpected EOF", depending on what is faster. How to ...
22
votes
2answers
5k 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. ...
2
votes
0answers
96 views

ls does not show a hidden file (OS X)

I am using lsof to view the list of open files. One such file that it displays open is : Google 3864 malaykeshav 46u REG 1,1 470455334 32578671 ...
3
votes
3answers
67 views

Moving an open file to a different device

I have an application running that is generating a large (~200GB) output file, and takes about 35 hours to run (currently I'm about 12 hours in). The application just opens the file once then keeps it ...
1
vote
1answer
86 views

Prevent active file removal on an NFS filesystem

I clear my logs using following script - find "." -mtime 1 -type f -print0 | xargs -0 rm -rf But it deletes the active files also and creates .nfsā€¦ files instead. Is there any way to prevent ...
5
votes
1answer
376 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 ...
1
vote
1answer
411 views

How to configure the process open file limit of a user?

The default open file limit per process is 1024 on - say - Linux. For certain daemons this is not enough. Thus, the question: How to change the open file limit for a specific user?
5
votes
3answers
360 views

tail -f, Determine if a file is no longer being written to [closed]

I am using tail -f to follow the growth of a log file. I am having trouble finding a way to detect if the process that is writing to the log file (when it crashes or is otherwise terminated) is no ...
5
votes
2answers
484 views

Portability of file descriptor links

I've always wondered this but never took the time to find out, so I'll do so now - how portable is the usage shown here of either /proc/$$/fd/$N or /dev/fd/$N? I understand POSIX guarantees /dev/null, ...
1
vote
0answers
118 views

Which process is occupying a certain pseudo terminal pts/X?

On Linux: Normally pseudo terminals are allocated one after the other. Today I realized that even after a reboot of my laptop the first opened terminal window (which was always pts/0 earlier) ...
19
votes
3answers
15k 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 ...
1
vote
0answers
71 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?
14
votes
2answers
6k 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 ...
1
vote
1answer
201 views

If I open the same file twice in Okular, switch to the existing window

I have always been confused why the file manager in Linux cannot stop applications from opening a single file twice at the same time? Specifically, I want to stop the PDF file reader Okular from ...
1
vote
1answer
118 views

If file does not get closed, will OS close it?

If a file is being opened by a process and it is not being closed by any of the processes, will the OS automatically close that open file?
2
votes
2answers
107 views

File permissions and saving

Let's say you open a file on which you have write permission. Meanwhile you change permissions and remove write permission while you still have the file open in some editor. What will happen if you ...
5
votes
2answers
2k views

What process is accessing a mounted filesystem sporadically?

I have a Solaris 10 server with autofs-mounted home dirs. On one server they are not unmounted after the 10 min timeout period. We've got AUTOMOUNT_TIMEOUT=600 in /etc/default/autofs, I ran automount ...
5
votes
2answers
185 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, ...
6
votes
2answers
3k 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 ...
4
votes
3answers
1k 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 ...
3
votes
2answers
76 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 ...
14
votes
5answers
4k views

What is using this network socket?

I'm trying to use NTP to update the time on my machine. However, it gives me an error: host # ntpdate ntp1.example.org 10 Aug 12:38:50 ntpdate[7696]: the NTP socket is in use, exiting What does the ...
1
vote
2answers
81 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
304 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 ...
2
votes
4answers
8k 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 ...
9
votes
6answers
2k views

How do I set a limit on the number of files Linux can have open?

I plan to run a Java app using nohup ... &. The limit must apply to commands like this.
3
votes
1answer
136 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
339 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 ...
4
votes
1answer
196 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 ...
14
votes
3answers
2k 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.
13
votes
1answer
3k 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
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 ...
8
votes
3answers
1k 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 ...
2
votes
1answer
149 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 ...
5
votes
3answers
2k 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 ...
2
votes
2answers
1k 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 ...
4
votes
2answers
4k 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
144 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 ...
5
votes
1answer
747 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?
7
votes
3answers
3k 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 ...
1
vote
1answer
227 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 ...