Finding all executable files on the system

find is one of the most useful and feature rich commands in Linux. Sometimes it is not that obvious which parameters should be fed to find for this or that behaviour. The manual could surely use some work.

Today I was trying to figure out how I can find all executable files on the system. The manual suggests that I use the -perm option with the specification of the mode. Figuring out the mode might get to you, so here is the example:

find / -type f -perm +0111

One could specify any mode what-so-ever. Just remember that 1 stands for ‘execute’, 2 stands for ‘write’, and 4 stands for ‘read’.

New Procedures for 2005 Readers’ Choice Awards

Linux Journal has changed the procedures for its Readers’ Choice Awards contest. From now on, if you want to participate, you’ll have to send them a specially formatted email message, instead of using a web form. They have published the instructions here.

I’ve already sent the email to awards@linuxjournal.com with the following nominations:

e-mail client: Mutt
distribution: Fedora
database: MySQL
backup utility: Tar
network backup utility: AMANDA
audio tool: XMMS
desktop environment: KDE
Linux web site: http://slashdot.org
distributed file sharing system: BitTorrent
programming beverage: coke
development tool: Vim
text editor: Vim
system administration tool: perl
server: HP ProLiant DL
office program: KDE Kontact
programming language: Perl
instant messaging client: Licq
graphics program: GIMP
web browser: Firefox
blogging software: WordPress

Multiple sound carding with Linux

Yesterday and today I have been trying to solve a little problem o’mine. Since I started using the single computer for everything, there was a small dillema with sound. The thing is that I wanted to use the speakers to listen to mp3s and ogg, while use TV sound when watching movies. Having two sound cards in the same computer looked like a logical solution.

Luckily, both sound cards (Creative and Intel) were detected and configured by system-config-sound. Test sounds played nicely on both of them and I could even select the default sound card.

The question was how to use one card with some applications while using another with others. The answer was pretty simple – Advanced Linux Sound Architecture also known as ALSA.

aplay -l will show a list of detected sound cards. From than on it’s a breeze. Here is an example for mplayer to use a non-default card:

mplayer -ao alsa:mmap:noblock:device=hw=1.0 -fs dvd://1

The key here is the “device” argument and substituion of “:” with “=” and “,” with “.”.

Now, let Google cache this post for me to never have this problem again.

“format C:” versus “rm -rf /”

Jokes about “format C:” and “rm -rf /” are pretty frequent in the computer universe. These two commands will supposedely remove all data from the hard disk – one on DOS/Windows and another on UNIX operating systems. While widely used, this might not be exactly true. This guy has tried both and documented the results.