Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Terminal Commands

Terminal Commands
Thread Tools
.Neo
Mac Enthusiast
Join Date: Jan 2007
Location: Amsterdam, NL
Status: Offline
Reply With Quote
Nov 3, 2007, 09:43 AM
 
I was wondering if anyone here knows a good tutorial for Terminal. Maybe list with commands and explanation how to navigate around files and folders, moving/copying stuff etc.

A list of Mac OS X related commands would be appreciated as well. Like how to hide/unhide hidden files/folders etc.

Thanks!
     
MacosNerd
Professional Poster
Join Date: Jun 2007
Status: Offline
Reply With Quote
Nov 3, 2007, 09:55 AM
 
Your better off getting a book regarding this. There's way too many commands to do just about anything. O'Reilly unix in a nutshell is a good one.

When you come a across one that you want more info (and don't have a reference book) type man <command>, such as man cp, to see how the copy command works.
     
.Neo  (op)
Mac Enthusiast
Join Date: Jan 2007
Location: Amsterdam, NL
Status: Offline
Reply With Quote
Nov 3, 2007, 10:03 AM
 
Well I was more thinking about a bunch of basic commands. Like how to navigate through folders, copy/move files and folders. I don't really need to get into all the really advanced stuff.
     
ghporter
Administrator
Join Date: Apr 2001
Location: San Antonio TX USA
Status: Offline
Reply With Quote
Nov 3, 2007, 10:07 AM
 
Google "BSD commands" and see what you get-OS X is derived from Free BSD, so it uses a (rather large) subset of BSD commands. There's also Terminal's "help," and the in-application use of "man" commands to get the manual page for specific commands. It's not hard, it just takes looking in a few places.

Glenn -----OTR/L, MOT, Tx
     
.Neo  (op)
Mac Enthusiast
Join Date: Jan 2007
Location: Amsterdam, NL
Status: Offline
Reply With Quote
Nov 3, 2007, 10:19 AM
 
I'll give it a shot thanks.
     
~bash $
Forum Regular
Join Date: Feb 2007
Status: Offline
Reply With Quote
Nov 3, 2007, 10:24 AM
 
Well, I can get you started! The most important command you'll come across is 'man'. It's the manual. type:

man ls

to get a 'man' page on nearly any command on your system. Most of these are great places to start, but sometimes they are a bit daunting. They'll at least give you an idea.

(press return after each command ... )
'ls' by the way is the list command, that shows files in the current directory.
To see what directory you are in, you can type 'pwd'.
To Change Directory, type 'cd'
A '~' means your HOME directory, which in Mac OS X is default to the absolute path of /Users/<username>/

(A forward slash in UNIX-land denotes a directory.)

so 'cd ~' will take you back to your home dir. So will 'cd' without a path.
Press the tab key incessantly at every step in order to see everything you can type

One fun command is:
'say' which is the command line version of Mac OS X's text-to-speech system. It defaults to the default voice on the machine and you can have all kinds of sophomoric fun with it.
syntax: 'say yo momma'

By the way, 'cp' and 'rm' are the copy and remove commands, respectively. Think before using them! It's worth nothing that files you 'rm' successfully don't go to your trash can; they're just gone. So be careful.

While this should get you started, some good tutorials are out there, but like others, I prefer to use a book. There are several Mac OS X/UNIX type books out there, the ones for Tiger aren't horribly outdated in my opinion. The Visual Quickpro Guide series I have found to be a good start. Mac OS X Tiger for UNIX Geeks is a bit more advanced but a great book.
     
Hal Itosis
Grizzled Veteran
Join Date: Mar 2004
Status: Offline
Reply With Quote
Nov 3, 2007, 10:42 AM
 
( Last edited by Hal Itosis; Nov 3, 2007 at 02:36 PM. )
-HI-
     
Simon
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Nov 3, 2007, 10:42 AM
 
Since you're from Holland I guess you understand some German. This guide is a brief but excellent shell reference, but unfortunately AFAIK it's only available in German.

http://www.schatenseite.de/uploads/media/shell.pdf
     
.Neo  (op)
Mac Enthusiast
Join Date: Jan 2007
Location: Amsterdam, NL
Status: Offline
Reply With Quote
Nov 3, 2007, 11:30 AM
 
~bash $: Thanks, I'll look into it!
Simon: Haha I'm afraid my German is a bit rusty, it's definitely nowhere near my English skills. Thanks though.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 08:18 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,