Archive for ‘August, 2007’

Couple of cool remote ssh commands for your UNIX arsenal

datePosted on 18:41, August 4th, 2007 by Many Ayromlou

Here is a easy way to copy an entire directory tree from one Unix machine to another, while retaining the permisssions and ownership, using ssh as the middle man. Assuming that you want to copy everything under source_directory to destination_directory on another machine here is the command you would issue on the source machine (first cd to the directory containing source_directory):
tar -cf - source_directory/ | ssh userid@your.destination.machine.com "cd /somedir/destination_directory ; tar -xvlpf -"
Here is another similar command that allows you to backup a HD partition to another host via ssh:
dd bs=1M if=/dev/sdb | gzip | ssh userid@your.destination.machine.com "cd /destination/directory ; dd of=sdb.gz"
I have not bothered dissecting these commands, since I assume you are familiar with Unix and Shell commands. Please note that these commands will most likely not work in OSX, unless you’re working on datafiles only (ie: html files, txt files). Program files under OSX could potentially get corrupted if copied via the first command.

One last command which I came across the other day…..If you’re ever in need of a stop watch just use your shell to measure time. Issue the following command and wait a bit. Now interrupt it via Ctrl-C and it will show you how much time has passed. NOTE: Nothing happens when you issue the command, only when you stop it via ctrl-c.

time cat
Have Fun….

Share

Portable Studio in a box

datePosted on 18:14, August 4th, 2007 by Many Ayromlou


Hot on the heels of AJA video’s NAB announcement of their IO HD box, MOTU has just announced their version of Portable Studio in a box, the MOTU V3HD. According to MOTU’s website “With one simple plug-and-play FireWire connection, the V3HD turns your Mac or PC desktop or laptop computer into a powerful HD/SD video production workstation equipped with all the video and audio I/O you need.” Both boxes seem — at first glance — to be very similar. AJA’s box works with Apple’s ProPres 422 (hardware), while V3HD seems to be hardwired for DVCPro HD (hardware). V3HD works with FinalCut Pro on Mac platform and supports Adobe Premiere Pro on Windows. All you need is a Workstation/Laptop with Firewire 400/800 connections. So go ahead and build that portable HD/SD studio you always wanted…..it’s easy.

Share

How to turn Spotlight OFF (and ON Again)….

datePosted on 16:06, August 1st, 2007 by Many Ayromlou
UPDATE: Please see this article if you use Leopard (OSX 10.5+). The procedure below, although not damaging, works for 10.4 and below (Tiger). Thanks to Anonymous for pointing this out.

Got a new Macbook thru work today and after Firewire targeting my profile over from my personal MBP, I started looking around the blog for the entry that shows you how to turn off Spotlight. You see Spotlight is a good idea, but I think it needs a bit more work. I’ve noticed that on my MBP and older Dual G5 machines, the mds service sometimes just goes nuts (usually corrupt files or something like that), and brings the machine to a halt. So I like to turn Spotlight off ASAP. Here is how:

  • Edit /etc/hostconfig (don’t forget to sudo) and change the line that reads
    SPOTLIGHT=-YES-
    to
    SPOTLIGHT=-NO-
  • Run the following two commands from the command line to get rid of existing index files
    sudo mdutil -i off /
    sudo mdutil -E /
  • Reboot

Note that the crazy spotlight icon will still be there, but the backend (the bad stuff) will be disabled after the reboot. You can optionally kill the icon (not recommended) by issuing the command:
sudo chmod 0000 /System/Library/CoreServices/Search.bundle
Later on if you want to turn spotlight back on (why?) you can do it by doing the following:

  • Edit /etc/hostconfig (don’t forget to sudo) and change the line that reads
    SPOTLIGHT=-NO-
    to
    SPOTLIGHT=-YES-
  • Reboot
  • Run the following command from the command line to turn on indexing
    sudo mdutil -i on /

Enjoy….

Share
12Previous