Questions tagged [file-descriptors]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
24 views

Why doesn't piping work for a command that expects stdin?

So, I was looking to take the output of unzip -Z1 into an array and found this answer; their first option, using mapfile and process substitution WITH input redirection, works a charm. But then I ...
1
vote
1answer
45 views

File descriptor opened once but closed many times; why the discrepancy?

I was trying to use process substitution and come across the following example: exec 3>&1 tar cf /dev/fd/4 $directory_name 4>&1 >&3 3>&- | bzip2 -c > file.tar.bz2 3>&...
0
votes
0answers
23 views

ulimit -n (open files) increments

I had to increase the open file limit for a user on my system, and I was wondering how the open file limit descriptors are being kept track of and if these are stored in bit/byte increments. Imagine ...
1
vote
1answer
101 views

I am having trouble understanding pipes and their implememnation in xv6

I am studying Operating Systems on my own from the MOOC lectures available online and wanted to work on xv6. I was reading the Documentation on xv6 and in chapter 0 when it is talked about pipes (pg. ...
2
votes
1answer
328 views

How to forcibly delete or close opened file?

Theoretical question. I have a network with 2 PC, running Windows. One PC is sharing a samba folder with video file, and i've opened up that file on second PC and started streaming video in infinite ...
1
vote
0answers
340 views

Redirect file descriptor from remote machine to local machine

Suppose I have the following script running on a remote host: $ cat remote_script #!/bin/bash exec 3>file.log echo "Output to stdout" echo "Output to stderr" >&2 echo "Output to fd3 >&...
2
votes
5answers
167 views

Can we say that processes (with or without subprocesses) are totally reflected in their (descriptive) files?

Can we say that a whole "series" of files in a process (as represented respectively by file descriptors) directly reflect this process and possible sub processes of it, so that taking a respective ...
1
vote
1answer
774 views

Why lsof -p and just lsof return drastically different results?

I currently have set a open files limit of 100000 but lsof reports that it's close to running out. Running lsof -n | awk '{print $2'} | sort | uniq -c | sort -n results in: 1 PID 90321 3979 ...
1
vote
1answer
63 views

UNIX redirecting to a file without writing permission system handling

I am learning the UNIX environment and have a question.. When it comes to redirecting a std error to a file, what happens if the file we redirect to has writing permissions denied to the user? ...
0
votes
0answers
36 views

Tool to connect to a file descriptor for I/O

I'm looking for a unix tool which can connect me to a specific file descriptor and do some I/O operations on it, assuming that the user permissions are valid. What could I look to use?
4
votes
1answer
602 views

Output to a file using file descriptor

I was wondering if it's possible to redirect output of one process (in OS X/ Linux) to another process if I know the fd of another process. For example: I open a file using vim: vim /tmp/test. This ...
1
vote
1answer
4k views

Other ways to increase max open files?

I have an application which keeps giving me the following error. tail: inotify cannot be used, reverting to polling: Too many open files I have already followed all the advice I've been able to find ...
-1
votes
1answer
776 views

change descriptor when renaming file linux [closed]

I got a programm in CentOS which writes its log to a file. When I rename it, the programm still writes to it. Is there a way to change that file descriptor without restarting the programm?
0
votes
1answer
569 views

Number of max open files for a process stays low

I have a process running on a ubuntu under a user which its ulimit is 400000 for both -Hn and -Sn options. The /etc/security/limits.conf value for that user is 100000. However, when I execute cat /...
0
votes
0answers
535 views

what are sane open file descriptor limits on linux?

Where can I get good guidance on sane values for open file descriptor limits on linux. We have users asking for massive numbers as their limits and I am unsure of the impact of this and what should ...
0
votes
1answer
55 views

Is it possible to apply special restrictions for a content of a directory?

I want restrict permissions to the content of a directory /abc/def/: disable links (symbolic or hard) limit the number of write permissions pointing to the same file (e.g. to 1, so only one process ...
1
vote
3answers
4k views

What is file descriptor 10?

What is file descriptor 10? Real-world example (where standard output is ignored, standard error redirected to standard output and data from file descriptor 10 is redirected to standard output) that ...
0
votes
3answers
410 views

Find out what app is using a file under Windows [duplicate]

Possible Duplicate: Windows 7: File In Use when deleting file Sometimes I can't delete a file because it's being used by some unknown applications. How can I find out what apps?
0
votes
2answers
192 views

An Application to describe .patch files

Do you know any application that be able to describe .patch files? I mean an application that be able to get .patch file & give me a human readable of the changes it make on files so I'll be able ...
100
votes
7answers
118k views

Increase the maximum number of open file descriptors in Snow Leopard?

I am trying to do something that requires a large number of file descriptors sudo ulimit -n 12288 is as high as Snow Leopard wants to go; beyond this results in /usr/bin/ulimit: line 4: ulimit: ...
2
votes
1answer
2k views

ulimit soft limit for file descriptors - for a non-root user on CentOS 5.6

I am needing to increase the soft limit for "file descriptors", and make it effective for a non-root user (lets say user1). Ran these commands, while logged in as user1: >ulimit -a core ...
12
votes
3answers
7k views

tail -f not tracking file changes

I was recently looking into using tail -f to monitor some text files like so: tail -f /var/sometext However, when I did some testing, it doesn't seem to work. What I did was I created a new file and ...
0
votes
2answers
218 views

How many file descriptors accessing a given file?

On linux, is there a way to count the number of file descriptors open to a some file?
3
votes
3answers
5k views

Meaning of FDSize in /proc/PID/status

I'm looking for a way to find out the open FD limit under Ubuntu machines which doesn't have the /proc/PID/limits, namely EC2 machines. I have been looking into /proc/PID/limits, and found the the ...