Systems Administration
Removing DOS ^M from unix files
Submitted by dac on Tue, 10/21/2008 - 11:22We have all had it happen. You get a text file from another user using Windows or even Mac. You open it up and the file looks trashed. This usually occurs when the file format of the file is unix but the content still includes the DOS Carriage Return / Line feed that show up as ^M in vim.
The simplest way to remove these annoying meta characters is using the col program.
cat file | col -b > newfile
However, today I ran into a file that was truncating on cat for no apparent reason. So, I had to do the edits in vim. This is mainly to remind myself because I wind up looking this up every time I need it.
In vim to replace DOS CR/LF with a unix newline type:
:%s/CTRL-V+M/CTRL-V+ENTER/g
Looks like:
:%s/^M/^M/g
Audio Conversion
Submitted by dac on Thu, 07/24/2008 - 14:32I often receive audio files in the full WAV format and need to convert them to OGG and MP3.
Here are the tools I use to do this:
Convert to OGG:
oggenc -b 128 -q 7 foo.wav
Convert to MP3:
lame -h --abr 128 foo.wav foo.mp3
Open Source Content Management
Submitted by dac on Thu, 07/24/2008 - 12:33Your friendly neighborhood Linux systems admin here with a post about the Linux Foundation web infrastructure. The web site has grown organically one piece at a time. The existing main application for www.linuxfoundation.org is Mediawiki. This was put together as a temporary web site when the Free Standards Group and Open Source Development Labs were in the process of merging into the Linux Foundation. That was in December of 2006.
Since this time many other needs have come up. We added Wordpress MU for our blogs. We added a Phorum installation for OpenPrinting discussions, forums.openprinting.org. Our events site is run on Drupal and CiviCRM.
The issue has always been how to meet all the technological needs with a bare minimum of staff. Many of you out there could code solutions in place to glue the applications together. Since, I am not a strong developer I have focused on staying with the stock applications for ease of upgrades.
How do you put together a cohesive infrastructure completely based on open source applications that work together seamlessly without coding highly customized solutions?
We are trying to answer that question.

