linux

Porting from MS Access

I've recently been given a MS Access .mdb database file and asked to make it usable in a Linux system. What I'm looking for is a way to convert the Access database to an open-source database such as MySQL or PostGres. I don't have MS Office, and it's a one-time project for a volunteer organization so I don't want to spend money if it...

How to keep process from exiting when a pthread exits?

I am writing a server program in C wherein every time a client connects, I create a new pthread to handle the client's requests. When all of the threads exit, however, then my program exits, as though a call to exit() has been made. This is a problem - how can I overcome it? Lets say the server is running, and 2 clients connect. Once t...

adding classpath in linux

Hi, export CLASSPATH=.;../somejar.jar;../mysql-connector-java-5.1.6-bin.jar java -Xmx500m folder.subfolder../dit1/some.xml cd .. is the above statement for setting the classpath to already existing classpath in linux is correct or not ...

Videos about Linux and Open Source

I'm looking for some videos about the history of Unix/Linux and Open Source Software. I know (and have) Revolution OS. Are there any others? Edit: I'm a teacher and need resources to show students. Edit: I found Revolution OS on Google Video. ...

How painful can a Linux to OpenSolaris migration be?

We have a business application that basically runs on an os-independent stack (tomcat+java+mysql) but we have always run it redhat or centos. There is a customer that is insisting to run it on opensolaris for his own reasons (an expensive everything-is-included support agreement with Sun). How painful can such a migration be? We have ...

Is there a cheaper way to find the depth of the call stack than using backtrace()?

My logging code uses the return value of backtrace() to determine the current stack depth (for pretty printing purposes), but I can see from profiling that this is a pretty expensive call. I don't suppose there's a cheaper way of doing this? Note that I don't care about the frame addresses, just how many of them there are. edit: These...

Service menu on Gnome desktop environment

Is there any way to create a service menu on Gnome? In kde it's simply a .desktop file placed in $HOME/.kde/share/kde4/services/ServiceMenus/ Does it exist a similar thing in Gnome? ...

Run a linux system command as a superuser, using a python script

I have got postfix installed on my machine and I am updating virtual_alias on the fly programmatically(using python)(on some action). Once I update the entry in the /etc/postfix/virtual_alias, I am running the command:sudo /usr/sbin/postmap /etc/postfix/virtual_alias 2>>/work/postfix_valias_errorfileBut I am getting the error:sudo: sorry...

How to add assembly code in Linux

I am writing a Linux kernel module on Fedora core 6 and I am wondering if anyone could tell me how to add the assembly code shown below to my program. The assembly code was written for Windows and I have no idea how to convert to Linux kernel program. #ifdef _MSC_VER unsigned char lookKbits(char k) { _asm { mov dl, k ...

Linux - identify process owning a specific address in physical memory

Under Linux, how can I tell what specific process owns / is using a given address in physical memory? I understand that this may require writing a kernel module to access some kernel data structure and return the results to a user - I need to know how it can be done, regardless of how complicated it is. ...

Open and read Excel from a Linux based C program?

I am trying to locate a set of source code that would allow me to open and read the contents of an Excel file on Linux from within a C program. I dont really want to link it to OpenOffice SDK if I can find something that just does these two things. carl ...

How can I determine max memory usage of a process in Linux?

I have a program that's running in two different modes. I want to compare the two modes with regard to runtime and memory requirements. Determining runtime is easy with using time. In fact, in this case it's really easy because the program reports both the CPU time and the wallclock time at the end of the test. However, determining m...

Need to monitor directory change, and perform action

1st of all: I'm not programmer, neither Linux guru, just have to work with Linux, Oracle, shell scripts. My current task is to monitor a table in Oracle (tool: sqlplus), and if it contains a certain row, then watch a linux directory for a growing tmp file, and log its attributes (e.g. ls -l), in every 5 second. The most important part...

Possible to assign a new IP address on every http request?

Hi Is it possible for me to change or assign my server a new IP address every time it needs to make a http request with commands such as wget? Thanks all Update The reason for this is exactly what the Tor project is trying to achieve. I do not want to leave a trace of what requests my server makes and I thought constantly changing my...

sed scripting - environment variable substitution

Hi all, I have sed related question: If I run these command from a scrip: #my.sh PWD=bla sed 's/xxx/'$PWD'/' ... $ ./my.sh xxx bla Which is fine. But, if i run: #my.sh sed 's/xxx/'$PWD'/' ... $ ./my.sh $ sed: -e expression #1, char 8: Unknown option to `s' I read in tutorials that to substitute env. variables from shell you need...

Linux thread resource leak?

In one of the multithreaded Linux application, the application quits without deleting the thread. Will this cause any thread resource leakage. If this application is launched many times during the course of the day, will the system crash? ...

Any tool other than Valgrind to monitor memory usage for running processes in Linux?

This answer to this question says that there's no way to attach Valgrind to an already running process. Are there any other tools for Linux that can report on memory usage but can attach to a process that's already running? ...

Suggestions for a linux flavour

Duplicate: http://stackoverflow.com/questions/404520/best-linux-distribution-for-programming-closed I am looking for a Linux flavour suggestion from you guys. I have checked Ubuntu and Fedora and both looks promising. Which one I should go for or is there a better one? Following will be my usage Programming (mostly C++). Running ...

Platforms for running memcached

Is there any reason in particular why it's recommended to run memcached on a Linux server? Is it really that bad an idea to run it on a Windows Server box? What about an OS X Server box? The biggest reason that I read is about TCO. In other words, for each windows box that we run memcached on, we have to buy a copy of Windows Server ...

Discovering linux disk configurations from the command line.

How can I discover if a remote machine is configured with or without hardware or software RAID? All I know is i have 256GB at present, I need to order more space but before I can I need to know how the drives are configured. df lists the drive as: /dev/sdb1 287826944 273086548 119644 100% /mnt/db and hdparm: /dev/sdb:...