Monthly Archives: March 2007

T-Mobile will unlock your Motorola phone (for free!) 11

Phones come in two ways, locked or unlocked. If a phone is locked, then you can only use it with one provider, such as T-Mobile or Cingular/AT&T. If it is unlocked, you can put a sim card in from another carrier, and use the phone just as normal. Phones are locked because a carrier typically gives you the phone for cheap, and in return you need to stay with them for a certain amount of time. Reasons you might want to have an unlocked phone include: using your phone on a separate carrier, international travel and using a country’s native GSM network, and fetching a higher “unlocked” phone price at auction. Different phone models have different ways of being unlocked. With Nokias and SonyEricsson, as far as I know, you can generate an unlock code based on the IMEI (Unique identifier) of the phone. These generators can be found for….

Delete all directories more than a week old 6

This simple linux bash script will delete subdirectories in a directory based on when the subdirectory was last modified. In my sample script, it looks in the directory /home/backup and deletes any directories older than 7 days. Replace 7 with the number of days of your choosing! 1for i in `find /home/backup/ -maxdepth 1 -type d -mtime +7 -print`; do echo -e "Deleting directory $i";rm -rf $i; done Just to explain: -maxdepth 1 = list only files/directories in 1 level from main search directory -type d = list only directories -mtime +7 = modified time of more than 7 days -print = print out list; so we can then process the list with our bash script This is useful for backup programs which do not clean up their old backups. Let me know if you have any questions or comments!