In this case we rename any file containing the string `Ubuntu` with `Mass`:
for FILE in * ; do NEWFILE=`echo $FILE | sed ‘s/Ubuntu/Mass/g’` ; mv “$FILE” $NEWFILE ; done
Here we replace the contents of the file `Mass.vmdk`, any instace of the word `Ubuntu` is replaced with `Mass`:
sed -i ‘s/Ubuntu/Mass/g’ Mass.vmdk
This command will read the file cdp.txt, perform a unique sort on column 2 using a space as a delimiter:
sort -u -t ‘ ‘ -k2 cdp.txt
$ sudo useradd -d /home/test -m test
$ sudo passwd test
$ sudo groupadd smb_users
$ sudo adduser test smb_users
$ sudo smbpasswd -a test
$ sudo userdel test
$ sudo groupdel smb_users
$ sudo rm -rf /home/test/
$ sudo smbpasswd -x test
On my Asus M3A78-EM running Ubuntu 9.04 I use XBMC and Boxee for media playback. I recently had the need to output audio over s/pdif optical and via HDMI due to the fact that I have a HDMI switch to send the output to two separate LCDs. I also have a MSI N9400GT-MD512H GeForce 9400 GT installed in this box to perform VDPAU video hardware acceleration. As you may or may not know this GeForce card requires a 2 pin s/pdif cable to be run from the motherboard to video card. In order for HDMI audio to function you must go into your bios and set the `SPDIF OUT mode` setting to ‘SPDIF Output’. One the system is back online, be sure to disable Pulse Audio as it does not play well with Boxee and XBMC. Next you need to have the latest ALSA v1.0.22 installed, a nice upgrade script for Ubuntu can be found here . To check what version you have installed check the following file:
htpc@Electric:/media/sda3$ cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 22.214.171.124.
Compiled on Feb 21 2010 for kernel 2.6.28-18-generic (SMP).
Ok, once you have the latest version installed you need to configure your /etc/asound.conf file as follows:
EDIT 2/22/2010: I found that under the latest Boxee Beta 0.9.20.10710 I could not get sound to function at all! On a hunch I deleted the asound.conf file above and everything including navigational sounds worked like a charm . XBMC also function perfectly, so I really question the need for the global asound.conf file above.
You may also want to check in your home folder to be sure that you don’t have any custom asound configuration files, you really should remove these as to not cause any confusion.
Go ahead and do a reboot if you have not done so. Once the system is back up you should run alsamixer and turn all your volume levels up, pay special attention to the SPDIF levels be sure they are unmuted. An unmuted channel will have a ‘OO’ and a muted channel will have a ‘MM’. Once you have your levels set run ‘sudo alsactl store 0’ to save your settings. Lastly, in Boxee and XBMC set your audio settings as follows:
-Dolby Digital (AC3) Capable receiver—-off
-DTS Capable Receiver———————–off
Audio ouput device————————–default
Passthrough output device——————iec958
Downmix multichannel audio to stereo—on
These are the setting I have to use for everything to work with an older Sony XBR1 I have, the TV does not seem to be able to support Dolby Digital or any special formats. Good Luck.
I recently upgraded to Ubuntu 9.04 and found that snmpd was going overboard with the amount of syslog messages it was sending to my syslog server.
May 22 12:49:55 Server snmpd: Connection from UDP: [10.1.1.1]:58410
May 22 12:49:55 Server snmpd: Connection from UDP: [10.1.1.1]:56401
May 22 12:49:55 Server snmpd: Connection from UDP: [10.1.1.1]:51123
May 22 12:49:55 Server snmpd: Connection from UDP: [10.1.1.1]:49181
May 22 12:49:55 Server snmpd: Connection from UDP: [10.1.1.1]:42994
May 22 12:49:55 Server snmpd: Connection from UDP: [10.1.1.1]:46429
May 22 12:49:55 Server snmpd: Connection from UDP: [10.1.1.1]:60154
The fix was to modify the following line in my /etc/default/snmpd file:
SNMPDOPTS=’-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 0.0.0.0′
SNMPDOPTS=’-LS4d -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 0.0.0.0′
Once this is done restart snmpd: sudo /etc/init.d/snmpd restart
I checked on my Ubuntu 8.04 server (64bit) and saw that I was suffering from the same snmpd logging issue. I saw that this box was too running snmpd v5.4.1. I tried the same fix detailed above but it did not take and snmpd would complain about the options used. I was able to resolve the issue with the followng line in my /etc/default/snmpd :
SNMPDOPTS=’-LS 0-4 d -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 0.0.0.0′
Below is a simple one liner that will replace the spaces with an underscore for all files in the current directory.
find . -type f -name “* *” -maxdepth 1| while read src; do mv “$src” `echo $src | tr ” ” “_”`; done
As I mentioned before I recently replaced my Windows Kiwi Syslog server with syslog-ng for syslog capturing and alerting. It has been running great for the past few months, however it lacks one nice feature of Kiwi and that was a front end GUI for easy viewing. To overcome this I decided to install php-syslog-ng. This app has some nice features, not only does it let you view the current log but you can do historical searches and filters. I have to say Im really pleased with it. Take a look at Openmaniak’s tutorial for more information on how to get it up and running on your box.
I have run Kiwi syslog server on window for years however it is starting to show its age. I figure why not move to an open platform that rocks! The great thing is that Syslog-ng on Ubuntu is configured as a drop in replacement to sysklog ( the default logger daemon). The first thing we need to do is grab and install syslog-ng.
sudo atp-get syslog-ng
Once this has been completed its time we pop open it’s config file and make some needed changes to allow for the reception of remote systems syslogs.
Continue reading Syslog-ng and Ubuntu Gutsy
Finally my server is nearly rebuilt. I had a hard drive die on me this past week so I took this opportunity to upgrade form Ubuntu 6.10 to 7.10.
Back to the point, the fish cam is now back in operation. Take me to the Fish Cam!