linux

Implement data encryption for network-based application, help with OpenSSL

Like in the title, I want to encrypt data, which is sent over network. Because I decided to use TCP and/or SCTP protocols I cannot use SSL/TLS. That's why I want to implement my own solution based on SSL idea. Two peers will exchange symmetric algorithm's key (AES0 using asymmetric algorithm (RSA) first and then continue communicatio...

distro for linux kernel development

Which is the best light weight distro for learning linux kernel development. It should have lot of debugging and profiling tools available along with it :) ...

parameter for shell scripts that is started with qsub

Hello how can I parametrize a shell script that is executed on a grid (started with qsub) ? I have a shell script, where I use getopts to read the parameters. When I start (qsub script.sh -r firstparam -s secondparam ..) this working script with qsub I receive error messages, qsub: invalid option -- s qsub: illegal -r value ...

High %wa CPU load when running PHP as CLI

Sorry for the vague question, but I've just written some php code that executes itself as CLI, and I'm pretty sure it's misbehaving. When I run "top" on the command line it's showing very little resources given to any individual process, but between 40-98% to iowait time (%wa). I usually have about .7% distributed between %us and %sy, wi...

What do ampersand in arithmetic evaluation and numbers with x's mean in Bash?

I'm curious about what exactly the following comparison does, in as much detail as possible, especially relating to the 0x2 and the & characters and what exactly they do, if [ $((${nValid} & 0x1)) -eq 1 ]; then #...snip... fi if [ $((${nValid} & 0x2)) -eq 2 ]; then #...snip... fi ...

How to execute a script on linux ssh...?

How do I execute a script on ssh? I need to execute: /scripts/makecpphp So I have tried "run /scripts/makecpphp" but it didnt work. Any help would be greatly appreciate. I know for sure that that file exists there. ...

Customized UI - Windows or Linux?

I'm not sure if this is possible, but I'll give it a go. I'm creating a device where I have to add a customized user-interface instead of the normal operating system UI. I'm thinking of installing Windows CE (or .NET MICRO) or Linux, but I'm not sure which OS would let me do this. Also, the software (UI) would load instantly and doesn't...

C code changes terminal text color; how to restore defaults? Linux

I have a C file running on Linux. It prints some lines in red (failures) and some in green (passes). As you might expect, it uses escape codes in the printf statements as follows: #define BLACK "\033[22;30m" #define GREEN "\033[22;31m" printf(GREEN "this will show up green" BLACK "\n"); If the BLACK at the end wasn't there, the ter...

Flexbuilder 3 Install under Linux

Solving this problem would make my life a hundredfold easier, because working in Windows XP blows, and save for this one Adobe POS, I would be working entirely in Linux. The Flex project I'm trying to build can be built successfully on Flexbuilder 3 Pro (licensed version, 3.2 SDK) in both Windows XP and Mac OS X. I followed these instr...

GDB and shared object libraries with SIGILL

I am trying to debug programs on an ARM target device with GDB and GDB seems to be acting odd with regards to ld-linux.so.3. It's a simple program that just printf("Hello World"). Approximately half the time, gdb it will run and the other half jump to this error after typing run: Program received signal SIGILL, Illegal instruction. 0x2...

Best approach to making sure your Linux & GTK application supports i18n and localization?

I am interested in the "best approach" to making sure your Linux & GTK based application is built from the ground up to support i18n and localization with minimal amount of pain. I've always heard that localization can be a real pain point to implement, so I am wondering if there is a good guideline and/or approach that can help make it...

What's the meaning of this sed command? sed 's%^.*/%%'

I saw a bash command sed 's%^.*/%%' Usually the common syntax for sed is sed 's/pattern/str/g', but in this one it used s%^.* for the s part in the 's/pattern/str/g'. My questions: What does s%^.* mean? What's meaning of %% in the second part of sed 's%^.*/%%'? ...

RSS/VSS are growing unstopped until all memory & swap on machine ends

Hi, We have a weblogic 9.2 server with Java1.5.0.16 on RHEL5.3 that we deploy on it a web service and an Alfresco content management system. We were running it fine for ~3 years on HP-UX i11.23 and a month ago we moved to Linux RH5.3 and from time to time (it happened 3 times) we noticed that the process is starting to use more and mor...

Problem installing j2re-1_4_2_19-linux-i586.bin on 2.6.32-5-xen-amd64

Hi there, i got a little problem when i try to install the j2re on my linux-xen.... it tell me this: ./j2re-1_4_2_19-linux-i586.bin: line 383: ./install.sfx.5488: No such file or directory. Ive checked out some forums and nothing... anyone has any idea?¿ Thanks ...

Create read only folder in C language.

Hi, I am using C language and Linux OS as my programming platform. And I want to know how can I make a read-only folder programmatically? Is there any mkdir command in C language for Linux or Unix-like system? Thanks. ...

Sorting in bash

I have been trying to get the unique values in each column of a tab delimited file in bash. So, I used the following command. cut -f <column_number> <filename> | sort | uniq -c It works fine and I can get the unique values in a column and its count like 105 Linux 55 MacOS 500 Windows What I want to do is instead of sorting by th...

Git : ignore symbolic links

Is it possible to tell Git to ignore symlinks ? I'm working with a mixed Linux / Windows environment and, as you know, symlinks are handled very differently between the two. ...

Logical error in prime numbers.

Hi, I am new to assembly language. I have written a program for taking an input and then displaying whether the number is prime or not. Here is my source code. .intel_syntax noprefix .include "console.i" .data Num: .long 0 .text ask: .asciz "Enter a +ve number : " ansp: .asciz " is prime." ...

32/64 bit eclipse

On 64-bit openSUSE Linux, can a 32-bit eclipse running with 32-bit JVM compile code for a 64-bit system? Is this setup possible? (Installing and running eclipse/java 32-bit on a 64-bit system) ...

How to find out that a running Linux machine is idle or not

I have my laptop, most of the time connected to internet, the speed of internet is quite slow. When i download some big files, then i am not able to surf web sites because of slow speed of internet. My plan is to write a bash script and run it in cron jobs, when it finds the system is idle then it starts a process(the process which will ...