Linux & Shell - Is Shell a must?
Solution 1:
Can't this be done without the concept of a shell?
Well, no. You need something that interprets your intent and invokes the appropriate program. That thing is called a shell.
EDIT: For the avoidance of confusion, "shell" does not mean "command line interface". From http://en.wikipedia.org/wiki/Shell_(computing):
"Operating system shells generally fall into one of two categories: command-line and graphical. Command-line shells provide a command-line interface (CLI) to the operating system, while graphical shells provide a graphical user interface (GUI). In either category the primary purpose of the shell is to invoke or "launch" another program; however, shells frequently have additional capabilities such as viewing the contents of directories."
As for your other question, the shell is doing wildcard expansion for both commands, but when you are searching for files using find you want find, and not the shell, to do the expansion, since you want it done in the locations find is looking in and not in the location it was invoked from; therefore, you escape the * to stop the shell expanding it, so that find can see it.
Solution 2:
You can of course do everything through a GUI. Windows' Find Files (from XP and earlier) is a somewhat GUIsh equivalent of the command you typed.
Now, why do UNIX (and Linux) users like shell? Because you can take the output, feed it into another program, and get different output. For example:
find | grep burek
These are two commands, find
and grep
, one feeding the other. find
lists all files in current and all child folders, one per line, and grep
prints out only those lines that contain burek
.
Now, there are other, more complex things, such as:
ls -R | sort | uniq
ls -R
lists files in current and child folders, and sort
sorts the output. uniq
then gives us only unique lines.
Now, while you can code all this into a GUI, you can quickly do such tricky stuff with command line that you can't ordinarily do with GUI unless you go write your own. In which case, it's faster to just type it into command line, isn't it?
Bottomline: If you ask this, you don't need it. Command line is useless for you as a regular user. Command line is however great for sysadmins, for developers, and those who want to mess around with their computer in a fast fast fast way.