New Mac Pros, iMacs and Minis
Apple has hit us with three hardware refreshes in the same day.
Mac Mini
2.0GHz Intel Core 2 Duo | 2.0GHz Intel Core 2 Duo |
1GB memory | 2GB memory |
120GB hard drive | 320GB hard drive |
8x double-layer SuperDrive | 8x double-layer SuperDrive |
NVIDIA GeForce 9400M graphics | NVIDIA GeForce 9400M graphics |
$599, shipping within 24 hours | $799, shipping within 24 hours |
I'm really glad this little guy is still going strong. There were fears it would be discontinued but thankfully this has not proven to be the case.
Not the greatest specs in the world, but the GeForce 9400M is a welcome addition that should provide a decent performance boost to graphical apps.
Apple is claiming that it now uses 45% less power, making it even more viable for server-related tasks (my personal favorite use for Minis). It's worth noting that the case has not been redesigned to match the iMac, as was rumored.
iMac
20" display | 24" display | 24" display | 24" display |
2.66GHz Intel Core 2 Duo | 2.66GHz Intel Core 2 Duo | 2.93GHz Intel Core 2 Duo | 3.06GHz Intel Core 2 Duo |
2GB memory | 4GB memory | 4GB memory | 4GB memory |
320GB hard drive | 640GB hard drive | 640GB hard drive | 1TB hard drive |
8x double-layer SuperDrive | 8x double-layer SuperDrive | 8x double-layer SuperDrive | 8x double-layer SuperDrive |
NVIDIA GeForce 9400M graphics | NVIDIA GeForce 9400M graphics | NVIDIA GeForce GT 120 with 256MB memory | NVIDIA GeForce GT 130 with 512MB memory |
$1,199.00, shipping within 24 hours | $1,499.00, shipping within 24 hours | $1,799.00 | $2,199.00 |
Not much to say here - just a speed bump and NVIDIA graphics across the whole line. The 24" now starts at a lower pricepoint.
Mac Pro
Quad-Core | 8-Core |
---|
One 2.66GHz Quad-Core Intel Xeon "Nehalem" processor | Two 2.26GHz Quad-Core Intel Xeon "Nehalem" processors |
3GB (three 1GB) memory | 6GB (six 1GB) memory |
640GB hard drive | 640GB hard drive |
18x double-layer SuperDrive | 18x double-layer SuperDrive |
NVIDIA GeForce GT 120 with 512MB | NVIDIA GeForce GT 120 with 512MB |
$2,499.00, ships within 4 days | $3,299.00, ships within 4 days |
And here's a custom configured Mac Pro with pretty much everything you'd ever need:
Two 2.93GHz Quad-Core Intel Xeon |
32GB memory (8x4GB) |
Mac Pro RAID Card |
4 x 1TB 7200-rpm Serial ATA 3Gb/s |
ATI Radeon HD 4870 512MB graphics |
Two 18x SuperDrives |
2 x Apple Cinema HD Display (30" flat panel) |
AirPort Extreme Wi-Fi Card with 802.11n |
Quad-channel 4Gb Fibre Channel PCI Express card |
Xsan 2 |
Mini DisplayPort to Dual-Link DVI Adapter (needed for 2x 30" displays |
AppleCare protection plan for Mac Pro |
$19,994.00, shipping in 6-8 weeks |
Processor - You might think it's just a speed bump but the Nehalem series of CPUs has a completely redesigned architecture that removes a lot of traditional bottlenecks. This will
significantly improve performance (particularly memory throughput) over previous Mac Pros.
The new architecture also allows two threads per core, meaning that 16 threads can be run simultaneously on the 8 core. I had wondered if Apple would market it as a 16 core machine but they chose not to, which is probably best as it could have been misleading.
Go for the 2.93 GHz processor if you can afford it.
Memory - Apple has been generous with the memory in the 8-core model. My usual advice would be to custom configure the machine with the minimum amount of memory possible and then buy it separately from cheaper sources. Note however that the custom configurator offers a minimum of 6 GB of memory, which will be enough for the majority of people.
Hard Drives - There are four bays, each offering a 640 GB or 1 TB SATA drive at 7200 RPM. I'd advise against ordering additional drives from Apple. Instead, shop around and you will get a much better deal. They are dead simple to install.
Apple has chosen not to offer solid-state disks as an option.
Graphics - Apple is offering two cards - the NVIDIA GeForce GT 120 512MB and the ATI Radeon HD 4860 512MB. The GeForce card is available in multiples up to 4. I would not advise purchasing multiple graphics cards in anticipation of Snow Leopard, as you'd be forking out a lot of money for something that has an unknown performance benefit. You don't know that it would improve performance enough to warrant the extra cost, and you don't even know if Final Cut Studio 3 will be able to use the extra cards. You can always buy extra cards later.
The Radeon is advised for Pro App use, however, as it has much better Core Image performance and a much greater range of working color depths. It is much faster than the GeForce and no comparable NVIDIA cards are yet offered as a BTO option for the Mac Pro. Both cards come with dual-link DVI and Mini DisplayPort connectors.
Note the absence of the NVIDIA Quadro FX.
Optical Drives - Not much to say really, except no Blu-ray.
Displays - The new graphics cards have support for the DisplayPort standard so the new 24" LED Display can now be used by Mac Pros, in addition to the traditional 30" Cinema Display. It looks like the 20" will not be replaced.
Note: you must have two GeForce cards in order to connect a second 24" display, or a Mini DisplayPort to Dual-Link DVI adapter if you are connecting two 30" displays.
My advice would be to go for the 30" because it is not glossy (there unfortunately isn't a matte option for the 24") and if you want to connect more than one, your choice of graphics card is not restricted.
Other minor aspects - There is no FireWire 400 - it's FW 800 only, like the MacBook Pro. You can use FW 400 devices with a converter cable. Bluetooth is now built-in.
Conclusion
It's a product refresh - you can't expect a whole host of new features. I think the Mac Pro refresh was a decent one (and long overdue) although I would prefer more display options from Apple. The 24" should have a matte option for those that prefer it, but what I dislike the most is that you are tied to the much slower GeForce if you want to add two of these.
Additionally, no-one really knows the future of the 30". Is it wise to buy one now when there could be a possible refresh in the near future? Or is it actually
better to buy one now in case Apple gives us an inferior refreshed product in the future (it has happened before)? Or should we just buy from an alternative manufacturer? That is the question.
I'm really glad they chose to release these machines while Leopard was still around. It means that when I come to buy one in the near future, I can downgrade to Leopard if problems occur with Snow Leopard. It's not best to be an early adopter of an OS if you use it for professional work, nor is it best to downgrade to an earlier OS that does not support your computer.
The price hike for the Mac Pros was less welcome but this is mainly due to the increased cost of the CPUs from Intel, so it was not unexpected. Whenever Apple gives us something, they take away something else - but I do think in this instance Apple has given more than they have taken.
Update: Apple also gave the 15" MacBook Pro a speed bump.
Posted by Jon Chappell on Mar 3 2009 to
Hardware,
Apple,
AnalysisPermalink20" Cinema Display discontinued
MacRumors is
reporting that Apple has now officially discontinued the 20" Cinema Display, not long after the 23" display was also discontinued.
Although Apple offers a newer
24" LED display, this is currently only compatible with Apple's laptop range using the new Mini-DisplayPort connectors. There is no adapter available to connect these up to a DVI-enabled machine. This means that the only current choice for Mac Pro buyers is a
30" display, which may not meet their budget or space requirements.
Never fear, the most probable reason for EOL-ing the display is to make way for new stock that will most likely ship when new Mac Pros with (Mini) DisplayPort connectors are released. That is the core market for these displays - I doubt many laptop owners have purchased one. Here's hoping they'll take a leaf out of the new 17" MBP's book and offer a matte option.
Note: Apple is no longer shipping these to resellers, but that's not to say these resellers haven't got a few 20" displays still in stock. If you call around, you might be lucky.
Posted by Jon Chappell on Feb 19 2009 to
Apple,
HardwarePermalinkCompressor error: "Unable to connect to background process"
The "Unable to connect to background process" and "Unable to submit to queue" messages are common errors that unfortunately have many causes.
Before you do anything else, check that your version of Compressor is compatible with your operating system. Only the versions included with FCP 5.1.x and 6.0.x are compatible with OS X 10.5. If you have an incompatible earlier version, you will need to either upgrade Final Cut Studio or downgrade your operating system.
Try the following steps:1. In Compressor, go to
Compressor > Reset Background Processing.
2. Run
Compressor Repair.
3. Trash Compressor preferences (can also be done in Compressor Repair).
4. Try
these steps (use at your own risk).
Do the following if nothing else works:5. Disable your internet / network connections.
6. Reinstall Compressor and Qmaster.
7. Perform a full erase and install of the operating system and reinstall from scratch.
Posted by Jon Chappell on Feb 14 2009 to
Apple,
Final Cut Studio,
SoftwarePermalinkPowerBooks to become obsolete in March
Just a heads-up: the following product lines will be obsolete on March 17th:
* PowerBook G4
* Power Mac G4 (Digital Audio)
* Power Mac G4 (Quicksilver)
* Macintosh Server G4 (Digital Audio)
* Macintosh Server G4 (Quicksilver)
The following lines will become "vintage" on March 17th (this means that replacement parts will only be available in California for a limited time):
* Xserve RAID
* Xserve (Slot Load)
* Xserve (Cluster Node)
If you own any of these items, it is worth stocking up on spares and getting any issues fixed before the March 17th deadline.
[via
TUAW]
Posted by Jon Chappell on Feb 4 2009 to
Apple,
HardwarePermalinkSpeculation on Mac Pro refresh
It's been more than a year since the current Mac Pros came out. Although the software to fully take advantage of them is still not here, a year is a long time and technology has moved on. As a 2009 refresh is very likely, here's some speculation on what the new machines are likely to be like.
First of all, a release to coincide with Snow Leopard is very likely, as the Mac Pros are the best-equipped machines in Apple's lineup to show off the new OS. Snow Leopard will be released (assuming no iPhone-related delays this time) in either Q1 or Q2 2009, discounting any hardware that is due to be released after this date.
CPU
I'm almost certain this will be a Xeon 5500 series "Gainestown". That will be Intel's most powerful CPU line until Beckton towards the end of the year.
Although the clock speeds are identical to the Harpertown range inside current machines, they offer significant performance boosts elsewhere. The biggest of these is an on-die memory controller (i.e. built into the CPU instead of on the motherboard). This reduces bottlenecking significantly and is something AMD's chips have had for several years. It will provide a major performance boost.
Another new technology is QuickPath Interconnect, which replaces the legacy Front-Side Bus (FSB). The FSB connects all system devices and memory to the CPU through a single interface. This is now split up, with the new memory controller handling memory and QuickPath Interconnect dealing with the other system components. You may have noticed that the caches on these CPUs are smaller than their predecessors - this is because the greater efficiency in the new architecture means data spends less time in cache memory.
There have been several optimizations to multithreading, including hyperthreading which allows two threads per core (great for Snow Leopard). Although Gainestown is limited to four cores per CPU (8 in total in a Mac Pro), Apple may market it as a 16-core machine because of the 8 extra logical cores. True 16-core machines will not be available until the end of the year when the Beckton series is released.
Memory
You're probably familiar with dual channel memory which doubles memory bandwidth. That's why you have to install Mac Pro memory modules in pairs.
The new architecture has triple channel memory! Mac Pro motherboards are expected to have three rows of four memory sockets, totaling a maximum of 96 GB (12 x 8 GB). You would be required to install chips in groups of three.
Hard Disk Options
2 TB internal hard disks are now available so it seems likely that Apple will offer these in their machines. This will allow up to 8 TB in total.
What about solid-state disks? I doubt they will be offered for the Mac Pro just yet. They're too small for media storage (unless you can afford to RAID them) and although they are a decent size for boot disks I don't think they are suitable for that purpose just yet.
I always put Western Digital Raptors (10,000 RPM) as boot disks inside my machines because they reduce boot times, load applications faster, and everything is generally more responsive as memory can be paged to and from disk a lot faster. So the fast read speeds of SSDs are welcome from me, but there are two problems. Writing is slow. The OS writes a lot of data to disk and you will notice a slowdown when multitasking or using a lot of memory at once.
The second problem is that each memory cell inside the drive has a lifetime of around 100,000 writes. You can easily exceed that in the lifetime of your computer, particularly if it is switched on constantly. Modern chips try to get around this by writing evenly to all areas of the disk in order to balance it out, but the usefulness of this will depend on the total size of the disk.
SSD technology looks very promising and these are problems that will be overcome as time goes on, but they are not ready for this kind of usage just yet in my opinion.
Graphics cards
I don't know what the stock graphics card will be but the following cards may be offered as options:
Radeon 4870 - This is a high-end card capable of accelerating H.264 and MPEG-2 encoding and decoding. ATI's drivers are traditionally much better optimized for Core Image than NVIDIA's so Final Cut Studio performance is likely to be good. Crossfire technology is available on the PC version of the card - it remains to be seen if this is something Apple will embrace. Another version, the 4870 X2 with dual GPUs, will not be available for the Mac.
It comes with DisplayPort and HDMI connectors. Apple may request a Mini DisplayPort connector instead (or in addition).
GeForce GTX 285 - This is a single-GPU card that is SLI-capable (NVIDIA's equivalent to Crossfire), should Apple choose to utilize that technology. This card does not offer DisplayPort by default so this is something likely to be requested by Apple for the Mac version.
Let's hope NVIDIA improve their Mac drivers to offer better Core Image performance.
Quadro FX 5800 - This card supports DisplayPort technologies as well as the brand-new OpenGL 3.0 specification (which the other cards do not). It's very fast but also very expensive. It is not necessarily guaranteed to make a significant difference to Pro App usage because, while it has a lot of raw power, it does not have some of the optimizations that the other cards have (e.g. H.264 hardware acceleration), and I don't know how well-optimized for Core Image they are. In addition, raw power is worthless if it is bottlenecked by other components in your system.
With the launch of Snow Leopard, Apple will be trying to sell us multiple graphics cards in our machines. I would personally wait until I have read reviews before deciding on purchasing multiple cards for Pro App usage. Also, I would have to wait until Final Cut Studio 3 came out anyway because multiple cards with FCS 2 cause problems.
Things you shouldn't hold your breath for
* eSATA - Apple has completely ignored this particular technology in the past - this time around will most likely be no different.
* FireWire S3200 / USB 3.0 - It's early days and I'm not aware of any devices currently supporting the new standards.
Conclusion
It's pure speculation but if my predictions come true, there will be a hell of a lot of new tech in the Mac Pros. Which is great because they'll be leaving a lot of legacy technologies behind - but on the other hand, new things carry a certain degree of risk.
The first-gen Mac Pros needed a couple of firmware updates to fix minor issues, and I have my own rule that says I refuse to use an operating system for professional work until at least 10.x.4. This rule will be particularly crucial for Snow Leopard which now has a 64-bit kernel, meaning every system component will need new drivers. This is fine for the hardware that ships with your machine but what about third-party capture cards, graphics tablets etc? I don't think it's going to be a huge problem but it's worth thinking about in advance.
Either way, 2009 looks pretty good for video professionals.
Posted by Jon Chappell on Feb 4 2009 to
Apple,
Hardware,
AnalysisPermalinkQuickTime 7.6
As I'm sure you are already aware, QuickTime 7.6 was released yesterday. Unlike a lot of recent releases that were provided solely for compatibility with new iTunes versions, this one has a lot of things that can benefit pro users.
First, let's look at the
change list:
Video:* Improves single-pass H.264 encoding quality
* Increases the playback reliability of Motion JPEG media
Audio:* Improves AAC encoding fidelity
* Audio tracks from MPEG video files now export consistently
Almost all of the main features improve exporting, and so it only benefits Pro App users and people who purchased QuickTime Pro. Furthermore, they all improve quality and performance in one way or another.
But Apple never details every single change made in detail. Discrete Cosine
discovered that QT 7.6 can now demux MPEG-1 audio, meaning you can convert an MPEG-1 file to another format and the resulting file will have both video and audio.
Meanwhile, on ProLost, Stu Maschwitz
discovered that QT 7.6 fixes clipping issues on footage imported from the Canon 5D MK II. However, as he notes, this could drastically change the look of an existing project if you update in the middle of it.
So in all, this looks like a pretty good update for Pro App users. However, the update has only been out for a day which doesn't leave much scope for discovering potential problems. If you look at the ProLost link above, some commenters are already complaining about slow playback performance with some codecs.
The Golden Rules (TM) of Updating
As always, the Golden Rules (TM) apply:
1. Never update in the middle of a project.
2. Only update if this update fixes a problem you have been experiencing (i.e. don't install it if you don't use these codecs).
3. If you do decide to update, give it a couple of weeks for any significant issues to surface that would affect your workflow.
4. Make a clone or backup of your system drive before you install.
Here are the download links:
QuickTime 7.6 for LeopardQuickTime 7.6 for TigerImportant Update!MacFixIt is
reporting many problems with this update. It would seem Apple has made significant changes under the hood that are causing compatibility issues with everything from the Finder to third party codecs - even to video games. The MacFixIt page lists several workarounds.
My advice is to avoid this like the plague until Apple releases 7.6.1 or third party developers update their software to be compatible.
Posted by Jon Chappell on Jan 22 2009 to
Apple,
QuickTime,
Final Cut StudioPermalinkGetting to Know the Terminal Part 2: More File Operations
In the
previous article, I showed you how to launch the Terminal and perform basic tasks like navigating through folders and dealing with files. Today I will build on this with more advanced file operations, working with directories, and wildcards.
Working with Directories
To create a new directory, navigate to the relevant parent directory using the cd command and type the following:
mkdir MyNewFolderRemember: as discussed last time, if you want a file name with spaces, you must do either of the following:
mkdir "My New Folder"or:
mkdir My\ New\ FolderWhat if you need to create several new directories? Simple:
mkdir Dir1 Dir2 Dir3A little-known feature of the mkdir command is that you can create multiple directories with just one command. Just separate them with spaces.
If you want to create a long chain of directories (e.g. Renders/Video/TIFF) you can use the -p parameter like so:
mkdir -p Renders/Video/TIFFPress Enter and it's all done, instantly. Imagine how long it would have taken to do that within the Finder GUI! This is why the command-line is still used in the 21st Century even though we have pretty GUIs to look at.
To remove a directory, use the rmdir command:
rmdir Renders/Video/TIFFThe above command assumes that all directories are empty. If they are not, an error will be returned. To remove a directory and all its subfiles and folders, use the following command:
rm -dR Renders(the d parameter tells it to include directories, R tells it to be recursive)
Wildcards
Last time I mentioned file operations such as cp for copying and mv for moving files. But what if you need to perform an operation on a large number of files at once?
Wildcards can be used to substitute characters. So if you want to copy, say, 100 files that are named Image.001.jpg to Image.100.jpg, you would use wildcards to substitute for the numbers. This will allow you to copy all of the files with one command instead of a hundred like so:
cp Image.*.jpg RendersQuestion mark (?) substitutes a single character. So for instance, if you had files called render_v1.iff, render_v2.iff and render_v10.iff and you typed
ls render_v?.iff, it would return only renders 1 and 2 because they are a single digit whereas render 10 is two digits.
Asterisk (*) substitutes a potentially infinite length of characters (including no characters at all). Use this if you don't know the precise length of the substitution. In the example above, if you type
ls render_v*.iff, it will return all three files because it matches both the 1- and 2-digit numbers. You can also type, for example, *. jpg to return all JPEG images or *.* to return all files in the directory.
So, going back to the 100-frame image sequence previously mentioned, you would type
ls Image.*.jpg to return a list of all of the images. That's all well and good, but what if you don't want to return all of the images - what if you only want a specific range?
Braces ([ ]) can be used to be more specific. In the above example, type
ls Image.[20-30].jpg to restrict the results to frames 20-30. You can also restrict characters in the same way, such as [b-f] (remember that everything is case-sensitive).
If your numbers or letters don't fall into a sequential range, you can pick a set of non-sequential numbers or letters such as [brz] or [179] to match any of these characters. You can also combine them with ranges like so:
ls Image.[1-10,12,14,20-40].jpg. This will return frames 1-10, skip frame 11, return 12, skip 13, return 14 and display frames 20-40.
And if you don't want specific characters to be returned, use the following syntax: [^bgv].
Combining the examples above: if you want to match a file starting with the letters a-c or x-z, with three miscellaneous characters in the middle, ending with a three-digit number at the end, you would type
ls [a-cx-z]???[0-9][0-9][0-9].*. As you can see, it gets complicated pretty quickly.
But imagine if you had to search through and move or copy those files manually. It would be time-consuming, tedious and prone to human error. The command line comes into its own when you want to perform operations on a large number of files at once.
Editors can get away with not knowing this (although it can be very useful for them to know) but it is required knowledge for anyone who wants to get into visual effects.
I had originally planned to cover permissions here but I'm going to move it to the next article because I went into a lot of detail and it's too large to add on the end of this one. I'd much rather delay it than miss out information.
So next time I will be covering file permissions, symbolic links and opening, viewing and saving text files.
Posted by Jon Chappell on Jan 19 2009 to
Visual Effects,
Software,
ApplePermalinkMacworld 2009 Keynote
I've been busy today so apologies for the lateness of this post. I almost entitled it "Macworld 2009" before adding "Keynote" when I remembered that there is more to Macworld than just the keynote. And, of course, that's something IDG will be banking on next year when Apple will sadly be absent.
Phil spent a lot of time on iLife and iWork. I won't say much about them except that the Keynote Remote is an awesome idea.
Onto the 17" MacBook Pro. There's been a lot of disappointment with Apple's recent pro notebook releases, and Apple has luckily made some excellent decisions with this new one. It's glossy but you can thankfully change it for a matte screen for $50. It's considerably faster than the 15" one (up to 2.93 GHz, 6 MB cache, up to 8 GB RAM). It comes with a 320 GB 5,400 RPM hard disk that can be upgraded to either a 7,200 RPM disk or a 128 or 256 GB solid-state drive (I didn't realize they made SSDs so big nowadays - they're really advancing within the market). Like the 15", it comes with two Nvidia graphics chips and a large glass trackpad.
Like the 15", it's also Firewire 800-only. Luckily FW800 is backwards-compatible with FW400 so it's just a case of using an adapter, but that's one more thing to carry around with you. Not really a deal-breaker though.
There is some controversy over the battery. You see, it's fixed. I see that as a good thing for some and a deal-breaker for others. It will give you up to 8 hours of "wireless productivity" which is 3 hours more than the 15". It will also take much longer to deteriorate. For me, as someone who doesn't own spare batteries, I see that as a very useful thing.
However, if you regularly use your machine outdoors for more than 8 hours at a time, or are planning a trip to the Amazonian rainforest where it might be days before you see a power outlet, that could be a problem. So it's neither great nor terrible - it all depends on your needs. I can see third-party manufacturers filling this gap in the market though, much like the iPod "battery packs" that you can strap on.
The base model is still the same price - $2700. The 128 GB SSD adds $500 to the price and the 256 GB SSD adds $900. SSDs have now reached the point where their storage space is comparable with that of a regular laptop hard disk. Hopefully SSD manufacturers will now focus on lowering the price because they are still far too expensive.
It's going to be 3-4 weeks before they ship but Apple is accepting pre-orders today. If you select the matte screen it changes to 4-6 weeks.
The other announcements can be summed up quite quickly - fixed-price iTunes tracks are a thing of the past and Apple will now adopt price tiers of $0.69, $0.99 and $1.29. 8 million songs DRM-free today, the entire catalog DRM-free by the end of Q1. You can now purchase songs from the iPhone itself.
I was hoping Apple would go out with more of a bang considering it's their last Macworld but I guess their whole point was that they didn't need to save their big announcements for Macworld any more, as people would listen wherever and whenever it was. I wasn't expecting much to interest me as it's mainly geared towards their consumer line, but I was disappointed to see nothing of Snow Leopard.
Update: You can now view the keynote video
online.
Posted by Jon Chappell on Jan 6 2009 to
Apple,
IndustryPermalinkGetting to know the Terminal Part 1: Basic File Operations
The Terminal is an application that drives fear into the heart of a lot of Mac users - an application they only dream of using in their worst possible nightmares.
It's really not that scary - in fact, it can actually be a very useful timesaving device. You can perform operations on a large number of files at once in a fraction of a second, saving a lot of time.
Although the GUI is prettier and more intuitive, constantly moving, clicking and dragging the mouse around the screen wastes time - not to mention that rendering the GUI takes away precious processing cycles from the operation you are trying to perform. And you don't even need to constantly type things either - you can write a shell script to perform a task and set it to run automatically.
If you are thinking of entering the visual effects industry, most employers will expect basic command-line knowledge and shell scripting abilities. While most VFX houses use some form of Linux, Mac OS X's Terminal is almost identical with the exception of a small number of proprietary commands.
So let's get started.
Setting up
First of all, open up the Terminal by navigating to
/Applications/Utilities and double-clicking the Terminal application. I find it useful to ctrl-click the dock icon and select
Keep in Dock so it is always there for convenience, but this is up to you.
A window like this will appear:
The title bar of my window says
"Terminal - bash - 80x24".
bash
refers to the shell I am using. There are various different shells available, each with minor differences. We will just concentrate on bash. Incidentally, if your title bar doesn't say "bash", type
bash
and press enter.
80x24 refers to the number of characters that can be displayed on screen at once - 80 horizontally and 24 vertically. If you resize the window these numbers will change. It doesn't matter if yours has a different value to mine.
Directory navigation
You will see something like this on screen:
Last login: Mon Jan 5 15:27:17 on ttys000
MacBook:~ Jon$
MacBook is the name of my machine, Jon is my username. The ~ indicates that the current directory is my user directory. To view the full path of the current directory, type:
pwd
This stands for
Print Working Directory and on my machine outputs the path
/Users/Jon
. The working directory is the directory the shell will perform all commands in unless specifically told otherwise.
To change to a different working directory use the
cd
command like so:
cd Documents
The prompt changes to
MacBook:Documents Jon$
.
It's worth noting at this point that all commands are case-sensitive, so
cd Documents
is not the same as
cd documents
, and
cd
is not the same as
CD
.
There are some specific shortcuts you can use with the
cd
command that are summarized below.
cd ..
(that's cd
followed by two dots)
Moves up one directory. If the working directory was /Users/MyName/Documents, it would change to /Users/MyName.
cd -
(that's cd
followed by a dash)
Goes back to the previous directory you were in. So if you were in /usr/bin and you changed to /Library, this command will refer you back to /usr/bin again.
cd /
Changes to the root directory
It's worth mentioning here that shell commands are easily confused by spaces in a file path. If you must type a path with spaces, you must either:
a) Surround it in quotescd "~/Desktop/My Spaced Filename.doc"
or
b) Use escape charactersEscape characters are characters placed before a potentially conflicting character (a space in this case) so that the shell knows to treat it as text and not as a command. The escape character for the Unix shell is \ (backslash).
cd ~/Desktop/My\ Spaced\ Filename.doc
Viewing directory contents
If you want to view the contents of a directory inside the Terminal window, use the
ls
command. ls is short for "list" (you'll notice that shell commands are generally quite short as they need to be typed often).
cd /
ls
Returns:Notice that
ls
returns system files and folders that would normally be hidden by OS X, except for files and folders that have a dot at the front of their name such as .DS_Store. You can show these by typing
ls -a
(short for "all").
You can also specify a directory as a parameter such as
ls /usr/bin
and it will list the contents of this directory instead of the current one.
You can set several options when you call ls such as:
ls -l
(that's lower-case L)
Returns more detailed results including file sizes, permissions and modification dates.
ls -1
Forces one entry per line.
ls -h
"Human-readable" mode displays file sizes in kilobytes, megabytes and gigabytes instead of bytes.
ls -R
Recursively lists subdirectories (be careful - this can take a while).
You can combine as many of these parameters as you like such as:
ls -l -R
Or more simply:
ls -lR
(note: some parameters automatically override others)
These are just a few parameters of many. For exhaustive details of the parameters available, type:
man ls
This is an important Unix concept that also translates to OS X. Man (manual) pages are documentation files easily accessible from the shell using the
man
command. They will tell you everything you could possibly want to know about the command such as its syntax, parameters, compatibility and return values (more on that in the upcoming scripting tutorial).
You can use
man
with any command such as
man cd
,
man ls
,
man echo
. With the man page open, press Space to go to the next page and press q to quit and return to the shell.
This gives you documentation instantly at your fingertips, even if the machine you are using doesn't have an internet connection.
Basic File Operations
Use the
cp
command to copy files like so:
cp [source file] [destination path]
Here's an example on my system:
cd ~/Desktop
cp UntitledDoc.txt ../Documents
This will set the working directory to my desktop. It will then copy UntitledDoc.txt to my Documents folder (remember that .. refers to the parent directory).
You can also create a duplicate of a file within a directory by changing the destination filename:
cp UntitledDoc.txt UntitledDocDupe.bak
To copy a folder and all its subfiles and subfolders, use
cp -R
. Type
man cp
to learn about the other parameters.
To move a file, use the
mv
command with the exact same syntax as the
cp
command.
To rename a file, you can either use the
rename
command (same basic syntax as
cp
) or use
mv
like so:
mv myfile.txt mynewfile.txt
To delete a file, use
rm
:
cd ~/Desktop
rm myfile.txt
Some useful
rm
parameters are listed below:
-d
Delete directories as well.
-f
Force delete files, even if they are write protected.
-P
Overwrite files before deleting them. This is similar to the Secure Empty Trash option in Mac OS X.
-R
Recursively delete files inside subfolders. Use with the -d command to delete a folder and all of its subfiles and subfolders.
That's it for the first tutorial. In Part 2 I will be covering more file operations, working with directories, wildcards and permissions.
Posted by Jon Chappell on Jan 5 2009 to
Apple,
SoftwarePermalinkMacworld SF 2009 rumor roundup
As you are probably all aware of, tomorrow is the date of the Macworld San Francisco 2009 keynote by Phil Schiller instead of Steve Jobs.
MacRumors has done a great job of
rounding up the rumors pertaining to this event. It's definitely worth checking out - even if a lot of them seem to be from the same source.
It's also important to remember that Macworld SF is a consumer-oriented show so if don't expect too much in the way of professional products and equipment.
(As a side note: I would always advise buying the later speed-bumped version of a product, not the original. If Apple
does release a fixed-battery MacBook Pro, there's lots of potential for problems and issues with the first-generation.)
Posted by Jon Chappell on Jan 5 2009 to
Apple,
IndustryPermalink