I need to periodically connect to a server from a Linux client and send some commands, so I wrote this script: The problem is that I need to wait between commands. This script sends the commands and disconnects too quickly, which the server detects, and drops the commands. It works if I open the connection from the command line and
How do you set your pythonpath in an already-created virtualenv?
What file do I edit, and how? I created a virtual environment. Answer The most elegant solution to this problem is here. Original answer remains, but this is a messy solution: If you want to change the PYTHONPATH used in a virtualenv, you can add the following line to your virtualenv’s bin/activate file: This way, the new PYTHONPATH will be
Is it possible to use arrow keys alone to expand tree node in package explorer in Eclipse on Linux?
When using Eclipse I browse through the package explorer tree using the keyboard arrows a lot. In Windows I can expand a collapsed node by pressing the → key. In Linux I need to press Shift + →. Is there a way to reconfigure this so that Shift is not required? Answer My version for GTK3 that behaves in more
How do I start gvim with a maximized window?
I would like to start gvim, from the command line, into a maximized window – how can I do this? I have no wish to always start in a maximized window (that is, not configure it as default in .vimrc), but rather choose to provide a parameter to the program. That is, running gvim <parameter(s)> should start the program in
extracting unique values between 2 sets/files
Working in linux/shell env, how can I accomplish the following: text file 1 contains: text file 2 contains: I need to extract the entries in file 2 which are not in file 1. So ‘6’ and ‘7’ in this example. How do I do this from the command line? many thanks! Answer Explanation of how the code works: If we’re
Rename JPG files according to date created
I want to rename all files in a certain directory. Renaming them to their date of creation. So if my file is Image1.jpg, it should rename into something like “Jan 16 12:09:42 2011.jpg” I want to do this through command line. I’ve been trying: But how can I combine this with mv command? And how will I iterate stat and
How to Generate PDF file from .docx from linux server?
We use on our production server: Ubuntu 10 server edition. We need to create a document that includes text , images and tables in the content and images in header and footer. Now we use http://phpword.codeplex.com/ to create it and it does a great job generating docx files but we need the pdf version of that file. How can we
How can I show the wget progress bar only? [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question
Is creating hardlinks from linux on a ntfs partition viable?
I have found a program that can make you save space by hardlinking files that are actually the same, thus leaving only one copy of the file on the file system with more than one hardlink pointing to it. The program is called hardlink. This is very nice as I have at last found a way to save space on
I need to debug PHP. What is my best choice?
I’m working on a web site under a Linux environment (Debian). I’m not an expert at Linux but I can handle it, and the website is made using PHP, MySQL, HTML, etc. The thing is, I’m using PHP for the server side. Right now, for testing, I installed Apache on my PC so I can test everything. But, it would