linux

PHP Warning: Too many open files -- any ideas?

I'm running PHP 5.2 on Fedora, and I keep getting this warning after about 1000 iterations of my loop, which means the program has stopped working and needs to be restarted. I could set this up to exit after 1000 iterations and restart via a cron shortly thereafter, but that feels like the coward's way out. The loop follows; I should a...

Is "killall -r -9 ." guaranteed to work?

killall -r -9 . sends the 9 signal to all processes matching the . regular expression (i.e. it kills all processes). As it kills itself, the question is, will it kill itself last, therefore doing what it is documented to do, or maybe it will kill himself before finishing the work, leaving processes alive. Following @David's answer, it m...

Linux terminal output redirection

I want to redirect the output of a bash script to a file. The script is: #!/bin/bash echo "recursive c" for ((i=0;i<=20;i+=1)); do time ./recursive done But if I run it like this: script.sh >> temp.txt only the output of ./recursive will be captured in the file. I want to capture the output of time command in the file. ...

Best CMS for a corporate web presence?

I need a CMS for a corporate website. The corporation is a $200M company. We have a current site that's flash-based, but we'd like to replace it. It's not a very complex site at all, mostly brochure-like with press releases and management bios. I'd like a CMS that's fairly easy for a non-technical user, as our marketing department would...

Miminal Linux For a Pylons Web App?

I am going to be building a Pylons-based web application. For this purpose, I'd like to build a minimal Linux platform, upon which I would then install the necessary packages such as Python and Pylons, and other necessary dependencies. The other reason to keep it minimal is because this machine will be virtual, probably over KVM, and wil...

Building an application with "drawer" in Linux/Mac/Windows

I'd like to build an application with a "drawer" GUI element, like it is all over the place in Mac OS X. Is it possible to do so in Linux/Windows? Is it possible to build it crossplatform? ...

C code for ps command

Can you help to develop ps command of Linux in C language? Or is there any reference site which can help me? ...

Upstart calling script (for inserted USB-drive)

Hi, I know that Ubuntu (and Fedora) uses Upstart istead of the classical System V init daemon (SysVinit). I would like to know how to detect when a USB-drive has been inserted, mount it and copy some files to it. I would like Upstart to call my own script for this. If it is possible I would like Upstart to call the script for a specifi...

How can I access preferred applications from Java running on Linux?

We have a multi-platform Java-based system that spawns Robohelp for its online user guide information. It runs on a variety of Windows and Linux flavors. The default Robohelp code that is relevant to our Linux-based systems has a hard-coded link to "netscape" in the command line that it builds to spawn a web browser to view the help fi...

Bash scripting and user home from root account (Linux)

I'm writing an install script in bash for an application on Linux. This script copies some files into /usr/bin and /usr/share, so it needs to be executed by a root user, furthermore it makes an hidden directory in the $HOME dir for configuration files. Here is the problem: if a normal user wants to install the program, he needs to be r...

A process command in top

The problem comes up when you run couple of python scripts. in top at command, it shows only 'python' with these scripts. How to rename a process or otherwise tag it so that I could tell them apart in top? ...

can we modify the int 0x80 routine

how does linux 2.6 differ from 2.4? can we modify the source kernel ? can we modify the int 0x80 service routine? ...

LINUX equivalent of the DOS "start" command?

I'm writing a ksh script and I have to run a executable at a separate Command Prompt window. ...

resume/suspend enery star linux from command line

I have an ssh connection to a linux machine which is hibernated after some non-activity time. I want to make it resume, how do I do that? (writing to /dev/mouse to simulate mouse movement didn't do the trick) ...

Fast server side image generation library?

For a web project I need the possibility to generate jpg and animated gif images very fast. As server platform I will use Linux and the NekoVM (behind a apache via mod_tora). As there is no library for image generation for haXe and neko I am about to write a own one. Neko itself is written in c, and you can simply extend the VM writing ...

Can anyone recommend a (linux) utility to monitor logs in realtime?

Is anyone aware of any linux utility that can monitor logs in realtime and trigger events based on specific log content? Thanks. ...

SCP from one server to another without password prompt

What is the best way of doing SCP from one box to the other without prompting for password? There are two servers Server A 10.152.2.10 /home/oracle/export/files.txt Server B 10.152.2.11 /home/oracle/import/ If I want to transfer the files using scp from Server A to server B without being prompted to enter a password [running thi...

Redirect STDERR / STDOUT of a process AFTER it's been started, using command line?

In the shell you can do redirection, > <, etc., but how about AFTER a program is started? Here's how I came to ask this question: a program running in the background of my terminal keeps outputting annoying text. It's an important process so I have to open another shell to avoid the text. I'd like to be able to >/dev/null or some other...

Tools for displaying text, powerpoint style, in linux

I have a problem where I need a way to display a repeating series of "images" on a computer monitor. Specifically, given a series of text files, I'd like a way to display the contents of said files on a screen in a way much like a powerpoint would. My current thoughts are to find some tool that will take in a text file of some format, a...

Intercepting/Rerouting TCP SYN packets to C++ program in linux.

I am trying to find the easiest way to intercept TCP SYN packets sent by my computer in a c++ program. There are couple of options that I know. One would be monitor all traffic and just selectively work with the SYN packets doing nothing with the rest. Another option I came across was to use a packet filtering utility which will forward ...