Posts tagged «bash» Feed RSS

Here a small piece of code which will search for the duplicates in the path you supply. It will generate a new file which contains the commands for deleting those duplicates. Make sure you double check the resulting file! The script requires that you have fdupes installed. Install it in Ubuntu/Debian by running the following [...]

I installed Google Earth 5.0 and the ugly UI font from the beta is still here. Based on the comments from Google Earth Help page from here I’ve created the following script wich will fix the user interface font issue. #!/bin/bash   sudo aptitude -y install libqt4-webkit ge=`which googleearth`   if [ -n "$ge" ]; [...]

Use this grep invocation to trim comments out of config files. Comments are great but can get in your way if you just want to see the currently running configuration. I’ve found files hundreds of lines long which had fewer than ten active configuration lines. It’s really hard to get an overview of what’s going [...]

I experienced a lot of random X server crashes using the proprietary driver for the NVIDIA graphic card on my Thinkpad T61 running Ubuntu 9.04 x86 with Compiz activated. I managed to fix the problem by installing the lastest NVIDIA driver. I wrote a little script to automate the process and save time. I recommend [...]

I use the following script to automatically update my Ubuntu box. I don’t recommend using this on your servers! #!/bin/bash   ################################################# ## ## ## auto-update.sh v1.0 ## ## Use this script to set up automatic updates ## ## on your debian/ubuntu box. ## ## ## #################################################   ## Creating /usr/bin/auto-update.sh file sudo touch /usr/bin/auto-update.sh [...]

I am a big fan of ARM.FM. Their playlist contains the freshest tracks in the dance music. I wanted to keep track of the tunes I like the most, so I made a little script to update a file on my desktop with the name of the track currently playing. Here is the script, you [...]

Pimp out Linux / UNIX shell prompt! You can find a nice guide here, and a nice collection here. Here is mine: export PS1="[\[\e[28;1m\]\H \[\e[0m\]\w]\$ " Have fun!

I just thought that you might be interested in a small script you can use in Hardy Heron. It uses the new UFW (Uncomplicated firewall) introduced in this new Ubuntu distro. The script is well commented, so everything is easy to understand. Here is the script: #!/bin/bash   ## set the default policy to drop [...]

If you are a MySQL user and you want to have a disaster recovery solution, or even as a simple backup, you can write small shell scripts based on mysqldump tool. For this, you need AutoMySQLBackup. It doesn’t have any real requirements (mysqldump of course is needed – in any mysql client package – and [...]

Please note that making security backups of your DVD/CD:s may be illegal in your country. for the purpose of making these backups, the programs you need are standard, *NIX programs, and it is a safe bet that you wont need to install anything. You may also need to have root permissions in able for you [...]