linux

SVN - Delete existing repository

I made the mistake of modifying my original source after importing it into subversion. I now need to re-import but get a "File already exists:". How can I most cleanly remove my existing repository and add it back? ...

How to initialize a static char* with gettetxt() using local operating system environment?

Is there a standard or common way in C++ to handle static strings that need to be set by gettext()? Here is an example using the answer to Complete C++ i18n gettext() “hello world” example as a base just changing the literal hello world to a static char* hws and char* hw. It looks like hws is getting initialized to the default English t...

Trying to use PHP imap_open() with diff. linux interface(eth0:1, eth0:2). Any ideas?

Hey guys I am trying to use imap_open() with different linux interfaces but I can't find a possible solution. Nginx seems to have a module (http://wiki.nginx.org/NginxMailCoreModule) for mail servers but I am on Apache + PHP. cURL has something similar: curl_setopt($ch, CURLOPT_INTERFACE, "eth0:1") but can't find anything for PHP imap...

Detect when a USB device is connected in C

I am new to C and am trying to write a program that syncs files on my computer to a USB device. It currently works my me cd'ing to the directory that the device mounts to and typing "myprog init" which creates a .myprog file. The idea then is that when a USB device is connected my program checks for the .myprog file, if it finds it then ...

Shortest way to swap two files in bash

Can two files be swapped in bash? Or, can they be swapped in a shorter way than this: cp old tmp cp curr old cp tmp curr rm tmp ...

Running ASP.Net on a Linux based server

For a developer with a Java background, I am interested in exploring software development using the ASP.NET tools/platform as well. Java web applications (.jsp and servlets) can run on many server platforms. Question: Will a .NET web application be able to run in a Linux based server? Considering the scenario of not being able to use ...

Usage ideas for a cluster at a university

I currently am a student worker at a medium sized university. i work for the college of science (includes math, stat, comp sci, physics, chem, and biology) and as a "technician"; which basically is a catch all for basic trouble shooting and fixing faculty computer, setting up computer labs, writing custom programs, and administrating web...

VIM Background

When I am trying to change background in vimrc or directly in vim using set background=dark it doesn't affect my background at all, same with light option, however it looks okay when I run gvim. Is there a way to change background in vim without changing my Konsole settings? Thanks. UPD: Okay there is a difference between guifg/guibg an...

Error linking with GCC 4.3.2 on RHEL 5.3 and libstdc++.so. Any GCC gurus?

Trying to use the RHEL5.3 GCC 4.3.2 compiler to build my software on that platform. I get the following error no matter what I try when compiling with -O2, but it builds fine without optimization. Any ideas? /usr/bin/ld: myapp: hidden symbol `void std::__ostream_fill<char, std::char_traits<char> >(std::basic_ostream<char, std::char_tr...

Rsync help

Alright SoF, this is a little hard to explain, but i'll try my best. I have 2 identical drives. Let's call "S:" for source and "D:" for destination S: is the drive i keep all my files in (images, music, videos, documents, etc), and D: is a backup HD i (manually) back up every Sunday night. What i'd like to do is, backup S: into D:, w...

Shell scripting. Command substitution issue in my script.

Hi mates, On both, my Cygwin and my Linux box (Debian) I'm experiencing same issue: I'm working in a shell script with some kind of formatting ids, I want to add a backslash () before a slash occurrence (/). My sed script is working well at my terminal: # export someid="314-12345/08" # echo "${someid}" | sed 's/\//\\\//' Output: 3...

Ubuntu: allow non-root user to create and impersonate users

I want to write a server that receives and executes code on behalf of non-trusted parties. In order to make this more secure I want the code to be run as a user that is created exclusively for running this code and then deleted. How can I grant a non-root user the permission to create, impersonate and remove other users? ...

BASH add in line

hi i want write code to add in line for ex open inittab file and add c2:1235:respawn:/sbin/agetty 38400 tty2 linux c3:1235:respawn:/sbin/agetty 38400 tty3 linux c4:1235:respawn:/sbin/agetty 38400 tty4 linux c5:1235:respawn:/sbin/agetty 38400 tty5 linux c6:12345:respawn:/sbin/agetty 38400 tty6 linux <<~~~ i want add code here # Local...

Split Files using tar ,gz,zip or bzip2

Hello, i need to compress file and it's giganitc file :D the size is about 17-20 GB i need to split it to files in size around 1GB for each part , i tried to googleit and found way using split,cat command and it did not work at all in large files , also it wont work in Windows i need to extarct it on windows machine, thanks in advance ...

Dependency resolution in Linux

Hi, Under Windows I have used a program called dependency walker to examine the libraries the application is using. I was wondering how I can achieve this on Linux for a standard binary: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.0, stripped Thanks. ...

Java AccessControlException: keeping getting File IO error when trying to write log file

Hi, I keep getting an Java IO exception when the application is trying to initialize the log. Here is the stack trace. /var/lib/tomcat6/logs has permission for anyone to read and write to it. java.security.AccessControlException: access denied (java.io.FilePermission /var/lib/tomcat6/logs/socksserver.log write) java.security.Ac...

A command to download a file other than Wget

My host allows limited access to SSH and Linux commands. However, I can't use Wget believe it or not. I was hoping for something to download a file (.flv) from another server. Is there another command I can try? If there isn't, I could probably make use of Python, Perl or PHP (favourite) to achieve a file download. Is it possible? ...

J2EE webapp not creating files/folders

Hi All, I have a J2EE webapp that works perfectly when I run it on Eclipse and my local tomcat server (I've also tested on a friend's tomcat server), but not on a production server. This is the problem: The app is supposed to create a folder at a specific location (I've tried hardcoding this as well), but when run on the production s...

Counting the number of files in a directory using C

How can I count the number of files in a directory using C on linux platform. ...

Setting bash command-line variable to start my application

I'm pretty new to programming for Linux environments, so I don't exactly know what to search for in order to answer this question for myself. I need to understand how applications set the shell to accept a certain command to start them. For example, you can start Firefox from the command line by executing the command: firefox. I don't k...