Here’s another quick tip. If you have a large directory tree (hundreds or thousands of nested levels), and you need to find and delete a set of files from the tree, consider this one-line approach:
cd [target-dir-top-level];for i in `find . -name \*tar.gz`; do rm -f $i; done
Replace my pattern ‘tar.gz’ with one that matches the [...]
Category Archives: Tech Tips
Tech Tip of the Day: Quick file deletion
18-Sep-06Tech Tip of the Day: MySQL binary export
31-Aug-06This is a short and sweet tech tip. If you have binary data, such as images or zip files, stored in a mysql database, this technique will export those blobs (binary large objects) back to the file system.
Case:
Bugzilla attachments exist in mysql that now must be exported to another bug tracking system.
Approach:Run this query
select thedata [...]
Recently, an upgrade of the OS on the commavee server resulted in the blog post URLs failure to resolve. Earlier blog posts, with the date-and-post title formatted URL, were now unresolvable. This meant that every post in the search engines (and even the site itself) resulted in a 404 Not found error. It took a [...]
If you are writing automation in Perl (very common), you will certainly need to interact with the system. You have multiple ways to implement system interaction in Perl; one of the most efficient & effective methods is use of the system function.
Today’s Tech Tip deals with performing fully automated (unattended) backups of a MySQL database from one system to another, even though there is no direct connectivity between the two systems.
