Skip to content

Tag: linux

Mercurial clone russian symbols like ‘?’

I work in Linux Red Hat 4.1.2-48 from PuTTy where set encoding UTF-8(PuTTy).I installed mercurial 2.2.1 and his repository. In ‘hgrc’ file of repository encoding set UTF-8 like : In repository i have files, which names are in utf-8 encoding, and have russian symbols. When i go to repositories dire…

Clearing output of a terminal program in Linux C

I want to clear the output of a C program produced with printf statements. I want to clear only one line, for example: [source] [terminal] [I hope] I will “DDDDDDDDDDDDDD” line in write other string. I just want the above A, B, C sentences to left. Only clear D sentences to change the other senten…

Using the Universal Chess Interface

I’m planning on making a program that interfaces with a UCI chess engine. I’ve been doing some research on it, but I want to get a little more information before I get more in depth with it. I was wondering if any of you could provide a few example “exchanges” between a UCI engine and …

How does cmd > /dev/null 2>&1 work?

I’m reading up on redirecting data to /dev/null and so I tried a simple test: If I try this: However, if I do this: That last solution is the desired solution, but what is happening with this 2>&1? My research so far suggest that 2 represents stderr and 1 represents stdout. So if I read it that w…

open email address by linux command [closed]

It’s difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 9 years ago. I want to make a scr…

Linux non-blocking sockets

Hello I want to implement non-blocking TCP sockets with an openSSL overlay. For now I use epoll, but isn’t there another methode (except poll or select)? Is it possible to associate a callback function to a descriptor? I read something about libaio, but I don’t know exactly what it can do… A…

How to set CLASSPATH in Linux to let java find jar file?

Under Linux I am trying to run a jar file as follows: while having CLASSPATH set to any of the following (the file is located at /home/user/plantuml.jar): In either case, no matter how I define CLASSPATH, the java command gives an error Unable to access jarfile plantuml.jar. What am I doing wrong here? Answer…

How to base64 encode image in linux bash / shell

I’m trying to base64 encode an image in a shell script and put it into variable: I’ve also tried something like this: but still with no success. I want to do something like this: I found this http://www.zzzxo.com/q/answers-bash-base64-encode-script-not-encoding-right-12290484.html but still have h…