linux

Linux/SVN Annoying folder access problem

This is a annoying problem and I have no idea what is causing it. java and projects are two svn repository directories in /home/svn. drwxrwSr-x 6 svn svn 4096 2010-10-19 19:36 java drwxrwsr-x 6 svn svn 4096 2010-10-18 17:20 projects They have the same permissions and files inside them have same permissions as well, which is drwxrwsr-...

How install Ubuntu without create a new partition

Hi, I want to try Ubuntu but i don't want to create a new partition on my disk. I have Windows XP. And i don't want to use Live CD. Thanks a lot. ...

Value of uninitialized semaphore

With reference to the semaphore implementation of semaphore.h in Linux, does an uninitialized semaphore sem_t default to 0? I just discovered that I had forgotten to initialize my semaphores to 0. Even so, the program worked fine without sem_init. (To all the purists, I completely agree that doing so is a bad practice.) ...

Noob questions for SVN checkout and network issues regading it.

We have a local server with SVN installed on it that we are using for development/testing purpouses. We would like to checkout the data from it to the live server that is somewhere out there. The only way to do that which I thought of was to use "svn checkout" from the live server, right? This way we do not need to FTP the changes to it...

Reconnect a timed-out session

Hi everbody, When I do an ssh connection, after a while, the connection time-out and my term freeze. I know Enter + ~ + . to unfreeze it. But is there another key sequence to reconnect instead ? Thanks ...

Fedora Equivalent of prstat /truss

Is there any command in Fedora core (10) which displays the system call being executed ? Scouring the internet only reveals top and likes... ...

problem with a kbhit implementation

This is the kbhit implementation that I found, but for some reason it just waits a key to be pressed instead of returning some result other than 0. It doesn't really function as kbhit... int kbhit(void) { struct timeval tv; fd_set read_fd; tv.tv_sec=0; tv.tv_usec=0; FD_ZERO(&read_fd); FD_SET(0,&read_fd); if...

What is the best Linux comand line server monitoring tool

I have a desktop at my house that has a SSH shell running htop that i use to keep an eye on my remote server. Do you know of any other tools that run in a shell that give more of an overview of the general server? Which maybe monitors online users, mysql, email etc... ...

ALSA: Power Saving Guidelines

Does anyone know of a set of power-saving guidelines for ALSA anywhere? For example... What is the best state to put the PCM stream in when not sound is being played? Is there anything that can be disabled in the lib that would save power? What NOT to do? ...

How to use C++ Boost library with pkg-config?

I successfully compiled and installed the latest version of the Boost library onto my linux machine. Now, I would like to be able to use pkg-config to ease the process of providing linking paremeters with GCC. Since I am too lazy for hand-coding my own .pc file, is there a script/tool which would automatically generate the needed .pc fi...

Fatal error - execute() php 5.2.13

Hello there, I have PHP 5.2.3, apache2.x, mysql 5.x on a Linux machine. EVerything was working fine untill yesterday. This morning all of a sudden one of the php files started to throw "Fatal error: Call to a member function execute() on a non-object in". I use PDO (prepare, execute, close cursor etc). Have you ever come across this ...

Can you explain the outcome of this Apache setup?

I had a very strange behavior with my Apache setup and then fixed it, however I would like to understand what really happened. My httpd.conf LOOKED like this: <VirtualHost *:80> ServerName mysite.com ServerAlias www.mysite.com ... <Directory "/path/to/mysite.com"> </Directory> </VirtualHost> === THEN, I wanted to add a 2nd d...

setting LD_LIBRARY_PATH using tomcat's setenv.sh script

I can't seem to get tomcat to properly set environment variables. I can run my .jar normally with my LD_LIBRARY_PATH set to the correct place, it finds my external libraries just fine. If I unset LD_LIBRARY_PATH and run the jar I get the error: java.lang.RuntimeException: Native code library failed to load: ensure the appropriate l...

Ubuntu server: manually changed /etc/passwd shell for my user, now can't login

I attempted to change shell from bash to tcsh via editing /etc/passwd file directly. Yeah, dumb move. I guess I've learned my lesson. Now I can't SSH into the remote server. Any way to fix this? PS. I can still connect to MySQL server via SSH tunnel. Any way to use this? ...

Clean up pthread resources when programme terminate

I have create a thread using pthread. My worker routine is a infinite loop. What is the design pattern to terminate and clean up all the resources of the pthread when my main programme exit? pthread_create(&thread, NULL, worker, NULL); void* worker(void* arg){ while(true){ //do something } } Thanks ...

Regarding grep command

I have two queries I do a grep and get the line number of the input file. i want to retrieve a set of lines before and after the line number from the inputfile and redirect to a /tmp/testout file. how can i do it. I have a line numbers 10000,20000. I want to retrieve the lines between 10000 and 20000 of the input file and redirect ...

how can i change different color schema in vi

how can i change different color schema in vi ...

Shell script: monitor task launch

Hi, In a script I'd like to monitor the process list in a way that, in order to continue the execution of the script, a certain process has to be started. I came up with something like: while ! pgrep "process_to_match" do sleep 10 done; # the rest of the script The problem with that script is that if the "process_to_match" is sta...

Apache user privileges in Centos

Hi I'm using the shell_exec command from a PHP script: $output = shell_exec('ls -l'); print_r($output); Terminal: php test.php Which results in the directory listing as expected. Switch to my browser I get no output. I need to grant privileges to the user 'apache' so that it can execute certain commands, or add the user to a group ...

Saving encrypted SVN password in IntelliJ Idea on Linux

I use IntelliJ Idea (Ultimate 9.0.3) on Linux at work, and our VCS is Subversion. Idea proposes to store my SVN password but then tells me it is unable to store the password encrypted, and asks if I want to store it in plain text. Well, no. This is on an Ubuntu 10.04 install with Gnome Keyring available. Any hints how I could convinc...