linux

semaphores.h and threads.h in c

Hallo i need to install and libs for c.I am using a linux ubuntu o/s.Does anybody knows how i can install them? ...

Programmatically dial a series of numbers on a modem?

At work, we just got a large number exotic cellular devices that need to be programmed. To do this, you plug in a standard home telephone and dial a series of numbers, with pauses between them. To me, this is a task that begs to be automated, and we've got one Linux desktop (a test Asterisk machine) with a modem on it. So, how can I au...

Checking if subfolders exist linux

I'm trying to check if a folder has any subfolders without iterating through its children, in Linux. The closest I've found so far is using ftw and stopping at the first subfolder - or using scandir and filtering through the results. Both, are, however, an overkill for my purposes, I simply want a yes/no. On Windows, this is done by cal...

Getting timing consistency in Linux

I can't seem to get a simple program (with lots of memory access) to achieve consistent timing in Linux. I'm using a 2.6 kernel, and the program is being run on a dual-core processor with realtime priority. I'm trying to disable cache effects by declaring the memory arrays as volatile. Below are the results and the program. What are some...

Invalid argument when calling linux splice()

Hi I wanted to try out the splice syscall. I have this function - it should copy content of one file to another: static void test_splice( int in, int out ) { int i = 0, rcvd = 0; int filedes[2]; off_t off = 0; if ( pipe( filedes ) < 0 ) { perror( "Kicha pipe" ); exit( EX...

Seeing what files are run at startup (linux)

How do a check what startup scripts are run after I ssh into a machine? ...

Merging MP3 files in Linux Debian using PHP

What's the easiest way to merge the contents of several MP3 files into one using PHP 5.2 on Linux Debian system? I found some scripts that are supposed to do in PHP only, but they seem to be buggy. Perhaps there is a way to accomplish this task using command line programs, that I could install on my Linux Debian machine? ...

Java memory mapped files and swap

I'm looking at some memory mapped files in Java. Let's say I have a heap size set to 2gb, and I memory map a file that is 50gb - far more than the physical memory on the machine. The OS will cache parts of that 50gb file in the os file cache, the java process will have 2gb of heap space. What I'm curious about is how does the OS decide h...

recognise @param in Eclipse for c++?

Hi All I am using Eclipse (3.5.1), on Ubuntu 9.10 to write some C++ code. I was searching through endless settings but didnt find what I as looking for... How can I force eclipse to make @param,(@see, @return etc) to be bold in the comments? All the documentation will be generated with the doxygen so I dont really need anything else....

I was doing some moving around in SVN, and copying files back and forth. Now I can't use it.

I deleted files in my SVN, and dragged new files into it over WINSCP. Now, I try to add all the files and commit, but it won't let me. $ svn add * svn: '.' is not a working copy svn: Can't open file '.svn/entries': No such file or directory ...

How to determine values saved on the stack?

I'm doing some experimenting and would like to be able to see what is saved on the stack during a system call (the saved state of the user land process). According to http://lxr.linux.no/#linux+v2.6.30.1/arch/x86/kernel/entry_32.S it shows that the various values of registers are saved at those particular offsets to the stack pointer. He...

Is there any flash driver at the OS level loaded?

Hi, whether Is there any flash driver at the OS level (linux) to load or we need to write/develop ?, please suggest me. ...

linux ps aux command

How obtain the running process with absolute path name from ps command 13598 ? Ssl 0:00 /opt/something --run-id 2 -n /home/laks/f1 -l l.log I need the output as - /opt/something --run-id 2 -n /home/laks/f1 -l l.log ...

How can use webcam on my oleg firmware?

I have an Asus Wl 500gP. I installed Oleg firmware. How can I use my webcam? I installed w3cam. But as i try to launch, i get the error: [root@WL-0022150E7BD4 root]$ /opt/bin/vidcat Can't open device /dev/video ...

execute a command

I have script file where a command is stored in a variable First i got the command (assume "ls -l " command) cmd=`cat /proc/2345/cmdline` now doing echo $cmd outputs ls -l Now how to use $cmd to actually execute that command. which is ls -l ...

proftpd show only some hidden files

I have a problem with proftpd configuration: I enable ListOptions "-la" for to view .htaccess file but now i view .bashrc and other hidden files root directory must be /home/user, not home/user/public_html but i'm not like to show .bashrc and other hidden files I have any solution to mantain configuration and hidde some files? Thanks...

Is it possible to use Cocoa classes in an app that runs on Linux

I am need to parse a pdf file. I would like to use objective-c and Cocoa classes to do so, but I need the resulting application to run on Linux. Is this possible? My experience to Objective-C revolves around the iPhone so I'm relatively new to Cocoa. Thanks. ...

Program does not find so library, even though ldconfig knows about it

The path to libidl.so.7.1 is in ld.so.conf, and the library is in the cache as well: $ /sbin/ldconfig -p | grep libidl.so.7.1 libidl.so.7.1 (libc6) => /opt/itt/idl71/bin/bin.linux.x86/libidl.so.7.1 However, for some reason it is not found by ldd: $ ldd _pyIDLmodule.so | grep libidl.so.7.1 libidl.so.7.1 => not found Yet if I...

Is this time related process accounting stats gathering appropriate?

Based on sys/acct.h (V1, not V3) I need to gather some user usage statistics based on a parser that parser the acct file line by line. The parser will run and parse the entire file every N seconds and I need to gather user statistics accumulated since the last run (N seconds back). I'm not sure what will be the most appropriate way to do...

setitimer, SIGALRM & multithread process (linux, c)

Hello I want to use setitimer() (or alarm()) in multithreaded process in linux 2.6+ with NPTL-enabled libc. Which thread will receive sigalarm (SIGALRM) from kernel? Thanks. ...