linux

Creating a local Fedora repository with *Anonymous* rsync

I am trying to setup a local Fedora repository in a local LAN network. Unfortunately I cannot run rsync in daemon mode because I'm behind a firewall on which I have no control. Could anyone guide me on how to setup rsync using shell? I tried the mirrors in http://mirrors.fedoraproject.org/publiclist , I get prompted for passwords. ...

How to differentiate executable file and autorun file

What is the difference between the executable files of a compiled program and an autorun program? ...

Calculate checksum for a directory

Hi, i need to calculate a checksum for a directory in question. It should return one number for this directory, not for each file inside it. Can you, quys, help me with it ? Thanks. ...

What's wrong with those strongswan config files?

Hi I am trying to setup an ipsec tunnel between 2 linux boxes (archlinux) with strongswan 4.4 but I have got errors on both machines that I couldn't solve. moon: ipsec.conf - strongSwan IPsec configuration file basic configuration config setup # plutodebug=all crlcheckinterval=180 strictcrlpolicy=no ...

Wordpress implementation for multiple site in single Linux Server on DMZ

Hi All, I'm planning to install Wordpress on Linux system for my company website, does this scenario works with Wordpress ? Single Wordpress install but can have multiple domain eg: www.team1.com www.team1.com/product2 www.team1.com/product3 www.team2.com www.team2.com/product2 . . .etc do i need to perform multiple install of Wordpr...

How to open a file with it's relative path in Linux?

I have a program which opens a file by using a relative path (for instance '..'). Now the problem is, when I execute the program from another directory, the relative path is not relative to the program but relative to the working directory. Thus, if I start the program with '/path/to/program/myprog' it fails to find the file. Is there ...

How can I create a WinZip compatible AES-256 encrypted zip file from PHP on Linux?

I have to create a WinZip compatible zip file from a PHP application on a linux box, and it must use AES 256 encryption. I have found a few solutions for PHP on Windows, but they don't help me! A PHP package would be great, but if I need to, I can always have my PHP code run exec() or something to run a linux command line utility. Any s...

How does Hudson work standalone on Linux?

I need to know the mechanisms and flow for starting up Hudson, so I can figure out what's wrong. When you type in nohup java -jar $HUDSON_WAR > $HUDSON_LOG 2>&1 & (using real values for those variables, of course), what exactly happens? I've been a software engineer for 10+ years but mostly in embedded, and web services are out of my...

Re-Downloading Linux (Kernel) Source

Hi All, yesterday i downloaded source of my virtual linux kernel and tried to compile it. It compiled indeed but could not boot from the new kernel. Then today i decided to re-downloading after removing the folder where source files are located but it said "linux source is already the newest version" I use the command below: sudo a...

Monitor linux and windows servers from windows

Hi, currently i've got 5 servers (3 with windows server and 2 with linux). I am looking for a tool to monitor all the 5 servers from a windows machine (not the linux one, as i'd be using Nagios). I mean, i want to monitor all the 5 servers from one of the 3 Windows Machines, and i wonder if there exists any software for doing that. Thank...

Why Ubuntu eats more power than Windows?

I play full screen video with maximum volume or browse the Web with WiFi. Under Windows 7 my laptop works ~5 hours. Under Kubuntu 10.10 only ~2 hours. I've got Acer Aspire 1810TZ. Battery wear degree 90%. Installed: acpid acpi-support pm-utils upower Not installed: laptop-mode-tools I like Linux, don't want to change it. What to d...

Process terminated by signal 6, core shows kind of loop in libc

Hi On analysis of the core of a process (terminated by signal 6), on LINUX, stack bt shows : Core was generated by `/opt/namsam/pac_rrc_qx_e1/bin/rrcprb'. Program terminated with signal 6, Aborted. #0 0x0000005555ffb004 in epoll_wait () from /lib64/libc.so.6 (gdb) bt #0 0x0000005555ffb004 in epoll_wait () from /lib64/libc.so.6 #1...

Linux: watch number of files in directory

Hi, I am trying to write a shell script that waits until the number of files in a specified directory ( say ~/fit/) has reached a predefined number. What I've got so far is: limit = 10 while [ls ~/fit/ | wc -l -lt $limit] do sleep 1 done This says -lt is an invalid option to wc. I also tried [$limit -gt ls ~/fit/ | wc -l] but i...

PHP - Best/Better/Optimal way to setup a Staging/Development server

I recently launched a service, meaning I can no longer work directly on the site, or I do so at a risk. I haven't been able to find any "standard" or "best" way to make a development server. The two things I have seen are a) Using a GIT or SVN to host the data (this doesn't quite solve my problem, I need to be able to develop somewhere...

How to patch wireless driver rtl8187 for 2.6.30 kernels?

I am using Backtrack 4 (installed on hdd), and I have an USB wifi adapter that uses rtl8187. I am trying to test wep cracking on my router (the signal is about 80%). I executed aireplay -9 and it shows "Injection is working 30/30 100%". But when start airodump to capture ivs, and aireplay -3 to inject, it only captures 1 iv every few s...

How does linux file descriptor limits work?

I was told that my server refused to accept client network connections at a specific port could be due to the lack of file descriptors. I looked up what this is all about and read about it here: http://www.netadmintools.com/art295.html So I tested my system and I got this: cat /proc/sys/fs/file-nr 1088 0 331287 What does this m...

what does this script do?

#!/bin/bash RYD=/share FILESPEC=*.sh DIRPERM=700 FILEPERM=750 OWNER=user:group CH_FSPEC=0 if [ -d $RYD ]; then find $RYD -type d | xargs chmod $DIRPERM if [ $CH_FSPEC -gt 0 ]; then find $RYD -type f | xargs chmod $FILEPERM else find $RYD -type f | grep -v "$FILESPEC" | xargs chmod $FILEPERM fi chown -R $OWNER $RYD for...

How do I programmatically get the free disk space for a directory in Linux

Is there a function that returns how much space is free on a drive partition given a directory path? ...

Copy the three newest files under one directory (recursively) to another specified directory

I'm using bash. Suppose I have a log file directory /var/myprogram/logs/. Under this directory I have many sub-directories and sub-sub-directories that include different types of log files from my program. I'd like to find the three newest files (modified most recently), whose name starts with 2010, under /var/myprogram/logs/, regardl...

How do I run PHPUnit Selenium tests over a ssh connection?

I'm using the yii framework and trying to get its unit tests running while connected over ssh on a CentOS server. When I run phpunit, it tries to launch Firefox, which fails with the error "no display specifiied" ...