How should I run another program from within my C program? I need to be able to write data into STDIN of the launched program (and maybe read from it’s STDOUT) I am not sure if this is a standard C function. I need the solution that should work under Linux. Answer You want to use popen. It gives you
Tag: linux
Compile a PHP script in Linux
I know PHP scripts don’t actually compile until they are run. However, say I want to create a small simple program and compile it to a binary without requiring the PHP binary. How could I do this? I’ve seen a few IDE’s out there that would do this, but either they are all for windows or the Linux versions don’t
How can I improve my programming experience on my Linux Desktop? [closed]
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 4 years ago. Improve this question How can I improve the look and feel of my Linux desktop to suit my programming needs? I found Compiz and
How do I Send Email from the Command Line?
I would like to quickly send email from the command line. I realize there are probably a number of different ways to do this. I’m looking for a simple way to do this from a linux terminal (likely a bash shell but anything should do) and an alternative way to do this on Windows. I want to be able to
Building a custom Linux Live CD
Can anyone point me to a good tutorial on creating a bootable Linux CD from scratch? I need help with a fairly specialized problem: my firm sells an expansion card that requires custom firmware. Currently we use an extremely old live CD image of RH7.2 that we update with current firmware. Manufacturing puts the cards in a machine, boots off
How do you set up an OpenID provider (server) in Ubuntu?
I want to log onto Stack Overflow using OpenID, but I thought I’d set up my own OpenID provider, just because it’s harder 🙂 How do you do this in Ubuntu? Edit: Replacing ‘server’ with the correct term OpenID provider (Identity provider would also be correct according to wikipedia). Answer I personnally used phpMyID just for StackOverflow. It’s a simple
Combining values from different files into one CSV file
I have a couple of files containing a value in each line. EDIT : I figured out the answer to this question while in the midst of writing the post and didn’t realize I had posted it by mistake in its incomplete state. I was trying to do: and was getting a weird output. I later realized that was happening
How to generate a core dump in Linux on a segmentation fault?
I have a process in Linux that’s getting a segmentation fault. How can I tell it to generate a core dump when it fails? Answer This depends on what shell you are using. If you are using bash, then the ulimit command controls several settings relating to program execution, such as whether you should dump core. If you type then
Keep Remote Directory Up-to-date
I absolutely love the Keep Remote Directory Up-to-date feature in Winscp. Unfortunately, I can’t find anything as simple to use in OS X or Linux. I know the same thing can theoretically be accomplished using changedfiles or rsync, but I’ve always found the tutorials for both tools to be lacking and/or contradictory. I basically just need a tool that works
How do you kill all Linux processes that are older than a certain age?
I have a problem with some zombie-like processes on a certain server that need to be killed every now and then. How can I best identify the ones that have run for longer than an hour or so? Answer If they just need to be killed: If you want to see what it’s matching The -i flag will prompt you