Learning Unix for Mac OS X Panther
You can do a tremendous amount of stuff in Mac OS X Panther without ever touching the command line. This includes editing files, transferring them to remote locations, running a web server, and writing programs. Legend has it that some Apple developers wanted to ship OS X without a command-line application because it's anathema to the Mac "experience." But as Unix geeks will tell you, there are tasks which are much better suited to the command line. Routine, repeated, and automated tasks are some, as well as quick-and-easy access to files and directories.
This book is for the skilled Mac user who would like to know a little more about the operating system behind the scenes. There's also information about the Mac's brand of Unix, so someone familiar with Unix but new to the Mac will also find stuff to learn. For those confident in their Mac and Unix skills, however, there's not much new in the book's 168 pages. That's not to say it's a bad book; I found it quite enjoyable to read, and it's a good title to keep in mind to recommend to a Unix novice.
The book begins with an introduction to Terminal.app, the Mac's Unix terminal program. From the very basic (how to find with the Finder) to the fun (how to change the text and background colors) to the useful (how to save terminal sessions into double-clickable .term files), there's much that Terminal has to offer. There's even the cryptic echo '^[]2;My-Window-Title^G' command to change the title of Terminal's window.
The authors then introduce a few simple commands like date and who, and show how to manipulate the terminal's prompt. There's also alias which creates command shortcuts. For instance, if you always run ls with the -F flag, a command alias ls "ls -F" will save you some typing.
Each chapter has two sections which stand out. The "Practice" section gives a list of exercises to try, and the "Problem Checklist" is there to diagnose and fix unexpected behavior.
It's important (especially for those used to other OSes) to understand that in Unix, everything is a file, and all files are organized in the filesystem. This includes plain files, which might be Word documents or system logs; directories, which break up the filesystem into a tree; links, which allow file reuse with different names; devices, drives, etc. All these building blocks of the operating system are discussed. There are also a few pages on vi (which I found quite useful as my vi knowledge up to that point consisted of :q!.) and pico.
Printing on Mac OS X is much like printing on any Unix operating system; you can use pr to format text for line printing, enscript to format for PostScript printing, and lpr to actually queue a printer job. The addition that the Mac provides is a CLI to AppleTalk printers. You can use at_cho_prn to choose an AppleTalk printer and atprint to print to one.
One of Unix's biggest features is its ability to put together small programs to do many different tasks. To count how many files under your home directory are named foo, you can do find ~ -type f -name "foo" | wc -l. By breaking down a problem into components, you only need one-counting program, one file-finding program, etc. The book has a good chapter on this input/output redirection, and how to use those magic top-row characters |, >, >>, and <. Grep (and some light regular expressions) and sort are mentioned as tools for examining text. I thought sed would make a nice addition to this chapter, but perhaps it would lengthen the book too much.
Another advantage of Unix is its true multitasking. What may surprise newcomers to the command-line is that it is possible to run many jobs at once with a single interface. By running commands in the background, one can start large jobs and do other tasks while waiting. In the chapter on multitasking, the & modifier is covered, along with fg, bg, and kill to manipulate processes, and ps and top to report on them.
The command-line interface is lightweight enough that it can easily be extended by a network. This means it's easy (in fact, commonplace) to control a computer different from the one in front of which you're sitting. The authors cover the remote-shell commands ssh and its non-secure cousins, as well as other tools for accessing the internet such as ftp and curl.
The book closes with an introduction to the wealth of open-source software available for Macintosh, now that Macs run a functional Unix. The graphical Unix applications require an X server, which is easy to download and install. The authors show how to install Fink, the Macintosh open-source package manager, and a few big applications like OpenOffice.org and The Gimp.
The last chapter is both a resource list and suggestions for further directions. Those who learn a lot from this book may be interested in picking up shell programming or a scripting language such as Perl.
As I said at the beginning, the book is basic and well-written. Even if you feel it's beneath you, keep the title in mind when a newbie asks what the command-line is all about.
Matthew Leingang is a Preceptor in Mathematics at Harvard University. A funny sentence in the third person escapes him at the moment. You can purchase Learning Unix for Mac OS X Panther from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
pr0z7
eye jam r33+
OSX is _NOT_ NOT NOT UNIX!!!!!!
It's not BSD and it's not Linux and it certainly doesn't compare to Solaris/AIX.
How many times to we have to explain this!
The mac boys all pretend it is, but hey, anything steve says it true!
Think: do you know how to count the words in a Word file?
Tools -> Word Count
Why is that so hard? It's File -> Properties -> Statistics in OpenOffice.
Javascript + Nintendo DSi = DSiCade
In an old paper by Ritchie, it is pointed out that Unix comes from the Old Dutch, Unochs, which means "tree-based".
Just the other day I was fixing a friend's mac, and while I hadn't used OSX all that much, I do use linux, so I asked him, "okay, open up a terminal" because I knew it was possible, and it was so nice to be able to use (just about) everything I could in linux. It's definately something I wish Windows had...
"!"
Yeah, in Word you go to Tools -> Word Count, wow that was hard.
File -> Properties -> Statistics (at least in my version of word, 2001 or XP or something)
I metamoderate, therefore I am
Statement says "Think: do you know how to count the words in a Word file?" Answer: In MS Word that would be Tools/Word count not real tough.
Think: do you know how to count the words in a Word file?
File->Properties, Statistics tab
Pages, Paragraphs, Lines, Words, Charachters with or Without Spaces.
What's my prize?
I don't need no instructions to know how to rock!!!!
Yea, the big freaking button with "i" in a circle right in the middle of toobar. It will tell you characters, words, lines and pages. Even easier and faster to use than wc.
Eight thumbs up!
Also, buy the book at Amazon and save a good 4 bucks compared to BN. Yeah, that's an affiliate link in there you weenies
hooray! it's a sex wiki
Did you know that the number of words in a document is not a single value, but depends on the use of the document? I'm sure that Stephenson does know that: if you're writing for some audiences, you don't count the words in foot- or endnotes, whereas for others, you do. If you're writing for some audiences, you don't count "short words", whereas for others, you do.
And, of course, if you're writing in Japanese, wc counts your entire document as being one word long.
What does this have to do with Unix? It's a classic example of Einstein's dictum that everything should be made as simple as possible, but no simpler. The Unix command wc is a classic exmple.
The above did not mention Darwinports, an excellent alternative to Fink. http://darwinports.opendarwin.org/
I live in the terminal on my ibook. Darwinports provided wget, unison, tin, links, mutt, irssi, anacron, and a ton of other Unix stuff. Of course Macs already come with vim, emacs, and the ability to alias emacs='vim'.
Roll up your sleeves and open that terminal!
I have used Unix, Linux and Windows for years. I recently switched to Mac at home.
I find it uncomfortable for obvious reasons (new way of doing things). Yet, while I only do file movement, touches, etc via the command line in unix/linux, and I only do GUI file touches, movement, etc on Windows, I find myself using an unwieldy GUI (Finder) to do the same thing on Mac. I can fire up an xterm and do it that way, but I don't 'want' to.
That is odd for me. Can't quite explain it. Mac is (even as a unix variant) its own creature. It leaves me feeling like I have the power of the universe in a little pretty living space.
Maybe cause I am new to it still.
They stuck me in an institution, said it was the only solution, to...protect me from the enemy, myself
I recently got an iBook (recently as in 6 months ago) after installing a G5 for a user in our art department. I'm not sure I'm a big fan of Apple's hardware or pricing schemes ($600 for an iPod that plays photos), but Mac OS X is pretty robust.
What I especially like about their use of the Terminal is pretty much anything that can be done in the OS, can be done on the command line. Example: changing a computer's name. Think fast: how does one do this in Windows? If you started saying "command line, net with options..." you know more than most. Windows coerces you to use the GUI. Mac encourages it, but doesn't force it (at least, since they got rid of OS 9).
Not to mention the Fink project, which adds tons of great apps to the command line. Again, I'm no Apple zealot, but their decision to have a robust command line in OS X was a great one.
The good news is that UNIX was invented by a Western and indicates that innovation in the West is alive and well. If UNIX were invented by a Chinese, he would have used it to concoct "better" means of torturing prisoners, women, children, Tibetans, etc..
Think: do you know how to count the words in a Word file?
Leingang doesn't?
I mean I'm all for MacOSX and I often use the command line, but I also think clicking "Tools" and selecting "Word Count" from the drop down is more fun than typing a string of commands into a CLI.
For my current document, it reads:
Statistics:
Pages 23
Words 10,234
Characters (no spaces) 52,996
Characters (with spaces) 63,140
Paragraphs 107
Lines 660
One of the really nice things about GUI's is that they make rarely used commands (like word count) really easy to discover. You just look in the menu, and there it is. Compare that to a UNIX command prompt, where if you don't know how to write scripts and you don't know that the "wc" command is for word counts, you are lost.
Whoever corrects a mocker invites insult;
whoever rebukes a wicked man incurs abuse.
--Proverbs 9:7
grep -v -c "Something I know is not in the file" file.txt
- Carpe diem, quam minimum credula postero.
Comment removed based on user account deletion
I see how this works now. If you only answered with the MS way you get modded 0 but if you used the OO answer or a combination of MS and OO you get modded higher.
There's no GUI analogue, perhaps because anybody tempted to make one would add too many "features" that cluttered its ease of use. Think: do you know how to count the words in a Word file?
Tools -> Word Count
Yes, Word could be considered to be wc with too many other "features"!
As I am considering the advanced Unix users that browse this forum, I'd suggest having a look at that book too/instead.
-Rob
Marriage doesn't have to suck!
Do I know how to count characters in a word document? Certainly. And, best of all, it will actually count characters, in any character set, not just in ASCII or other similar 7/8 bit sets.
But that's not really the point. Knowing how to do something in one OS does not make the one you are ignorant about an inferior OS. If you truly do know both OSes, then I'll listen to your opinions. Until then, I'd stay away from making comparisons.
It is the height of arrogance to assume that if you don't know something that it must not exist.
I just heard some sad news of CNN - The Scott Peterson Prosection died today at 1. Apparently, they 'flip-flopped' in there prosection of the obvious double murderer. Perhaps they took cues from also-ran John Kerry. Both truly American idiotcons.
A robust programmable command line is a great tool, but for completely different reasons than listed.
It's powerful because you can create intelligent scripts to automate tasks. Then you launch those scripts by clicking them.
You aren't going to win anyone over by typing in some esoteric "find ~ blah | fart pipe * & (! exemo!'" command, when you could have just opened the search box and typed "foo". You're just going to look like an elitest dick.
Once upon a time, I knew all those stupid commands and switches and would pipe output through 98 different little apps to find something out.
Now I'm happy as a clam to spend my time and energy doing other things with my computer.
This summary, at least, is all about "using a command line to make simple tasks harder so that you can feel like a real 1337 h4z0r everytime you do something so mundane as count the words in a file"
I don't need no instructions to know how to rock!!!!
Textpad: View, Properties
I still contend that Textpad is the best text editor that I've ever seen.
I don't respond to AC's.
ls file.txt, note filesize and divide by 4.
That is if, like me, your writing mainly consists of four letter words.
I'm a CLI guy. I use a browser, but I feel bad about it :-).
I've been looking for a simple X application that was a pipe interrupter, sort of a GUI 'cat', call it 'xcat'. The idea is to type a command like:
xcat foo.c | wc -l
and xcat would fill its buffer with foo.c, pop up to let you modify the buffer, and send the results to 'wc -l'.
There are a lot of times when I want to gather text from a variety of places (including GUI places) and run it through a command line filter. An 'xcat' would help unify my world a bit.
I end up typing (to continue the example)
vi foo.c
(inside vi:)
!Gwc -l
to pipe the contents of vi's buffer through 'wc -l'. It's not optimal.
Looking for 'xcat' made me feel guilty for not knowing how to program for X Windows. Researching how to program for X Windows made me like the command line! There doesn't seem to be a simple, cross-platform, it'll work everywhere, X toolkit.
Now I just hate the world, and will retreat into my own bitterness.
sigs, as if you care.
The fact that Neal Stephenson, the commentator, and the person who accepted the article were able to write and read so much about the subject without ever noticing all the obvious and commonly used GUI counterparts to wc -- many of which are considerably more interesting, for instance Word does a little morphological analysis to count Japanese words -- says something desperately sad about those people and perhaps about the culture they are from.
But the fact that so many slashdotters stepped up already and cared enough about nitpicking the record straight that they have posted the path to the word count tool in Word at least half a dozen times already, fills me with hope!
I feel as if I have gained wisdom from this simultaneous despair and revival. The feeling is probably false, though.
Incidentally, the finest and most satisfying way to count words (if wc's answer is good enough) is to use wc... from vim.
Whence? Hence. Whither? Thither.
Already I'm seeing in the posts exactly what and why CLI users throw up their hands trying to deal with GUI.... and "wc" is a pretty good example. When the OP asked Think: do you know how to count the words in a Word file?, I knew without even reading on in the posts I was going to encounter (and, I did):
For those who didn't bother to sign up for the clue, the question was mostly rhetorical, and was an example of the diff between CLI and GUI. I know my immediate response wasn't, "I know EXACTLY how to do that in word," but rather, "Hmmmmm, I know I've solved that and found that "option" SOMEWHERE in word before, but I don't remember exactly where..."
OTOH, were you to ask CLI users the same question.... they would all know exactly how to use wc, and interestingly enough, had you asked the same question to the CLI users over the past fifteen years you would have gotten the same answers. So, in addition to a simple answer, CLI is a consistent one.
P.S.And don't even get me started about the menus with chevrons! Assuming for the sake of argument we are talking about the current version of WORD, have YOU ever tried to walk someone through this kind of stuff over the phone? With MS' genius implementation of self-modifying menus, you could "claim" something is in a menu when trying to help someone when in fact because of their use menus, their menu is completely different from yours.
Having one large, all-purpose tool is better because instead of having to learn many simple tools with different syntax and stringing them all together in a massive chain of fork()'s and file handles, we can use a single tool that is more sophisticated, more consistent, and more resource efficient for big tasks. As Rob Pike said in his interview here so recently, the days of one tool doing one job well "are dead and gone and the eulogy was delivered by Perl."
Whoever corrects a mocker invites insult;
whoever rebukes a wicked man incurs abuse.
--Proverbs 9:7
I played with an OS X machine the other day. I found a terminal program which gave me a CLI. At that point, it became useful.
In the course of every project, it will become necessary to shoot the scientists and begin production.
If you are gonna do complex stuff, get that command line out. Most of the features that MS says were removed are right there waiting for you to use them.
There are definitely speed advantages to command lines.
This sig has absolutely no significance and serves only to take up screen space and waste the time of the reader.
Of course my Old Dutch doesn't go further than "Hebban olla vogalan nestas higonan". ;-)
Ahhh...the great dumpster continuum. Many a free computer will be found there. -- sowth (748135)
I thought 'at_cho_prn' was the command line way of selecting where to download pr0n...
Guys,
The default install of Word 2004 for Mac always shows the word count, in the lower right hand corner. It shows it as XXX/YYY, where XXX is how many words are before the cursor, and YYY is for the entire document.
As a professional writer, I can't imagine what wc would offer me that would be better than that! I often work on very specific total word targets for articles, so I can track if I'm under or (much more likely) over, and tweak accordingly.
Personally, I haven't been able to use Word on Windows since they started putting the icons in the wrong place in the menus. The PowerBook 17" is the ideal writing machine today, in my opinion.
My video compression blog
Build it, and they will come^Hplain.
id mod you up if I could.
people are quick to laud the CLI and bash the GUI but there are advatages to both... and the discussion is not complete without looking at all of this. I have used the command line plenty, in both Mac OS X and in other flavors of UNIX. I have never used "wc" and wouldnt have even thought to type "wc" to get a word count on a document. Word count isnt something that I have had the need for, but if I did, it would be a lot easier to discover how to do it in word (or BBEdit, which is really easy) that to try and guess what command would do it from the CLI.
"In America, first you get the sugar, then you get the power, then you get the women..." -H. Simpson
Word: I don't know how to word count. I can either trawl the menus (Hmm, "Tools" looks possible- gee, option 4 is Word Count- maybe that works) or click Help and type word count and get the #1 option: How to count words. Farking trivial for poo-flinging chimp, perhaps less so for a typical user but having worked help desk, I've never gotten a call about this. I get a nice list of pages, words, characters, paragraphs, etc.
Unix. Well, gurus know wc. If not, how do I find out about it? Perhaps I actually know the "man -k" command. Let's try "man -k word count"- hmm, ~8 pages scroll by. I'm a really smart unix user: "man -k word count |more". Let's look at the entries
#1- BN_add_word (3ssl) - arithmetic functions on BIGNUMS with integers. Hmm- fuck no. (Omitting much BN badness)
#8- EVP_BytesToKey (3ssl) - password based encryption routine. What the hell? I just want to count words, damnit.
4 screens later, I actually find wc- maybe that will work.
"wc myfile.txt". (And it had better be ASCII text- don't try feeding wc a file in Japanese. Or an HTML file for that matter: Word correctly counts the actual text without the tags, wc won't) "1624 2282 53168 myfile.txt" Ok, which number do I care about? "man wc" Hmm- probably the second. But hey- it's scriptable. That means it's better, right?
Witness the amazing power of the command line: I can dick around for five minutes trying to figure out what command to use and end up with one vastly inferior for almost all tasks compared to the GUI version.
I love command lines, I really do. (I have to- I admin a couple of Unix boxes) But people vastly underestimate how powerful GUI tools have gotten and how long it takes to learn the arcane syntax of a typical Unix shell.
"Seven Deadly Sins? I thought it was a to-do list!"
Thanks, kaleidojewel. Now quit spamming the forums with your Amazon-affiliate-whoring links.
It's even easier in MS Office v. X ( and we are talking about OS X, right?), it's in the freaking status bar, right next to page count and line count. I don't even have to use the mouse or the keyboard.
This is embarrassing.
Save $2 more and buy it here
Having to grep against "(1)" is annoying
It's stuff like this that newbies haven't a clue about, intermediates hunger for, and perhaps even a few experts don't even know. This is exactly why some people find the command line cryptic and clumsy.
"I'm not impatient. I just hate waiting." - My Dad
I've been gleefully using the word counts in MS Word since the early 90's. There are actually two places you can get at them, and they're both readily accessible.
Speaking of the early 90's, this reminds me of a conversation I had on a TeX mailing list around 1994. I was thrilled with the idea behind TeX and struggling with the implementation. In the course of getting some answers about the surprisingly difficult process of setting up columns of varying widths, I overheard a conversation in which some TeX zealot was meandering on about all the things Word couldn't do. The problem was that all of the things he was talking about were things Word could do. He simply never got familiar enough with the application to actually use it well.
Word has its problems, it is true. It has a number of bugs that may or may not be a problem, depending on which features you use. Recent versions have become lumbering resource hogs without adding much new functionality. It lacks some expert layout features that would enable it to fully close the gap with real document layout software, though it's good enough 90% of the time. It's owned by Microsoft. It is, however, probably the most comprehensive and full-featured word processor out there. OpenOffice.org is getting very close, owing more to stagnant development at Microsoft than anything else, and may overtake it soon. I've started using it for complex documents and, most of the time, I don't miss Word.
You see the reverse with GIMP advocates. The claim that GIMP is as good as Photoshop can only be made by people who don't know Photoshop very well and whose graphic output is mostly limited to web pages. GIMP isn't even close to Photoshop, and as opposed to the situation with Word and Microsoft, Adobe lavishes so much developer resources on Photoshop that the gap is actually growing.
To return to the original topic, yes, wc is a handy utility. But it is really much more useful for data manipulation by programmers and other IT professionals than for anything else. And if you want to enlighten people about the virtues of commandline tools -- and they are indeed legion -- it helps if you don't immediately discredit yourself by discussing applications that you understand only very superficially.
Proud member of the Weirdo-American community.
CLI is a bridge that Apple will burn along the path to acceptance and marketshare. netstat, chown, rm, nidump, etc... go away for users. An OS* on server systems will branch-off for admins to use CLI.
CLI is a throwback to the *olde* unix days. Using it is a *time machine* experience akin to being there when there was only CLI to the machine. All studies have indicated that CLI is inferior to brighty shiny chrome widgets and windows. Even file heirarchies in unix are confusing when users are asked. Much preferred are *where* metaphors than heirarchies.
Has the "unix" in Panther changed any since the "unix" in the last incremental iteration?
Furthermore, iirc, OSX is still not technically capable of holding the "UNIX" badge from The Open Group.
Whether that's a good thing or a bad thing is up for debate.
Now, as far as having some tcsh commandline skills on OSX, that would surely be useful for some every-day puttering around on the desktop.
But most anyone I know (primarily solaris, Linux, Freebsd and Obsd guys) who ran out and bought a powerbook or such for OSX either now dual boot or have wiped OSX completely for *BSD or *nuxPPC.
A failing on their part, maybe?
do() || do_not();
Some things in GUIs are really easy. Some things are very difficult. Using word counting as an example is not good because it is implemented in Word if you bother to look around for a few minutes. And yet searching, in Windows anyway, is a real pain. Yeah sure they've got a nice search dialog but it has no subtlety to tailor it to what you want, it's ok for the plebs but for those of us who know better it just doesn't cut it. Combining tools like 'find', 'grep' and 'wc' does things you can't do on windows ... well not easily or maybe not at all. Most people don't care but most here on /. would which is probably why so many install stuff like Cygwin.
For instance, yesterday I wanted to remove all my CVS directories for a code tree I was copying, to do it in Unix (QNX) is just:
I have no idea how I would have done that in Windows. It took seconds to think of that line and type it ... how long would it take me to figure out and select the options to do it. Finding and selecting options takes a lot of time relative to your typing speed if you touch type.
Bitter and proud of it.
The great advantage of unix tools is not which little tool is the greatest (that depends on each user), but the fact that you can combine them as you want with PIPE!!!!
This is the great thing about command line unix; an astonishingly elegant solution if you ask me.
jj
Custom menus violate so many user interface rules the Marines should be storming Redmond. I literally want to fling my own excrement at the project Office project manager who came up with that one.
--- Ban humanity.
I always use it to find how many files are in a directory (ls -R | wc -l) or how many Windows boxes are trying to root me (cat /var/log/httpd/access_log | grep cmd.exe | wc -l) or how many visitors I got from a Slashdot story (cat access_log| grep slashdot | wc -l) or how many files I've touched this year (ls -lR | grep 2004| wc -l) or...
." and a Finder window of the current directory will open. I can access the clipboard with "pbcopy" and "pbpaste" (though I must occasionally make a temp file and use 'tr' to change from Mac line breaks to unix line breaks). The final hurdle--dealing with two-part Mac files at the command line--will be solved in 10.4.
What I'm saying is, people who complain about the "how many ways do you know to count words?" example are missing the forest for the trees. 'wc' is one of countless small UNIX utilities that I sting together in new combinations ever every day. I don't write books or magazines, so I *never* care how long my files are in that sense. But seeing how many lines in a log file contain a certain string is useful every day.
Besides, "In the Beginning..." was written back in 1998 or 1999.
Beyond WC: The coolest things about unix in OS X is the interaction with the GUI. I can type "scp " and then drag a file from the desktop into the Terminal window and then finish with the destination server and path. I can be anywhere in the filesystem and say "open
Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
Does wc work on file with formatting tags and header/meta information?
--- Ban humanity.
This isn't a flame, but a serious question, because I like to know where the OSS tools stand when I advocate them, and highlighting their shortcomings is often a good way to get them improved. I've heard people complain that using the GIMP with a crappy window manager (ie. under OSX or Win32) sucks because you have to click on each window to get it activated, whereas Photoshop has one huge window with all panels as subwindows which are all active at once. I've also heard that OO.o and GIMP are hard to learn. Are these what you're referring to? If not, what's wrong with them?
For myself, I'm not an artist, I'm a programmer, and I very seldom actually need to do art-y things, but when I have, I've been able to do it in GIMP, but usually with a little struggling (which I ascribe to unfamiliarity with the application and unfamiliarity with a graphics mindset). I've only used Photoshop once, and didn't put in the time to get it to do what I wanted. And I much prefer the expressiveness of "GIMPing" to "Photoshopping" a picture.
Ethan
What sucks is: that nice little window I get telling me all the stats for my document - I can't select the text, or copy-and-paste it.
Along the same lines, ever wanted to send someone a listing of all the files you have in a Windows directory? Unless you open a cmd window, you'll be sending them a screen shot.
I am amazed that no one has come up with ALT, t, w for word count in word!! The GUI may make some things more complicated if you think the only way to do it is the mouse. In the words of Larry Wall TMTOWTDI
find . -type f | xargs foo
to
find . -type f -print0 | xargs -0 foo
For a good laugh, try explaining why that is necessary to a Unix newbie!
In Windows Explorer, right click on the root directory of your CVS tree. Select "Search". In the resulting Search dialog, type "CVS", and start the search. In the right-hand pane of the search window, all of the CVS sub-directories of your root directory will appear. Click anywhere in that pane. CTRL-A for "Select all" (or do this manually through the menu system: Edit...Select All), and press the Delete key.
Also, depending on your CVS client, the CVS directories will probably be marked as "hidden", in which case you do need to click on "Advanced options" in the initial Search dialog, and press "Search hidden files and folders" before launching the search.
The magical pipe is the key tool in command line not the programs. Using pipe and programs once can achieve any complex task through command line. For example if someone wants to take a wc on a file and use those numbers to trigger some action. Is this possible to do in GUI? Ofcouse you can, with a lot of clumsiness. Now can you do it in commandline? Ofcourse you can, with a lot of ease (Thanks to the pipe). So I guess as long as there is no GUI equlivanet of pipe command, GUI tools are clumsy than commandline equivalents on some fronts.
Has Vigor been ported to the Mac? I for one could use an animated assistant when I'm working with VI.
Wow, that works! I'll use that until I get something better made.
sigs, as if you care.
heheh - just look how many of you just openly admitted to having Word installed on your machines. Jesus! And you call yourselves slashdotters...
[it's a joke son, move along]
I just realized I have spent like ten minutes reading comments arguing about wc.
what would we do without slashdot?
well in case you missed something lemme recap:
BLAHblahblahBlahBLAHBLAHBLAH wc BLAHBLAHBLahblah linux BLAHblah command line blahblahBLAHBLAH microsoft sux0rs blahblahblahblahblahblahblahblah BBedit blahblahblahblahblah count words paragraphs OR pages! blahblahblahblah
yes another earth shattering story brought to you by slashdot.
http://unxutils.sourceforge.net/
The zip file easily fits on a USB memory stick. You can "infect" every Windows box you sit at.
(cough) you're forgetting something:
http://www.gnu.org/software/emacs/windows/ntemac s.html
Another UNIX-ignorant bigot 'schooled'. Gotta love it.
Imagine those utilities wrapped in Automator plugins. CLI for everyone, not just elitist dicks. Of course, that assumes you don't already consider us Mac users to be elitist dicks ;-)
This, for e.g., comes in useful when you need to count the total no. of lines of source code in a project (with multiple files in subdirs).
"How do you count words in a Word doc?"
What, are we back in school, trying to figure out when we can stop typing on this 1000-word history essay that's due tomorrow?
How do you count words in a LaTeX doc?
I think the line-count option on 'wc' is much more heavily used (I know I use it just about every day).
John.
The command-line tools Diction and Style are worth a mention here. Diction gives grammar suggestions, and Style gives quite a bit of information about a document, including scores for 7 different readability indexes, number of "to be" verbs, sentence length, passive sentences, etc.
i ction_for_panther) with the commands to install Diction and Style, so I just did a copy and paste to install. Now I just open a Terminal window, type "style", drag the document to the window, and hit return. I've used it with plain text, rich text, and Word documents, and it likely works with other types as well. I've come to use Style quite often.
z /sw/lib/fink/update/config.guess . /sw/lib/fink/update/config.sub . ./configure --prefix=/sw --quiet
Here are some of the results for a document I've been working on:
readability grades:
Kincaid: 11.2
ARI: 14.6
Coleman-Liau: 11.1
Flesch Index: 66.5
Fog Index: 13.2
Lix: 50.7 = school year 9
SMOG-Grading: 8.8
syllables
1035 sentences, average length 29.0 words
65% (675) short sentences (at most 24 words)
18% (190) long sentences (at least 39 words)
1 paragraphs, average length 1035.0 sentences
4% (51) questions
33% (345) passive sentences
longest sent 1422 wds at sent 1; shortest sent 1 wds at sent 672
word usage:
verb types:
to be (412) auxiliary (168)
types as % of total:
conjunctions 3(967) pronouns 8(2297) prepositions 7(2038)
nominalizations 0(59)
I don't know much about using UNIX (very little), and fortunately, I found a page (http://lucas.is-a-geek.net/blog/2003/12/16/gnu_d
From what I understand, the new MSOffice will calculate Flesch-Kincaid scores. Additionally, a GUI program called Flesh (VersionTracker) will give the Flesch-Kincaid scores.
For those with little UNIX skill (like me), here are the commands, from Lucas Thompson's Web site, to install Style and Diction (they worked for me anyway, under 10.3):
curl -O http://ftp.gnu.org/gnu/diction/diction-1.02.tar.g
tar xfz diction-1.02.tar.gz
cd diction-1.02
cp -f
cp -f
make -s
sudo make install
Good stuff.
Jason
Who ever made this guy 'famous'? Favourite is wc? He needs a shrink, not an audience. He needs to get out more - get a life!
Actually, the main difference is that GUI interfaces are best for graphical/spatial uses and CLI is best for textual uses. That's why you rarely find a CLI version of Photoshop or QuarkXPress.
If you imagine moving files as a visual act, then the GUI is better suited - you don't have to translate your thoughts into language. If, on the other hand, you know what you want to "tell" the machine, then a CLI is better. It's all a matter of the job at hand and individual preferences.
So yes, in some jobs the GUI is as clumsy as pointing to a menu in a foreign land, but sometimes the CLI makes me feel like I'm saying "now pick up that, now what was that called again, widget and turn it 90 degrees to the left, then add a new thingy on the left side."
Both have thair purposes, and neither is completely better than the other one.
Tools > Word Count
.doc file but that's more useful to most people than what a wc on a .doc file would give you. Anyway maybe if people stopped trying to say that the GUI is useless we might be able to convert more people over to the command line.
It shows Pages, Words, Characters (no spaces), Characters (with spaces), Paragraphs, Lines, and has an option to see if you want footnotes and endnotes included.
Granted it only counts the characters you see and not all the formatting information that is in the