Testing if a file descriptor is valid
I’d like to make a bash script output additional information to file descriptors (FDs) greater than or equal to 3, when they are open. To test whether an FD is open, I devised the following trick:
I’d like to make a bash script output additional information to file descriptors (FDs) greater than or equal to 3, when they are open. To test whether an FD is open, I devised the following trick:
I was wondering what differences and relations are between file descriptors and file names. Are they all used to access files? If yes, in the same way?
I’ve been getting java.io.IOException: Too many open files while running a Kafka instance and using one topic with 1000 partitions so I started investigating the file descriptors limits in my ec2 vm. I cannot understand which is exactly the limit for open files on a Centos 7 machine since all the following commands produce different results. The commands are:
Why is it that ssh -t doesn’t wait for background jobs to finish?
$ ls -og /proc/self /proc/self/fd lrwxrwxrwx 1 64 Jun 18 11:12 /proc/self -> 32157 /proc/self/fd: total 0 lrwx—— 1 64 Jun 22 2012 0 -> /dev/tty1 lrwx—— 1 64 Jun 22 2012 1 -> /dev/tty1 lrwx—— 1 64 Jun 22 2012 2 -> /dev/tty1 lr-x—— 1 64 Jun 22 2012 3 -> /proc/32157/fd What is … Read more
If I want to see all relevant log files of my apache2 server at once, I use