I have a FILE *, returned by a call to fopen(). I need to get a file descriptor from it, to make calls like fsync(fd) on it. What’s the...
I wrote a program for an assignment which is supposed to print its output to stdout. The assignment spec requires the creation of a Makefile which when invoked as...
What is the difference between read() and recv(), and between send() and write() in socket programming in terms of performances, speed and other behaviors? 9 Answers 9
POSIX environments provide at least two ways of accessing files. There’s the standard system calls open(), read(), write(), and friends, but there’s also the option of using mmap() to...
I found this piece of code in /etc/cron.daily/apf #!/bin/bash /etc/apf/apf -f >> /dev/null 2>&1 /etc/apf/apf -s >> /dev/null 2>&1 It’s flushing and reloading the firewall. I don’t understand the...
I am looking for a way to get the output of a command when it is run from within a C++ program. I have looked at using the system()...
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow....
What is POSIX? I have read the Wikipedia article and I read it every time I encounter the term. The fact is that I never really understood what it...
In a shell script, how do I echo all shell commands called and expand any variable names? For example, given the following line: ls $DIRNAME I would like the...
What command can be used to check if a directory exists or not, within a Bash shell script? 3 36