Mar 02
If you have more than one gmail account and you use firefox, you are in deep trouble. Coz, you will need to logout and login to the new account in order to check mails. If you are a Windows user, here come “a” solution for it. A firefox extension called IE Tab. “This is a great tool for web developers, since you can easily see how your webpage displayed in IE with just one click and then switch back to Firefox”.

And if you are just like me being crazy about Firefox and/or use Linux in your desktop, then IE Tab is not an option since IE Tab is just for Windows.
Here comes the solution for Linux/Mac & Windows users. CookiePie
“CookiePie is a Firefox extension enabling you to maintain different cookies storage in different tabs and windows. It means that you can for example open multiple GMail/Yahoo Mail/Hotmail accounts in different tabs and windows simulteanously.”
Share and Enjoy:
These icons link to social bookmarking sites where readers can share and discover new web pages.
Tags: Firefox, IETab
Mar 02
The find command in Unix always goes recursive. In order to avoid recursion into subfolders, you have the find -maxdepth in certain flavours of Unix. But find -prune is the standard way to restrict recursion into certain subfolders.
Consider you have a logs folder /apps/myapp/data/logs and a subfolder /apps/myapp/data/logs/history, you would like to move the files in the logs folder alone and NOT the files in the history folder, then issue
find * \( ! -name history -prune \) -type f - exec cp {} /apps/myapp/archive \;
keeping the pwd as /apps/myapp/data/logs.
If you wish to restrict more than one folder, then use
find * \( ! -name history -prune \) -o \( ! -name history -prune \) -type f - exec cp
{} /apps/myapp/archive \;
“-o” just says “OR”
Share and Enjoy:
These icons link to social bookmarking sites where readers can share and discover new web pages.
Tags: find prune unix
Mar 02
It common to get a huge backlog of log files in any application. Worse is the case when the application has a batch interface too. And there comes the need to delete the files which are older comes up. Or you might want to just copy/move the files to an archive folder for later reference.
Here are the unix commands for them :
Copy to archive folder
Consier your log folder is /apps/myapp/data/logs and your archive folder is /apps/myapp/archive/logs and you want to copy “files” and not directories which are 5 days old , then
find /apps/myapp/data/logs -type f -mtime +5 -name '*.log' - exec cp {} /apps/myapp/archive/logs \;
and/or if you want to delete the files which are 5 days old,
find /apps/myapp/data/logs -type f -mtime +5 -name '*.log' - exec rm -f {} \;
Share and Enjoy:
These icons link to social bookmarking sites where readers can share and discover new web pages.