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 > Commands v Applications v Programs

Commands v Applications v Programs
Thread Tools
bkb
Dedicated MacNNer
Join Date: Sep 2003
Status: Offline
Reply With Quote
Jun 12, 2004, 01:34 PM
 
Hello people,
I'd appreciate it if someone could clarify a very basic but fundatmental Unix concepts. I'm currently reading Matisse's Enzer's UNIX for Mac OS X. Early in the book, he discusses the relationship between commands, applications and programs. Here are some of the things he says:

"All applications are programs - the terms are synonymous."

"In Unix you often see the term command, which can refer either to an application that handles some specific task (such as copying files) or to a built-in feature of a larger program or application."

"Traditional Macintosh applications tend to have a great many features that allow you to accomplish complete projects all from within one application. [...] In Unix, commands tend to be focused on specific steps you use in a variety of different tasks. [...] This difference in approach shows a key difference in philosophy between that traditional Mac and Unix ways of thinking. [...] Unix provides a collection of smaller, "sharper" tools and expects you to decide how to put them together to acomplish your goals."

It's all very well written, however, I have two questions:
1) Are programs and applications really synonymous, or is there a subtle difference between them?
2) How do commands figure into the picture? He says that some commands are applications by themeselves and some are features of a larger application. How does this distinction work? Could someone please elaborate.

Apologies if this sounds pedantic. I'm new to Unix and I find it so slick that I'm enjoying going through it very slowly and letting the slickness sink in .

Thanks,
BKB.
PBG4/12"/1GHz/1.25GB/60GB//SD/APX/10.3
     
chabig
Addicted to MacNN
Join Date: Jun 1999
Location: Las Vegas, NV, USA
Status: Offline
Reply With Quote
Jun 12, 2004, 07:01 PM
 
I think it's fair to say that programs and applications are synonymous. And "command" can refer to a unix command that is commonly typed at the terminal (e.g. ls) or a command in an application (e.g. copy). In the first case, the command ls may be a program all by itself. In the latter case, the copy command is just a feature of an application.

Chris
     
melman101
Dedicated MacNNer
Join Date: Apr 2000
Location: Bronx, NY 10471
Status: Offline
Reply With Quote
Jun 12, 2004, 10:17 PM
 
Also, when they referred to "Unix provides a collection of smaller, "sharper" tools and expects you to decide how to put them together to acomplish your goals."

They are talking about pipeling, and other such things in unix such as

ls -al | grep Users

will only show you the output from the directory list that contains Users

Hope that clarifies something

Mel
     
wataru
Addicted to MacNN
Join Date: Oct 2001
Location: Yokohama, Japan
Status: Offline
Reply With Quote
Jun 13, 2004, 10:43 AM
 
As was already said, application == program.

Here's an example of a command that is not a program: The program called ImageMagick provides a command called "convert." I believe this qualifies as a command but not as a separate program. Someone correct me if I'm wrong.
     
Arkham_c
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Jun 13, 2004, 06:45 PM
 
Here's a good example of command versus program/application.

Take the following command:

Code:
/usr/bin/find ~/ -name ".DS_Store" -exec rm {} \;
In the example above, the whole thing is a single command to the computer. It is executed by the program "/usr/bin/find", but the command is more than the program it uses. Does that make sense?
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
Zim
Senior User
Join Date: Apr 2001
Location: Cary, NC
Status: Offline
Reply With Quote
Jun 14, 2004, 09:42 AM
 
Originally posted by wataru:
As was already said, application == program.

Here's an example of a command that is not a program: The program called ImageMagick provides a command called "convert." I believe this qualifies as a command but not as a separate program. Someone correct me if I'm wrong.
I would disagree (but not strongly) I use convert by itself all of the time. I consider it part of the "package" that is ImageMagick, but a "program" in its own right (when I have to download and compile I think "program"). At the same time I can fully understand why you might not. Not saying you are wrong, just saying I think it is open to interpretation on both sides.

