linux

Pulling MX record from DNS server

I am writing an application that is requiring me to do a DNS lookup for an MX record. I'm not sure if anyone has had experience doing this kind of work but if you do, any help would be appreciated. EDIT: The thing that I'm going for is an application that will send an e-mail alert. The problem is I need to have the application be able...

How to extract text from a PSD file?

I need to extract the text from the layers in a photoshop PSD file on linux. Does anyone know how to do that? Gimp rasterizes the text and you can't copy and paste it. Also, note that I do not own the Photoshop program. ...

Executing The Same Command In Multiple Shell Scripts

I'm using the following to to tee output of a command into a file: logs/`basename $0`-`basename $1`.`date +%F--%R\`.log And since this same syntax belongs in several different shell scripts, I'd really like it to only appear once. My first thought was to put it in another shell script: export LOGFILE=logs/`basename $0`-`basename $1`...

Building grep strings dynamically

I am writing a shell script to do a "tail" on a growing log file. This script accepts parameters to search for, and incrementally greps the output on them. For example, if the script is invoked as follows: logs.sh string1 string2 it should translate to: tail -f logs.txt | grep string1 | grep string2 I am building the list of grep ...

Where do I download a Java 6 JDK for Linux?

May be I am getting old, but I can't find it... ...

HID read() command

Dear All, Do any one knows the procedure of NON-BLOCKING reed() command for HID events in LINUX Currently I am using read(fd, ev, sizeof(struct hiddev_event) * EV_NUM); But it goes to BLOCKING stage, when my HID pointing device is NOT towards the sensoer bar Kind regards, Madni ...

storing binary data in mysql

I have a PDF file on a local machine. I want to upload this file into a BINARY BLOB on a SQL database. Other approaches mentioned here [http://stackoverflow.com/questions/17/binary-data-in-mysql] all use PHP. I want a simple clean way to upload this PDF file on the Linux command line. Unfortunately, I do not have access to the remote fil...

Concept of "Performance Counters" in Linux/Unix

Windows has a Performance Counters infrastructure. The OS provides some common counters, and I can go add my own. What is the corresponding concept in Linux/Unix? ...

linux disassembler

Hi how can I write just a simple disassembler for linux from scratches? Are there any libs to use? I need something that "just works". thank in advanced ...

Install and build Boost library in Linux

I'm just following Boost Getting Started article. I've installed with Bjam and I could see include files and library files(.a, .so). #include <boost/regex.hpp> #include <iostream> #include <string> int main() { std::string line; boost::regex pat( "^Subject: (Re: |Aw: )*(.*)" ); } If I build above code using this command... g...

Are there any standard exit status codes in Linux?

A process is considered to have completed correctly in Linux if its exit status was 0. I've seen that segmentation faults often result in an exit status of 11, though I don't know if this is simply the convention where I work (the apps that failed like that have all been internal) or a standard. Are there standard exit codes for proces...

How to copy a LINUX file using c# remotely ?

I have to make a duplicate copy of a file located on a Linux Server and then rename that with another name. For example there is existing file in /temp/100.txt . I have to copy that file to same location with another name i.e. /temp/101.txt . How can I achieve that with c#. We have that folder /temp available as NFS folder from IIS we...

install svn on redhat

how do I install svn on a Redhat machine? tried to do it with yum install svn - but it didn't find svn. my machine details is Red Hat Enterprise Linux Server release 5.2 (Tikanga) found it with this command /etc/redhat-release thanks ...

Designing a Linux-based system for transferability of ownership/admin rights without total trust

Inspired by a much more specific question on ServerFault. We all have to trust a huge number of people for the security and integrity of the systems we use every day. Here I'm thinking of all the authors of all the code running on your server or PC, and everyone involved in designing and building the hardware. This is mitigated by reput...

What strategy should i use to install smtp server on linux ? for multithreaded service

Hello all i need to implement service that sends users reminders via email , this should be multithreaded scheduled system this part is fine , but i need to install and configure smtp server for out going emails on the server , this is i have no clue how to do and what to expect my tools will be lamp combo on some Linux slice . ...

BAsh Script -- logname validation

How do I validate that the LOGNAME is present in a bash script if [`logname`]; then echo -e \\t "-- Logname : `logname`" >> $normal_output_filename fi The above gives me an error line 76: [logname]: command not found ...

Is there a definitieve resource that documents navigation of the linux /proc and /sys filesystems?

We use the /proc and /sys file systems in Linux to discover various types of system configuration information. Typically, we spelunk around through the different files and directories until we find the information that we need. I'm wondering if anyone knows of a definitive resource that documents how one would navigate through the /pro...

Pthread mutex assertion error

I'm encountering the following error at unpredictable times in a linux-based (arm) communications application: pthread_mutex_lock.c:82: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed. Google turns up a lot of references to that error, but little information that seems relevant to my situation. I was wondering if ...

Smallest Xwindow for Linux

Hi, What is the smallest, friendliest Window Manager that I can run on Linux. I currently use Gnome which is a bit heavy. All I would be needing it for is to run Firefox. Xfce? ...

How does blocking mode in unix/linux sockets works?

Does blocking mode put that particular task in a "Process Wait" state, as i think non-blocking sockets needs a "busy-wait" or "spin-lock" implementation, explicitly from the user. Or blocking mode sockets are nothing but implicit-implementations of busy-wait by the kernel. In locking mechanisms like semaphores/mutexes/monitors a lock is...