linux

python simpleftpserver module ftp

i need a simple implementation of ftp that i can setup quickly for some experiments. is there an equivalent of python -m SimpleHTTPServer for ftp. Google sarch didn't help. i just need a simple implentation of ftp that is easy to setup. (so i don't have to go through the installation trouble for a lot of PC's). ...

What is the Effect of Declaring 'extern "C"' in the Header to a C++ Shared Library?

Based on this question I understand the purpose of the construct in linking C libraries with C++ code. Now suppose the following: I have a '.so' shared library compiled with a C++ compiler. The header has a 'typedef stuct' and a number of function declarations. If the header includes the extern "C" declaration... #ifdef __cplusplus ext...

wget .listing file, is there a way to specify the name of it

Ok so I need to run wget but I'm prohibited from creating 'dot' files in the location that I need to run the wget. So my question is 'Can I get wget to use a name other than .listing that I can specify'. further clarification : this is to sync / mirror an ftp folder with a local one, So using the -O option is not really useful, as I req...

SQL Server Trouble with Rails

Ok, I've been trying to get this to work like all day now and I'm barely any further from when I started. I'm trying to get Ruby On Rails to connect to SQL Server. I've installed unixODBC and configured it and FreeTDS and installed just about every Ruby gem relating to ODBC that exists. (This has been updated to show the output of isq...

LD_LIBRARY_PATH : how to find a shared object

I have a shared object ( libxyz.so ). Given LD_LIBRARY_PATH, how can find the exact location of this shared object? If i had a binary that depends on this lib, i would have used ldd on that. Here is the reason why i ask: I have a cgi script which works when using LD_LIBRARY_PATH set to say VALUE1. It does not work when the path is set ...

Pass potentially infinite number of arguments to array except a single numeric variable in a PHP command line script

I'm trying to make a PHP script that will take a potentially infinite number of URLs from the command line as arguments. I also need to pass an argument that only has a single numeric value possible (to specify timeout), e.g.: ./urltest.php 60 url1.com url2.com url3.com I'm not exactly sure how to specify argv[1] to be a single numeri...

What are the first operations that the Linux Kernel executes on boot?

After the boot loader hands execution over to the kernel, what happens? I know assembler, so what are the first few instructions that a kernel must make? Or is there a C function that does this? What is the startup sequence before the kernel can execute an arbitrary binary? ...

Errors in Excel extraction from Java using Apache POI cause need to restart service

I'm using Apache POI for extracting data from Excel into java. If there any error happens while the page is loading, then we have to restart the tomcat service. For example, I am extracting the data from Excel, if excel has no issues, then the incoming data is correct. If there is any error I get a null pointer exception, and after that...

Android - Is there an SDK way to find out the exact amount of memory consumed by a process identified by its pid?

I would like to check the memory consumption of each running processes individually, cat /proc//statm is ok, but opening a shell for each check is time consuming, and maybe not the best way. any advices how to do it with the SDK? ...

SVN explorer for linux

Hi Guys, I'm looking for GUI explorer for linux. Like Kafana: http://kafana.org/SvnExplorer/ CLI is fine but i would like to know if there is something GUI for as :) regards ...

How to debug C program

Hi, I am using linux, gcc, c. I have a make file. I want to debug my module. How can I do it? I don't want to debug a single file, I want to debug the whole module. ...

Linux QT OpenCL basic setup

Hi, what's the basic setup for Linux to compilie a C/C++ examples from OpenCL SDK? ...

How to redirect output from dd command to /dev/null ?

In shell script i need to redirect output from dd command to /dev/null - how to do that? ( dd if=/dev/zero of=1.txt count=1 ) 2>&1 /dev/null didn't work! ...

How to read data from keyboard and store it in a file, shellscript

Hi I have a file try.SPEC. This file contains a word "Version: 1.0.0.1" . Now I want to write a shell script which will read the version number from keyboard and insert in the file. eg- if the user enters the version number as 2.1.1.1 then the file will have Version: 2.1.1.1" instead of "Version: 1.0.0.1". like this i want that i must b...

How send html mail using linux command line

Hi, I need send mail with html format. I have only linux comand line and command "mail". Currently have used: echo "To: [email protected]" > /var/www/report.csv echo "Subject: Subject" >> /var/www/report.csv echo "Content-Type: text/html; charset=\"us-ascii\"" >> /var/www/report.csv echo "<html>" >> /var/www/report.csv mysql -u ***...

SSL_accept hangs... sometimes ( C, linux, openssl )

I'm currently working on an embedded linux system. There are two crucial client applications on the system that connect to an external server ( on another embedded system, all written in C ). The two apps use different certificates. The ssl connection works... At least usually, but from time to time an error occures: the server hangs on...

Daemonize() issues on Debian

Hi, I'm currently writing a multi-process client and a multi-treaded server for some project i have. The server is a Daemon. In order to accomplish that, i'm using the following daemonize() code: static void daemonize(void) { pid_t pid, sid; /* already a daemon */ if ( getppid() == 1 ) return; /* Fork off the parent process */ p...

SSH connection with NAnt script

Is there a way to make an ssh connection from a windows command line to a Linux machine not using putty? The Idea is to be able to use NAnt to issue linux commands on the target Linux machine. ...

After compiling PHP from source are the devel libraries still needed?

After compiling PHP from source are the devel libraries still needed? For example, I am building a newer version of PHP from source than is on our dev servers. I installed alot of [extension i.e. mysql, postgresql, curl, etc]-devel packages in order for the configure from the dev server setup to work. Do i still need these after php has ...

Which POSIX flavor of regex does Perl use?

Specifically, I'm using the Linux command: $ find . -regextype posix-extended -regex '<some regex>' ... I just want to make sure the POSIX type I'm using is the type Perl uses, since that is by far the one I am most familiar with. ...