I'm not an expert in this, but have been a daily unix user since 1988 at work, and a daily Mac user at home for the same period. Personally I consider them all about the same. If someone wanted to split hairs, I'd say that app=prog, and that "commands" are "built-in" to the shell/kernel (like ls, more, cd, etc). Altho you can download and install replacements for these (ie. GNU ls that adds color).. do we then call these programs or commands ??? Then again, maybe a command is something you quickly execute, and program is something that you "launch" and "use" for a while (in that regard I'd have to call convert a command).

So when is a script a program or command??

Cheers,
Mike
     
Chris O'Brien
Grizzled Veteran
Join Date: Nov 2003
Location: Hebburn, UK
Status: Offline
Reply With Quote
Jun 14, 2004, 06:13 PM
 
Programs are applications. Commands can come in two different flavours, namely, shell commands and program commands. A shell command is just the shell executing a program (like ls or ifconfig or a lot of things... have a look in the your shells paths (including /bin /sbin /usr/bin /usr/sbin /usr/local/bin and all that - they are just applications... For example, wget is a program, but can be called as a command within a shell - you are also free to download and compile/install newer versions if you want, but it is purely the shell invoking a program when you type a command...)

Anyway - moving on from my ramblings: commands for a program are not other programs - they are just arguments (generally) for the program, and not other invoked programs...

make sense?
Just who are Britain? What do they? Who is them? And why?

Formerly Black Book
     
Gavin
Mac Elite
Join Date: Oct 2000
Location: Seattle
Status: Offline
Reply With Quote
Jun 17, 2004, 08:53 AM
 
I'd put it this way:

A command is a verb. A program is a noun.

The binary 'convert' sitting in /usr/local/bin/ is a program, an object. When you type convert into the terminal, that is a command; as in, "terminal, run this program!"


I tend to think of Applications as complicated programs that solve your whole problem.

TextEdit lets you write a letter to gramma, edit it and print it, it's focused on one purpose. It's an application.

grep does a pattern match on a file - it's a tool that can be put to many uses. it's a program.

For me Application is a subset of Program. While every application is a program not every program is an application.

I also think of an application as interacting directly with the user. I'd call Safari an application, but not php. Print Monitor is an application, the epson driver is not.
     
bkb  (op)
Dedicated MacNNer
Join Date: Sep 2003
Status: Offline
Reply With Quote
Jun 18, 2004, 11:11 AM
 
Thanks for your replies. It is evident that there is a grey area here, and that most of this discussion is open to interpretation. In other words, commands, programs and applications (and scripts) all overlap each other in various ways. But it is useful to get an idea of how this works.

Thanks,
BKB.
PBG4/12"/1GHz/1.25GB/60GB//SD/APX/10.3
     
Zim
Senior User
Join Date: Apr 2001
Location: Cary, NC
Status: Offline
Reply With Quote
Jun 21, 2004, 10:24 AM
 
Regardless of what we all call them, the real "slickness" of unix is that you can take any combination of many of these (even appls that have command-line processing) and throw them together into a csh/perl/etc script that will do a many-stepped job with only one typed "command".

Best of luck with the learning.

Mike
     
bkb  (op)
Dedicated MacNNer
Join Date: Sep 2003
Status: Offline
Reply With Quote
Jun 22, 2004, 11:57 AM
 
Originally posted by Zim:
the real "slickness" of unix is that you can take any combination of many of these (even appls that have command-line processing) and throw them together into a csh/perl/etc script that will do a many-stepped job with only one typed "command"
Zim,
I'm not quite there yet. I look forward to it already.

So where does the term software fit into this equation. Is software the larger meta-set which includes all the others - commands, programs, applications, scripts - within it?

And does the line between software and hardware ever get grey?

Thanks,
BKB.
PBG4/12"/1GHz/1.25GB/60GB//SD/APX/10.3
     
genevish
Mac Enthusiast
Join Date: Jan 1999
Location: Marietta, GA, USA
Status: Offline
Reply With Quote
Jun 22, 2004, 12:55 PM
 
So where does the term software fit into this equation. Is software the larger meta-set which includes all the others - commands, programs, applications, scripts - within it?

And does the line between software and hardware ever get grey?
Well, I would say software == program == application, although others may disagree (and probbably will).

Ultimately, does it really matter? Call them all software and be done with it. They're just stuff that let's you do things with your computer...
Scott Genevish
scott AT genevish DOT org
     
absmiths
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status: Offline
Reply With Quote
Jun 22, 2004, 03:20 PM
 
I think historically applications are meta things like programs with complex linkage and meeting the specific criteria of a visual environment - be that X Windows, Windows, DOS, curses, Amiga, Mac OS *, etc. A program is usually a single compiled binary such as what Mac OS X calls a 'tool' - or a simple command-line executable. I also tend to consider 'command's to be command-line tools or built-ins (thus the term command line).

A single perl script would be a program, but a complex perl website with multiple scripts, etc, would be an application (or web application if it matters).

So, I would generalize it like this:

program is software

application is software

application usually contains multiple programs and/or supporting files and is designed for a high-level user interface (usually) to accomplish high-level tasks.

*command is a program

command is a simple, specific tool to accomplish a particular task.

That's my take. I don't really think it's useful to equate all 4 words (software, program, command, application) since I think they have different implications.

*In the definition by one of the earlier posters command can become so vague as to simply mean "feature", supported by the very existence of the Command key on the Mac keyboard for invoking functions.
     
Zim
Senior User
Join Date: Apr 2001
Location: Cary, NC
Status: Offline
Reply With Quote
Jun 23, 2004, 05:02 PM
 
Originally posted by bkb:

And does the line between software and hardware ever get grey?
Heh, well a large part of my career is designing FPGAs (chips), that are designed in code (Verilog)... is it HW or SW? And what about those small micro-controllers in every gizmo.. and the firmware that makes them run.. what are they? :-)

When does software->firmware->microcode->?? leave the SW realm and become HW? (or at least something that the SW weenies want no part of )

LOL, who knows.

Yes its a "grey" (not black or white) world.

Mike
     
bkb  (op)
Dedicated MacNNer
Join Date: Sep 2003
Status: Offline
Reply With Quote
Jun 23, 2004, 06:53 PM
 
Originally posted by genevish:
Ultimately, does it really matter?
Nope, it doesn't matter one bit.

Originally posted by Zim:
When does software->firmware->microcode->?? leave the SW realm and become HW? (or at least something that the SW weenies want no part of )

LOL, who knows.

Yes its a "grey" (not black or white) world.

Mike
I see. The working definition that I've used all along is that when you throw a computer out the window the hardware is the part that makes the noise. I guess I'll stick with that for the moment.

Thanks,
BKB.
PBG4/12"/1GHz/1.25GB/60GB//SD/APX/10.3
     
Gavin
Mac Elite
Join Date: Oct 2000
Location: Seattle
Status: Offline
Reply With Quote
Jun 23, 2004, 11:19 PM
 
Originally posted by bkb:
I see. The working definition that I've used all along is that when you throw a computer out the window the hardware is the part that makes the noise. I guess I'll stick with that for the moment.

So you've answered your own question then.
     
Zim
Senior User
Join Date: Apr 2001
Location: Cary, NC
Status: Offline
Reply With Quote
Jun 24, 2004, 08:48 AM
 
Originally posted by bkb:
Nope, it doesn't matter one bit.



I see. The working definition that I've used all along is that when you throw a computer out the window the hardware is the part that makes the noise. I guess I'll stick with that for the moment.

Thanks,
BKB.
That's a good definition.. its just always funny to see internal to a big company which parts seem to fall into the limbo of the HW vs. SW dept thinking that part is "theirs" (I've lived on both sides of the aisle and frankly like that very middle/grey section).

Anyway, we're rather off track now.

Nutshell: unix is good stuff, very excited to finally have it under the hood of my Mac, so now I have it both at work and at home.

Mike
     
   
 
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 06:07 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.,