linux

how to login in a ldap auth based network with fedora 13?

how to login in a ldap auth based network domain using the fedora 13? i want also to access the drivers, printers, etc. ...

Linux low latency tcp stream.

I have an embedded application that has this requirement: One outgoing TCP network stream need absolute highest priority over all other outgoing network traffic. If there are any packets waiting to be transferred on that stream, they should be the next packets sent. Period. My measure of success is as follows: Measure the high prior...

STL containers memory issue

I'm implementing my own graph library in linux (Fedora 10 and CentOS 5) with gcc 4.3.2 and using STL containers then I found some problems with memory. When I build my graph, I use a lot of memory enough to be view in top or another memory usage tool. I'm sure that I'm deallocating that memory (I reviewed the code again and again and I u...

changing a process's parent

Is it possible to change a process parent? ex: parent A has Child B can I make the parent of B is the Init process without killing A? ...

Bash: Permission denied when trying to open a file

I recently decided to try to learn some bash scripting and as a fun exercise I decided to make a script to open up a daily file for me to write notes in whenever the script is run. It worked fine until I logged out and back in to the system later, when I received an error /usr/local/bin/notes: line 45: /home/MY_USERNAME/notes/2010-10-0...

A linux version of cygwin?

I'm looking for a linux program that is simple and text-based, like cygwin, thats actually linux. I feel to much is missed out by cygwin like nano syntax highlighting and general linux programs. Is there any thing that runs with command prompt, like cygwin, that is a full text-based linux OS. ...

What are some good Linux distros for current development use?

Main concern is that when I try CentOS I see that GCC is out of date. Is there a distro that is geared towards developers? ...

What tools are available to auto-format Ruby/Rails Code

I'm currently using GEdit with several plugins to do Ruby on Rails development. One thing I would like to have is a way to automatically format my source files (.rb, .*.erb, etc.) Ideally it would be something that I could call from the command line and/or GEdit. Command line tool would be nice, because I can set up a Git hook to auto-...

rename file problem under subversion

I have a problem when I rename the checked out working file from Tortorise under subversion. After rename the local file, my local file got lost. I want to know how I can get my local copy back, either from Tortorise or other? ...

pthread_exit vs. return

I have a joinable pthread runner function defined as below: void *sumOfProducts(void *param) { ... pthread_exit(0); } This thread is supposed to join the main thread. Whenever I ran my program through Valgrind I would get the following leaks: LEAK SUMMARY: definitely lost: 0 bytes in 0 blocks indirectly lost: 0 bytes in 0 bloc...

Why PMP (poor man's profiler) don't work on nginx?

There is one very useful gdb "script" called poor man's profiler. It calls this command: gdb -ex "set pagination 0" -ex "thread apply all bt" --batch -p $pid It works well for most linux processes, but don't work for nginx web server. Normal output: # gdb -ex "set pagination 0" -ex "thread apply all bt" -batch -p 5286 Using host lib...

Sorting content based on first field and outputting second field into new file

I've got a file which is like this: 3 EOE 5 APPLE 6 NOBODY i need to parse this and output all with '3' in the first column into filename.3, '4' into filename.4, etc... from the unix prompt ...

help sending command to process using /proc

I have an application which runs as a process on a ubuntu server. This application has command line gui which allows me to type in a command, then press enter and the command runs. I am able to script the determination of the process id. I then script the following to send it a command: # echo "command" > /proc/<PROCESSID>/fd/0 I have...

Where is skbuff.h file in Ubuntu?

I read in many books that path for skbuff.h is usr/include/linux. I searched in Ubuntu, fedora and backtrack but can't find the header file. Can anybody help me to find this file? Thanks in advance. ...

How to useradd with multiple parameters

I'm trying to use multiple parameters with the useradd command in linux, and I'm not really sure exactly what I should do?? I have tried the following: useradd -b /home/ -g admin -m -p PASSWD -s USERNAME Needless to say, it doesn't work. Can anyone tell me the correct syntax to get this working? Thanks, your help is always appreciated...

[mdadm] Shut down hard drive (RAID1)

I'm currently working on a Linux laptop having 2 hard drives on-board. If it runs on battery, I want to be able to shut down the second hard drive and re-enable and sync it, if I am back on ac. How can I disable and later enable a harddrive with RAID1 and mdadm? Thanks. ...

bash_completion for Rails 3

Is there any bash_completion script ready for Rails 3? ...

Background process is exiting faster than I can add its pid for management.

I'm creating background processes in C using fork(). When I created one of these processes, I add its pid to an array so I can keep track of background processes. pid = fork(); if(pid == -1) { printf("error: fork()\n"); } else if(pid == 0) { execvp(*args, args); exit(0); } else...

Missing MySQL in PHPinfo on Ubuntu Linux

I am working on a newly built Ubuntu server with Apache2, MySQL 5 and PHP 5.3.2 . It seems something is incomplete in the configuration. When I call phpinfo() there is no MySQL section in it. However, the "Additional .ini files parsed" section shows "/etc/php5/apache2/conf.d/mysql.ini, /etc/php5/apache2/conf.d/mysqli.ini, /etc/php5/apac...

Can I automatize pppoeconf?

Hello everyone, I am a Ubuntu user (10.04 as of now), since I use it, over a year, I have to manually enter the command $ sudo pppoeconf everytime I turn on the computer and want to connect to the internet, the I click enter some times, enter my password of my internet provider, then I click enter some more times to have internet. I ha...