Terminal Commands

Joined
Feb 24, 2015
Messages
8
Reaction score
0
Points
1
This will show you lots of Terminal commands and how to make a .command file!

1. to make a .command file simply open up TextEdit and click [format] then "make plain text".

2. type in each command, line after line

3. when your done save it as a name.command and save it on your Desktop!!!!

4. open up terminal and paste in this code: chmod a+x ~/Desktop/name.command
and hit enter

5. now you can run the name.command !!!

COMMANDS:

OPEN - allows you to open a folder or a url

open ~/directory

open http://www.mac-forums.com

SAY - allows your mac to say a text out loud

say (your text here)

WHILE - allows Terminal to repeat a command

while (true) do
command1
command2
command3
done

MV - allows you to move a file to a different location

mv ~/directory ~/location

MKDIR - create's a new folder

mkdir "folder name"

CD - changes a targeted directory (uesd for mkdir)

MORE COMING SOON...
 
Last edited:

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,112
Reaction score
1,432
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio, macOS Ventura, 32 GB
Joined
Nov 28, 2007
Messages
25,564
Reaction score
486
Points
83
Location
Blue Mountains NSW Australia
Your Mac's Specs
Silver M1 iMac 512/16/8/8 macOS 11.6
Better off without them with a lot of newer members accessing the forum. Powerful black magic Terminal unless you know PRECISELY what you are doing.
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
I'm not even sure why I'd use that particular while statement.. Also open does a lot more than that ;)

man - the most important command you'll ever know.
 

IWT


Joined
Jan 23, 2009
Messages
9,406
Reaction score
1,453
Points
113
Location
Born Scotland. Worked all over UK. Live in Wales
Your Mac's Specs
iMac 5K Retina 27", August 2019, 3.6GHz Intel Core i9, Memory 32GB, 2TB SSD, macOS Monterey 12.6.3
May I be permitted to echo Harry's remark? Terminal is for advanced users. Granted, there are plenty and LucasMan seems to belong to that fraternity. The problem is that many users feel themselves enabled to dabble by apparently simple commands not realising that spaces, for example, or not splitting lines can be critical. The Forums abound with folks who've become a cropper through misuse of Terminal, often to the extent of crippling their OS.

Caution, is all I advise.

Ian
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top