Do you guys use the terminal?

DotKomrade

Well-Known Member
Joined
Feb 24, 2009
Messages
171
I'm a designer and pretty much the only 2 things I use it for are show hidden files:

defaults write com.apple.Finder AppleShowAllFiles YES

And force eject a stuck disc:

drutil tray eject

Both pretty handy.
 

PaulMark

Well-Known Member
Joined
Mar 11, 2009
Messages
182
I'm a designer and pretty much the only 2 things I use it for are show hidden files:

defaults write com.apple.Finder AppleShowAllFiles YES

And force eject a stuck disc:

drutil tray eject

Both pretty handy.

Now with Snow Leopard you can use the GUI to force eject.
 

GreGorGy

BULLSFAN
Joined
Jan 18, 2005
Messages
15,289
You guys who use it all the time, I'm assuming you're mostly involved or experienced in programming or IT services?

Being a photographer, I have never seen the need to use it. But if you can suggest ways that it may be of use for me, I'm open for enlightenment? :)

Your assumption is correct somewhat about me. I have been in the publishing industry for 13 years. On a mac for around 15. PART of what I do does involve electronic publishing and website dev. In the old days, I ran a WebSTAR/FMPro web server which was rock solid and famously unhackable.

Now, its all just on the shell. So from time to time, I have need to jump in. Waste as much time as you can on MacOSXHints.com and you will discover hints like the above "defaults write". This is the power of the terminal for the normal user.

For the power user, ssh is useful beyond GUI alternatives. Also, my personal favourite remains
ls -laF

This gives a full folder listing which may not be apparently useful unless you are looking for something specific, carelessly hidden.

Quark does this: they assume no power users and trivially hide their own activation data. When they started shipping hardware keys (dongles) with ver 4 (for Mac - they arrived with v3 on 'doze) it took me three days in ResEdit and ResCompare to find a way around the dongle. My reasons for doing so are well documented. The dongle required an ADB port which was missing from early iMacs and all G4s so using hardware locked Quark on these macs required a little hacking. I broke no laws.

I took my knowledge forward to the activation days (Q6 onwards) and a little terminal digging and the three days it took me the first time was reduced to under an hour!

The terminal is your friend. Learn it...

And no, I won't tell anyone how to bypass software copy protection. My reasons for doing so are legit but what I know can be used for wide-scale piracy which I cannot condone.
 

Moklet Kcuf

Senior Member
Joined
Oct 14, 2004
Messages
767
...There is no quick way to do the above through the GUI.

Interesting, over my head, but interesting. When I've needed to do that kind of sorting, the old drag and drop in Lightroom or Bridge would be my approach.

Still, looking at how my brother in law, literally talks fluently to his servers through my Terminal, blows me away.

Must make time to learn a little.

EDIT:
The terminal is your friend. Learn it...
Noted
 
Last edited:

koffiejunkie

Executive Member
Joined
Aug 23, 2004
Messages
9,588
I just finished another bit of terminal foo and dropped it into a script in /usr/local/bin for easy execution. The problem I'm trying to solve is that my GPS logger creates .log files which are NMEA sentence format. Which no geotagging application will read. So initially I used GPS Babel to convert, but that's a rather tedious business, especially if I have a large number of logs.

Fortunately, gpsbabel, on the Mac at least, comes with as both a GUI and a commandline program. Enter the terminal. I order my logs in a subdirectory structure that looks like this:

2008/11/
2008/12/
2009/01/
2009/02/

You get the drift. So I copy all this months logs into 2009/09/ and convert them to gpx. Tomorrow I copy some more logs in. Now I have some logs and their gpx versions, and some logs that still need to be converted. The following takes care of that:

Code:
#!/bin/bash

cd ~/Pictures/GPS_logs/`date +%Y`/`date +%m`

for i in `find . -type f -iname '*'.log`; do  log=`echo $i | sed 's/.log/.gpx/'`; if [ ! -f $log ]; then gpsbabel -r -t -w -i nmea -f $i -o gpx -F $log; fi done

The first line changes to the directory for the current year/month. The second finds all .log files and checks if there is a corresponding .gpx file. If there isn't, it calls gpsbable to make one.

This is not a difficult script, it just took a bit of fiddling to get the syntax right. What used to take me anything from a few minutes to several hours and a lot of RSI inducing mousing, not takes me a few seconds.

The ultimate goal is to develop it further so that it will copy anything from the GPS logger that isn't already on the computer, put it in the correct directories (create them if they don't exist), and convert the logs that need converting. Then hook it up to automator so this happens automatically each time I plug in the GPS logger.
 

BobJones

Expert Member
Joined
May 29, 2006
Messages
1,508
Have any of you discovered Otto yet? He makes doing these types of things friendlier, while allowing you to script and access terminal?
Check out the latest episodes of Macbreak video.
 

greggpb

Expert Member
Joined
Apr 22, 2005
Messages
1,818
not being a mac user at all but having to asupport 3 macs of mates I find the terminal is the only way i can work a mac..

using semi linux commands
 

koffiejunkie

Executive Member
Joined
Aug 23, 2004
Messages
9,588
not being a mac user at all but having to asupport 3 macs of mates I find the terminal is the only way i can work a mac..

using semi linux commands

Now can you imagine how bewildering Windows is to a linux/mac user? :eek:
 
Top