AMITIAE - Wednesday 12 September 2012
Command Line Work: New Users and Terminal (1) -- A Quick Look Round |
|
By Graham K. Rogers
When OS X arrived, it was not long after buying my first iMac -- the large polycarbonate one with a CRT monitor -- that I found it was easy to access the Unix via the application called Terminal. Since then, although I work 99% of my time with the normal OS X interface, there are occasions when some subtle changes -- for example to certain applications and how they work -- can be effected more easily at the command line. Many users, however, take one look at the great gulf that appears before them and run away. Don't run: learn.
TerminalTerminal is an application that may be found in the Utilities folder of Applications. Using Launchpad it can be seen in the folder marked Other. I drag it to the Dock for easy access.When Terminal first opens, the user is shown a small window (80 x 24 on my iMac) in which Unix commands may be entered. That size may be a problem for efficient working, but there are three ways round this. At the top right of the panel is the full-screen double arrow. Pressing this fills the screen with the default white panel and that will be enough for most people. Alternatively, the cursor can be moved to the bottom left corner and, like most applications, this can be used to drag the panel to a more suitable size as a temporary change. Although there are preferences and controls for windows there (see below), oddly Apple has an Inspector (a Shell menu item, or Command + i) and in "Info" the size of the window may be set. I work with 160 x 55 on my MacBook Pro 15" which gives me a large enough display for most purposes.
White is boring, and when I first started using computers (MS DOS 2.3 and an IBM mainframe that I admit I was lost on) screens were green and characters usually yellow. Some were black with orange characters and there were variations, with a nice two-tone blue on a Zenith portable computer I saw. There are two ways to have these displays back again: using the Startup or the Settings panes in Preferences for Terminal.
If you want to see what these look like, the Settings pane has a small thumbnail of each in a column to the left.
As well as the window size, the color may also be changed. So that the default set remains, a gear icon at the bottom allows a duplicate panel to be created. Other controls in the same panel allow use of a background image. To test this out, I used a photograph from the Mae Klong market and in the text panel changed the color of the characters to yellow. Not all images are suitable of course and for normal work I prefer white text on a black background.
Simple CommandsTo start the ball rolling, users might want to try a simple command. In MS DOS, the command to see a directory listing was DIR. In Unix, this is ls. This will show a straightforward display of folders in the user's home directory.Unix however, is more flexible than DOS and by adding sub-commands after a space we can change the display. So ls -l will list all the folders with additional information about each, while ls -la will list all of the folders that exist including those that normally remain invisible.
Using the UP arrow on the keyboard will show previous commands (DOWN may also be used). To finish working in Terminal type, exit and press the Enter key.
Graham K. Rogers teaches at the Faculty of Engineering, Mahidol University in Thailand. He wrote in the Bangkok Post, Database supplement on IT subjects. For the last seven years of Database he wrote a column on Apple and Macs. |
|
For further information, e-mail to