linux

How can I install Git to my server which does not have apt-get?

My host is Bluehost. My server is on Linux. I have tried to follow the tutorial. ...

Which Linux distribution should I use as a Xen host?

I ordered a server for the home office and I would like to partition it with Xen. I think this will keep things clean and easier to maintain. I will be running things like MySQL, PostgreSQL, Tomcat, and my own code. What freely available Linux distribution has the best Xen hosting facilities? ...

Anyone know of any staticly-typed scripting languages?

I'm about to start an LFS-based linux distro just for a hobby project. I plan on doing some very non-standard tasks, and most of it will involve change almost all scripts in the distro. (mainly init scripts, but also I'll be writing a simple set of package manager scripts.) Since I'm gonna be going this far off the norm, and since I have...

how do I check in bash whether a file was created more than x time ago?

I want to check in linux bash whether a file was created more than x time ago. let's say the file is called text.txt and the time is 2 hours. if [ what? ] then echo print "old enough" fi ...

What do you think about the new Debian release cycle?

I was surprised to know that Lenny already promoted to "stable" - among some of my clients there is some fear that Debian would want to compete with Ubuntu for the desktop and forget its server devotion. "Only" 2 years between 4.0 Etch and 5.0 Lenny is unprecedented in Debian time scale. Version inflation? is it because SPARC-32 support...

Recommendations for logger in Linux application.

I'm building a C++ Linux application and I need to log its activity. What are the existing Linux facilities to create logs? What would you recommend? ...

top command's CPU usage calculation

I am trying to use GNU coreutil top's formula for calculating CPU usages in percentage. But top is using some half_total, to calculate the percentage, which is adding 0.5 to the percentage. In utils.c of top's source, the following line (at 3.8 beta1, it is in line number: 459): - out++ = (int)((diffs++ * 1000 + half_total) / total_ch...

Powermock Slows Down Test Startup on Eclipse/Fedora 10 when on NTFS partition

I've just started having a proper play with Powermock and noticed that it slows down test startup immensely. A quick look at top while it was running shows that mount.nfts-3g was taking up most of the CPU. I moved Eclipse and my source directory to ext3 partitions to see if that was a problem and the tests now startup quicker but there...

Bash script does not continue to read the next line of file

Hello all, I have a shell script that saves the output of a command that is executed to a CSV file. It reads the command it has to execute from a shell script which is in this format: ffmpeg -i /home/test/videos/avi/418kb.avi /home/test/videos/done/418kb.flv ffmpeg -i /home/test/videos/avi/1253kb.avi /home/test/videos/done/1253kb.flv f...

Find the unix platform name

I want to be able to determine the output folder based on the platform name: AS3, AS4, AS5, SUN. I couldn't figure out how to extract the platform name from the system. I experimented with: uname -a file /bin/bash Thanks Solution ./lsb_release -a Kudos to Paul Dixon ...

How do I get a thread ID from an arbitrary pthread_t?

I have a pthread_t, and I'd like to change its CPU affinity. The problem is that I'm using glibc 2.3.2, which doesn't have pthread_setaffinity_np(). That's OK, though, because pthread_setaffinity_np() is itself a wrapper of sched_setaffinity(), which can be called by passing a thread ID instead of a process ID to set the affinity for an ...

How to add a default include path for gcc in linux?

I'd like gcc to include files from $HOME/include in addition to the usual include directories, but there doesn't seem to be an analogue to $LD_LIBRARY_PATH. I know I can just add the include directory at command line when compiling (or in the makefile), but I'd really like a universal approach here, as in the library case. ...

Benefits/drawbacks to running 64-bit JVM on 64-bit Linux server?

We run the 32-bit Sun Java 5 JVM on 64-bit Linux 2.6 servers, but apparently this limits our maximum memory per process to 2GB. So it's been proposed that we upgrade to the 64-bit JVM's to remove the restriction. We currently run multiple JVM's (Tomcat instances) on a server in order to stay under the 2GB limit, but we'd like to consol...

How should timestamps in last output be interpreted on linux?

$ last -aid foouser pts/12 Sun Feb 15 07:30 - 15:23 (2+07:52) XXX.YYY.ZZZ.QQQ The Sun Feb 15 07:30 - 15:23 part is pretty obvious. The user logged in at 7:30 on Sunday. But (2+07:52) is unclear. 7:52 is the difference between the two times, but what's the 2+ part? ...

Suggested resources for newbie ARM programmer?

I'm starting develop an application in embedded arm board from http://www.embeddedarm.com. I'm a newbie in developing embedded applications. I would like resources like books, online guides that will get me started in to develop applications in embedded arm. I was planing to use Linux as the OS. ...

Linux software watchdog

I am writing a system monitor for Linux and want to include some watchdog functionality. In the kernel, you can configure the watchdog to keep going even if /dev/watchdog is closed. In other words, if my daemon exits normally and closes /dev/watchdog, the system would still re-boot 59 seconds later. That may or may not be desirable behav...

How to create a file of size more than 2GB in Linux/Unix?

I have this home work where I have to transfer a very big file from one source to multiple machines using bittorrent kinda of algorithm. Initially I am cutting the files in to chunks and I transfer chunks to all the targets. Targets have the intelligence to share the chunks they have with other targets. It works fine. I wanted to transfe...

How can I tar a file that is being used by another process?

I'm archiving a directory. This directory has a file that is being written by another process. When I tar this using Linux tar/Perl Tar module, in the archive the entry for the file is there but the contents are null. Before tarring the files are... -rw-r--r-- 1 irraju dba 28 Feb 18 02:22 a -rw-r--r-- 1 irraju dba 25 Feb 18 02:23 b ...

How can I pass a complete argument list in bash while keeping mulitword arguments together?

I am having some issues with word-splitting in bash variable expansion. I want to be able to store an argument list in a variable and run it, but any quoted multiword arguments aren't evaluating how I expected them to. I'll explain my problem with an example. Lets say I had a function decho that printed each positional parameter on it's...

Virtual Memory Usage from Java under Linux, too much memory used

I have a problem with a java application running under linux. When I launch the application, using the default maximum heap size (64mb), I see using the tops application that 240 MB of virtual Memory are allocated to the application. This creates some issues with some other software on the computer, which is relatively resource-limited...