Niroshan Rajadurai

  • Increase font size
  • Default font size
  • Decrease font size
Information Technology & Social Media

A collection of articles related to internet & IT work I have done.



Efficiently remove all files or directories with a particular name from your system

E-mail Print PDF
User Rating: / 1
PoorBest 

Useful UNIX scripting command.

If you have a common file or directory that needs to be removed from a directory tree, the following command can be useful for doing this:

find <starting_from_dir> -name <dir_OR_file_name> -exec /bin/rm -rf '{}' \;

This is ideal if you have spaces in the directory name, as the traditional method of using 'find' output inside a shell program will split the strings into blocks broken by white space. This will result in incomplete directory names.

Comments (0)
 

How to fix a locked iTunes Library

E-mail Print PDF
User Rating: / 1
PoorBest 

From time to time iTunes has an error “The iTunesLibrary file is locked, on a locked disk, or you do not have write permission for this file”. this can be very frustrating, as there appears to be no simple way to fix the error.

Locked iTunes

There is actually a simple way to fix this error.

Step 1: Launch Terminal

Step 2: Change directory to ~/Music/iTunes ('cd ~/Music/iTunes')

Step 3: delete the file sentinal that is located in this directory ('rm sentinal')

Now you should be able to relaunch iTunes and have it start correctly


Comments (0)
 

Customise 'Send To' for Windows 7

E-mail Print PDF
User Rating: / 1
PoorBest 

Some times it's useful to be able to add our own utilities to the 'Send To' menu in Windows.

Windows 7 - SendTo Customisation

In Windows XP this was very easy to find. In Windows 7, the directory for 'Send To' is not trivial to find. Its actual location is here:

%APPDATA%\Microsoft\Windows\SendTo

This maps to:

%APPDATA% is an environment variable that actually maps to something like C:\users\<username>\AppData\Roaming

Inside this directory you can add your custom program.

NB. If you used to have a 'Send to' utility to open the command prompt on a particular directory,  Windows 7 now allows you to do this, buy holding the 'Shift' key and right clicking on the folder. A new option should be visible 'Open Command Window Here'

Windows 7 - Shift Right Click

Comments (0)
Last Updated on Wednesday, 20 October 2010 13:04
 

Pin Folders and Libraries to Windows 7 Start Menu

E-mail Print PDF

I just recently migrated to Windows 7. For those of you that have already done this, and have used another version of Windows in the past. The new Start Menu could either be a dramatic improvement from the previous version, or a terrible frustration.

Rest assured, there is a solution to the problem.

Windows 7 - Pin Library to Start Menu

In Windows 7, by default you cannot pin folders or libraries to the start menu, but with the following registry modification it becomes possible.

Steps:

  1. run 'regedit'
  2. Navigate to 'HKEY_CLASSES_ROOT\Folder\shellex\ContextMenuHandlers'
  3. Right click on 'ConextMenuHandlers' and add a new key: {a2a9545d-a0c2-42b4-9708-a0b2badd77c8}

To remove this ability, simply delete this key.

 

Comments (0)
Last Updated on Wednesday, 20 October 2010 12:44
 

Manually moving your Joomla installation to a new server

E-mail Print PDF

I recently moved a Joomla 1.0.x based site I had been running from one hosting service to another. As a result of this move, some of the core setting for Joomla such as the absolute path, mysql host, database, and user details needed to change. It took me a little while find the solution, and I fell into a set of common traps, that other users ran into, with no real feedback on how to recover from it. So here is what I did.

I took a backup of the sql database Joomla, and the files from the webroot (tar ball).

I created a sql database on the new hosting service, and using phpMyAdmin, I uploaded the sql backup.

For the file, I just extracted the files in the new webroot location.

Finally, the configuration settings for Joomla are stored in configuration.php

For Joomla 1.0.x here are the items that need to change:

$mosConfig_absolute_path = '<new absolute path>';
$mosConfig_cachepath = '<new absolute path>/cache';
$mosConfig_db = '<new sql database name>';
$mosConfig_host = '<new sql server>';
$mosConfig_password = '<new sql server password>';
$mosConfig_user = '<new sql server username>';

For Joomla 1.5.x here are the items that need to change:

var $log_path = '<new absolute path to web root>/logs';
var $tmp_path = '<new absolute path to web root>/tmp';
var $host = '<new sql server hostname>';
var $user = '<new sql user>';
var $db = '<new sql database name>';
var $password = '<new sql password>';

If there is an error in the configuration, Joomla displays the 'Site is down for maintenance' page. If the changes are correct, it should just work.

 

Comments (0)
Last Updated on Wednesday, 01 September 2010 18:47
 


Related Articles