linux

How do you specify filenames within a zip when creating it on the command line from a pipe?

I'm trying to create a zip file from file contents which are being piped in, e.g. mysql [params and query] | zip -q output.zip - This writes the zip correctly, but when you open the zip, the file within it is called "-". Is there any way of specifying what the filename of the piped in data should be within the zip? ...

Who is refreshing hardware watchdog in Linux?

Processor AT91SAM9G20 kernel 2.6 Watchdog is enabled at bootstrap level and configured for 16 seconds. Watchdog mode register can be configured only once. When code hangs either in bootstrap or bootloader or kernel board is taking reboot. But once kernel comes up even though watchdog is not refreshed in any of the application board is no...

Gtk equivalent for winforms BindingSource

Does anybody out there know of a Gtk equivalent for a System.Windows.Forms BindingSource? I'm trying to get a windows based project to work under a gtk environment and can't use the Windows.Forms dll for this. So does anybody know of a BindingSource replacement either in mono or a third party dll? (I've looked at the gtk-databindings pr...

Seeking a true "tool-chain"

I just posted this as part of a reply to a question about the "best" bug-tracking software... Well, a tool on its own is just a tool. And while all speak of a toolchain, most just mean a loose collection of tools. Why not look for a problem tracker that "plays well with other children"? That is to say, interfaces well with your IDE, y...

Why would the ELF header of a shared library specify Linux as the OSABI?

All the standard shared libraries on my Linux system (Fedora 9) specify ELFOSABI_NONE (0) as their OSABI. This is fine - however I've received a shared library from a supplier where the OSABI given in the ELF header is ELFOSABI_LINUX (3). This doesn't sound like an unreasonable value for a shared library intended for a Linux system, ho...

Get ip address in C language

I need to display all the ip addresses from my local computer, using C language. How this can be done? Thanks. ...

What linux distro is better suited for Python web development?

Which linux distro is better suited for Python web development? Background: I currently develop on Windows and it's fine, but I am looking to move my core Python development to Linux. I'm sure most any distro will work fine, but does anyone have any reasons to believe one distro is better than another? ...

Linux: Adding named files to a zip archive, from a pipe

Is it possible to use something like: command.exe | zip >> archive.zip command2.exe | zip >> archive.zip ...and end up with two named files inside one zip archive. This way, if at all possible, would be neater than having temp files. ...

Handling spreadsheet data through the clipboard in GTK

Hi, I'm using a GtkSheet widget in PyGTK to power my application's spreadsheet, and it gives me an API to pull and push data out of cells. (I looked at using GtkTreeView, but it seemed to be too much work) What I don't understand is how to intercept paste requests (via ie. CTRL+V) so that I can process them rather than passing it throu...

moving files recurisively on linux

find ./dir -type f -iname "*.t[argz]*[bz2]" -print | xargs mv --target-directory=dir seems to fail on file that has spaces in the name. how to improve it? or alternative? thanks for answer below: my mv doesn't support --null or -0, I'm using cygwin: $ mv --help Usage: mv [OPTION]... [-T] SOURCE DEST or: mv [OPTION]... SOURCE... DIR...

Why does set -e cause my script to exit when it encounters the following?

Hi All, I have a bash script that checks some log files created by a cron job that have time stamps in the filename (down to the second). It uses the following code: CRON_LOG=$(ls -1 $LOGS_DIR/fetch_cron_{true,false}_$CRON_DATE*.log 2> /dev/null | sed 's/^[^0-9][^0-9]*\([0-9][0-9]*\).*/\1 &/' | sort -n | cut -d ' ' -f2- | tail -1 ) if ...

commandline overwrites itself when the commands get to long

I'm using Putty to log into a debian server. I have this odd problem that when a command I'm typing gets too long, it doesn't wraparound and start a new line, instead it starts at the beginning of the same line and starts to overwrite the prompt and then the beginning of the command. The command will run just fine, but it is really anno...

How should I handle "cast from ‘void*’ to ‘int’ loses precision" when compiling 32-bit code on 64-bit machine?

I have a package that compiles and works fine on a 32-bit machine. I am now trying to get it to compile on a 64-bit machine and find the following error- error: cast from ‘void*’ to ‘int’ loses precision Is there a compiler flag to suppress these errors? or do I have to manually edit these files to avoid these casts? ...

What is '$$' in the bash shell?

I'm beginner at bash shell programming. Can you tell me about '$$' symbols in the bash shell? If I try the following #> echo $$ it prints #>18756 Can you tell me what this symbol is used for and when? ...

evolution plugin for crm integration via webservices

I have built a webservice into my companies self developed CRM system that we are in the process of integrating Outlook to the CRM for calendar sync and recording of emails related to clients. I want to build a plugin for the gnome evolution mail client as I use it for my work mail/calendar as I primarily run Linux. I am familiar with ...

Communication between processes

I'm looking for some data to help me decide which would be the better/faster for communication between two independent processes on Linux: TCP Named Pipes Which is worse: the system overhead for the pipes or the tcp stack overhead? Updated exact requirements: only local IPC needed will mostly be a lot of short messages no cross-...

Linux distribution binary compatibility

Any way to make a binary in a Linux distribution and run it on another distribution with same architecture? Or I should compile and build it on different distributions? Is there any compatibility between Redhat, Debain based distributions for binary files? (I want to use my ubuntu binary file on fedora!) ...

SSL_CTX_use_PrivateKey_file fail under Linux

I'm trying to use the SSL_CTX_use_PrivateKey_file function in OpenSSL under Linux, but it returns false. The surrounding code has been ported from Windows, where everything runs fine. Is there something that must be done differently depending on system? I've compiled the OpenSSL library myself (default config etc) under Ubuntu and am us...

What happens to an open file handler on Linux if the pointed file gets moved, delete ....

Hi, What happens to an open file handler on Linux if the pointed file meanwhile gets: Moved away -> Does the file handler stays valid? Deleted -> Does this lead to an EBADF, indicating an invalid file handler? Replaced by a new file -> Does the file handler pointing to this new file? Replace by a hard link to a new file -> Does my fil...

What are the exact conditions based on which Linux swaps process(s) memory from RAM to a swap file?

My server has 8Gigs of RAM and 8Gigs configured for swap file. I have memory intensive apps running. These apps have peak loads during which we find swap usage increase. Approximately 1 GIG of swap is used. I have another server with 4Gigs of RAM and 8 Gigs of swap and similar memory intensive apps running on it. But here swap usage i...