linux

Resize a list of images in line command

I would like to resize a list of images, all in the directory. To achieve that, I use convert from imagemagick. I would like to resize image1.jpg image2.jpg ... into image1-resized.jpg image2-resized.jpg ... I was wondering if there is a method to achieve this in a single command line. An elegant solution could be often useful, not...

How to build a mozilla firefox NSAPI sample plugin with only Gecko-sdk on linux

Hi, I have built the gecko-sdk NSAPI sample plugins on Windows (using visual studio project files), but I would like to develop some plugins on linux platform. The mozilla site only covers setting up gecko-sdk for windows: https://developer.mozilla.org/En/Creating_XPCOM_Components/Setting_up_the_Gecko_SDK However, the gecko-sdk code ...

VPS hosting and root access

I've got rather poor knowledge of *nix virtualization capabilities and trying to clarify one thing. If one has root on host machine, does it always mean that he has root on all VMs of that host? If yes, then could there be a bogus setup where this is not true? I'm asking cause I heard two different answers to that question from two diff...

monitor a program's memory usage in Linux

Are there any tools available in Linux which graphically or textually display memory usage for a program? For example, if I write a C++ program and would like to verify that objects are being allocated and deallocated properly in memory, are there applications available that would visually show the objects being instantiated and deleted...

Linux: How do I force a specific network interface to be used?

This could be considered a continuation of this earlier SO question. Ideally, I'd like to jail a process into only using a certain interface, no matter what. It will be making TCP connections, sending UDP datagrams, and listening for UDP broadcasts. Currently, what I am doing is: Determine the IP of the interface to use. Create an IP ...

Vim and Ctags tips and tricks

I have just installed Ctags (to help with C++ development) with my Vim (or rather gVim), and would like to find out your favorite commands, macros, shortcuts, tips that go along with it... Share your best arsenal. What other Vim add-ons you would recommend for C++ on Vim development? EDIT What other add-on you would use in conjunction ...

Ubuntu Linux, what programming languages should I learn?

I am a windows OS users for couple of years. I want to try Ubuntu Linux. I have couple of questions I would like to ask here: Is Linux a good OS for learning programming languages? What programming languages should I learn in Linux? Should I stick to Windows OS or change to Linux OS if I want to be a great programmer in future? Some ...

Create directory with write permissions for the group

I create a folder in my java program (running on linux) with mkdirs() function of File object. The problem is that the folder gets only read permissions for the group. I need it to have also write permissions (in order to be able to delete its files later). What is the way to do it? ...

unfolding a file on linux

I have a huge textfile, approx 400.000 lines 80 charachters wide on liux. Need to "unfold" the file, merging four lines into one ending up having 1/4 of the lines, each line 80*4 charachters long. any suggestions? ...

How does commands-piping work in *NIX?

When I do this: find . -name "pattern" | grep "another-pattern" Are the processes, find and grep, spawned together? My guess is yes. If so, then how does this work?: yes | command_that_prompts_for_confirmations If yes is continuously sending 'y' to stdout and command_that_prompts_for_confirmations reads 'y' whenever it's reading it...

subversion web interface

I have recently installed subversion onto a linux server (CentOS) and everything works great. I am wondering if there are any web interfaces available for managing the repositories i.e. create / delete repositories, manage users and permissions, view revision history etc. The idea is that I can do everything via a web interface instead...

ISP-to-ISP fast file transfer?

Jeff Atwood talked about doing an ISP-to-ISP file transfer: http://friendfeed.com/e/63fb9e72-6cd5-a8ac-88dc-02ce720033f9/wow-just-did-an-isp-to-isp-file-transfer-650mb-in/ What is this? I tried Googling for it, but couldn't find anything. We have a need to transfer large amounts of data between two data centers, and this sounds inter...

How to get console window width in python

Is there a way in python to programmatically determine the width of the console? I mean the number of characters that fits in one line without wrapping, not the pixel width of the window. Edit Looking for a solution that works on Linux ...

Querying full DNS record

I do alot of programming in *nix using C gcc. I know how to do a basic gethostbyname(). BUt what if I wanted to pull down the entire DNS record. More to the point, is there a function that I'm missing that allows you to specify the specific record that you want to pull? Or will I need to do this manually through a UDP socket? ...

How to detect that arrow key is pressed using C under Linux or Solaris?

What is the best way to detect in a C program that arrow key is pressed under Linux or Solaris? As I know there is no standard C function that can do it. I don't want to use int86 function. I need to do it in a portable way. Edit: I am asking about console applications. ...

Which linux distribution fits a new learner of linux programming ?

As I come up with linux ,I found the commands are different in OpenSuse and Ubuntu. Which of them is suitable to somebody who was new in linux and want to master the command needed when programming and using linux? ...

How can I gzip standard in to a file and also print standard in to standard out?

I want to execute a command, have the output of that command get gzip'd on the fly, and also echo/tee out the output of that command. i.e., something like: echo "hey hey, we're the monkees" | gzip --stdout > my_log.gz Except when the line executes, I want to see this on standard out: hey hey, we're the monkees ...

How to print the line that matches my text using find in linux?

Hello I am using this command to find text within files in linux find ./ -type f -exec grep -l "Text To Find" {} \; The command works fine, but I would like to print automatically the line that contains the text or if it is possible the firs two lines above the text and the two lines behind the text. Also another suggestions to find ...

What is the underlying transport for D-Bus?

D-Bus allows programs to communicate. How is this IPC implemented? Unix domain sockets, shared memory + semaphores, named pipes, something else? Maybe a combination? ...

dynamic linker dependenciy info embedded in an archive

Dynamic libraries are nice. The have embedded information in then that help the runtime linker figure what other libraries the final executable needs to load. It also tells the executable what symbols will be loaded Static libraries, however, are a pain in the neck. The linker won't automatically link an archive's dependencies. This...