linux

Can anyone recommend a good modern alternative to bash?

Bash is getting a little long-in-the-tooth. Windows has PowerShell (formerly known as Monad), which is capable of dealing with richer objects than just lines of text. Is there any equivalent new powerful shell for Linux/Mac? It should be of similar expressiveness and functionality to Bash, but not afraid to tackle things in a differ...

Determine if a function exists in bash

Currently I'm doing some unit tests which are executed from bash. Unit tests are initialized, executed and cleaned up in a bash script. This script usualy contains an init(), execute() and cleanup() functions. But they are not mandatory. I'd like to test if they are or are not defined. I did this previously by greping and seding the sou...

Why does Imake interpret certain words in a Imakefile to numerical values?

I've found it very difficult to find any existing documentation on this. What I'm trying to find out is why Imake would interpret a word such as "unix", "linux" or "i386" to a number 1 in the produced Makefile? I'm sure it is a function of indicating whether or not your on that system or not. I've not been able to find that this is a ...

Is there a Linux (Ubuntu) svn client that doesn't suck??

Subversion has a superb client on Windows (Tortoise, of course). Everything I've tried on Linux just - well - sucks in comparison.... ...

Is there a good and free ide for c/c++ in linux?

I'm used to work with SourceInsight for windows which works great, shows caller and callee for each function, shows the content of a function the cursor is on and smartly auto-completes symbols across project. I don't feel like falling into the long learning curve of vim/emacs. I want productivity and I want it fast (I don't mean a cons...

What is the single best typing tutor for Linux? (Please only one program per answer)

After reading Steve Yegge's latest rant, I felt bad. What's the single best software for Linux to get me up to 100+ wpm? Please use good SO polling style and name one program per answer so to give others a chance to upvote instead of duplicating. ...

How to backup LIF formatted disk?

I have several old 3.5in floppy disks that I would like to backup. My attempts to create an image of the disks have failed. I tried using the UNIX utility dd_rescue, but when the kernel tries to open (/dev/fd0) I get a kernel error "floppy0: probe failed...". I would like an image because some of the floppies are using the LIF file sy...

What is the status of POSIX asynchronous I/O (AIO)?

There are pages scattered around the web that describe POSIX AIO facilities in varying amounts of detail. None of them are terribly recent. It's not clear what, exactly, they're describing. For example, the "official" (?) web site for Linux kernel asynchronous I/O support here says that sockets don't work, but the "aio.h" manual pages...

Linux Servers

What is your preferred flavor of Linux for a server environment and why? ...

Unix Proc Directory

I am trying to find the virtual file that contains the current users id. I was told that I could find it in the proc directory, but not quite sure which file. ...

What is the difference between gcc optimization levels?

What is the difference between different optimization levels in GCC? Assuming I don't care to have any debug hooks, why wouldn't I just use the highest level of optimization available to me? does a higher level of optimization necessarily (i.e. provably) generate a faster program? ...

Keyboard scancodes?

GNU/Linux text console, X11 not involved, indeed not even installed. Keyboard is US layout, keymap US default. Kernel version 2.20.x or later. An application written in C is getting keyboard input in translation mode, i.e. XLATE or UNICODE. When a key is pressed, the application receives the corresponding keystring. As an example, you p...

Use grep to find content in files and move them if they match

I'm using grep to generate a list of files I need to move: grep -L -r 'Subject: \[SPAM\]' . How can I pass this list to the mv command and move the files somewhere else? ...

What is the linux equivalent to DOS pause?

I have a bash shell script in which I would like to pause execution until the user presses a key. In DOS, this is easily accomplished with the "pause" command. Is there a linux equivalent I can use in my script? ...

How to programatically create videos ?

Is there a freely available library to create a MPEG (or any other simple video format) out of an image sequence ? It must run on Linux too, and ideally have Python bindings. ...

What conferences do you attend?

What conferences do any of you attend? I'm personally interested in both Linux/System Administration and Java conferences, but experiences about any conference are welcome as well. If you have been to any to any, what was your opinion, and were they worth the money? ...

Does the Gentoo install CD contain everything for C++ development?

I'd like to install Gentoo. I need it to develop GUI C++ applications using wxWidgets, so I need: build tools: make, automake, autoconf, etc. C++ compiler (GCC) X Window System for testing (Fluxbox or something minimal would be enough) Now, I have two options: download the small network installer (57MB) do a network install downloa...

Looking for regex to extract email addresses from /etc/passwd

Most of my users have email addresses associated with their profile in /etc/passwd. They are always in the 5th field, which I can grab, but they appear at different places within a comma-separated list in the 5th field. Can somebody give me a regex to grab just the email address (delimeted by commas) from a line in this file? (I will b...

Desperate networking question: Unix commands like ping, ssh, work fine but socket-based programs are failing in connect

I got a call from a tester about a machine that was failing our software. When I examined the problem machine, I quickly realized the problem was fairly low level: Inbound network traffic works fine. Basic outbound command like ping and ssh are working fine, but anything involving the connect() call is failing with "No route to host". F...

REDUX: How to overcome an incompatibility between the ksh on Linux vs. that installed on AIX/Solaris/HPUX?

I have uncovered another problem in the effort that we are making to port several hundreds of ksh scripts from AIX, Solaris and HPUX to Linux. See here for the previous problem. This code: #!/bin/ksh if [ -a k* ]; then echo "Oh yeah!" else echo "No way!" fi exit 0 (when run in a directory with several files whose name starts ...