linux

Copy to restricted folder with Ant (using Eclipse in Ubuntu)

Using Eclipse in Ubuntu Linux. I'm creating an ant task to delete a directory in my apache localhost directory (/var/www) and then copy in files from my Eclipse project. I have: <project> <target name="deploy"> <delete dir="/var/www/gds"/> <copy todir="/var/www/gds/src"> <fileset dir="src"> </fileset> </copy> <copy tod...

old rsync and spaces in filenames

Source directory is determined like so: SHOW=${PWD##*/} [email protected]:"/mnt/bigfish/video/TV/${SHOW}/" So it comes out something like: [email protected]:/mnt/bigfish/video/TV/The Name Of the Show With Spaces/ Then trying to run rsync like so: rsync -avz -e ssh "${SRC}" . But it tells me that ""/mnt/bigfish/video/TV/The" is...

Remotely Locking Gnome Screen Through SSH

How would you lock the screen of an active X session, through an SSH connection? My test platform is Ubuntu 10.04. The command "gnome-screensaver-command --lock" works when run from inside the X session, but fails from the SSH session, presumably because SSH doesn't have immediate access to X. Is there a workaround? ...

Virtualizing an Inline network appliance with VirtualBox (or VMWare)

My device, which is a Linux based IP in-liner is transparent to the network peripherals, that is, no IP address assigned to any of its interfaces. For the sake of the conversation, let's use ADSL connection as an example, while the device is inspecting the bi-directional traffic, the network is behaving same as if device was not there,...

i like to learn linux c and c++!!! help need

hello pals, i like to build an application using linux c and c++. i know c and c++ and experienced it in turbo c++ v3. but i need to learn and know about gcc or g++ dev in linux. i have done a dbms application using c++ using turbo c for ms dos system. now, i need to develop it across linux with good gui's and functionalities like netwo...

In kshell Make file Can i know the syntax of if else

In kshell Make file Can i know the syntax of if else where it should check different paths if (b folder found) select this path else should select other path or existing path ...

Nomachine setup problems RHEL3

I am getting this werror NX> 203 NXSSH running with pid: 11584 NX> 285 Enabling check on switch command NX> 285 Enabling skip of SSH config files NX> 285 Setting the preferred NX options NX> 200 Connected to address: 10.8.1.185 on port: 22 NX> 202 Authenticating user: nx NX> 208 Using auth method: publickey HELLO NXSERVER - Version 3.4....

:(){ :|:& };: Forkbomb?

Possible Duplicate: The following bash command will spawn processes to kernel death. Can you explain the syntax? :(){ :|:& };: running this fork() unlimited .. Can one please explain this bash script ? ...

Adding files to an MSI, from the command line?

I would like to add a custom config file for users downloading my MSI installer file. To do this I need to add a file to the pre-built MSI file just before download. Is there a command line way to do this? (bonus points if it works under Linux or Wine) ...

Mapping DMA buffers to userspace

hi everybody, i am writing a device driver on linux-2.6.26. I want to have a dma buffer mapped into userspace for sending data from driver to userspace application. Please suggest some good tutorial on it. Thanks ...

Only disk writes but iotop shows reads as well

Hi, I'd like to understand the following issue: A process is doing write sys call only, in an infinite loop. When I bring up iotop I would expect to see non-zero write speed and zeroed read speed related to that process. But iotop tells read and write can be equal (depending on single write size). Have a look at the C code: #include <...

Change two or more spaces to a single semicolon

Hi! I am struggling with formatting of a db2 query. I would like to replace 2 or more spaces in a string with a semicolon. I know how to do it with all spaces, the question would be how to change only 2 or more spaces :P Here is an example, i would like to change this: john doe 1900-01-01 california to john doe;1900-01-01;cal...

Is raw socket on loopback interface possible?

We are trying to communicate with the server listening on Linux loopback interface via raw socket and it seems like the server does not get a single packet from us. The packets we send are visible in Wireshark. Is raw socket on loopback possible at all? (Please, don't ask why we need it: it's too complicated to explain here) EDIT: this...

List files with absolute path recursive in linux

Hey dudes, This question is quite similar to http://stackoverflow.com/questions/246215/how-can-i-list-files-with-their-absolute-path-in-linux I want to get the name of file or folder with absolute path and date modified. This command almost does it: ls -lR /foo/bar | awk '{print $6,$7,$8,$9}' But it doesnt show the absolute path. ...

Linux shell strange situation

Does anyone know why the following script works? #a-random-junk-string echo HI The shell executes the echo command, and outputs HI. I thought that since there is no "!" after the "#", the shell would give an error. ...

Python - Using os.popen() to parse Unix "ls" - Problems with Killing Child Process

Hi all. From my understanding, os.popen() opens a pipe within Python and initiates a new sub process. I have a problem when I run a for loop in conjunction with os.popen(). I can't seem to CTRL+C out of the loop. Here is my code: for FILE in os.popen("ls $MY_DIR/"): os.system("./processFile " + FILE) Whenever I try to CTRL+C, ...

Find out default language on Linux

Is there a way to find out the default language of a Linux system from C? Is there a POSIX API for this? E.g. I'd like to have a string in human readable format, i.e. "German" or "Deutsch" on a German system, "French" or "Francais" on a French system etc. Is there something like this? Thanks! ...

appname: /lib/libc.so.6: version `GLIBC_2.8' not found (required by appname)

ldd -v appname linux-gate.so.1 => (0x00949000) libpthread.so.0 => /lib/libpthread.so.0 (0x00cea000) libm.so.6 => /lib/libm.so.6 (0x00a83000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00ba1000) libc.so.6 => /lib/libc.so.6 (0x0015c000) /lib/ld-linux.so.2 (0x0012f000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00b93000) Version informatio...

Python - When Is It Ok to Use os.system() to issue common Linux commands

Spinning off from another thread, when is it appropriate to use os.system() to issue commands like rm -rf, cd, make, xterm, ls ? Considering there are analog versions of the above commands (except make and xterm), I'm assuming it's safer to use these built-in python commands instead of using os.system() Any thoughts? I'd love to hear t...

Hudson fails with error "No space left on device" though there is enough space on the system

Hi, Hudson is repeatedly failing after building few projects with following stack trace with error "No space left on device", though there is enough space on disk. There are no limits of quotas on any folder. Below is output of different system commands. Here is key system information: Hudson ver. 1.361 executable-war /opt/hudson/hudso...