Post #118,030
9/17/03 2:21:34 PM
|
I should probably rephrase.
I know, for example, that 'ls -l' shows the verbose directory, and 'rm -rf /' is BAD.
However, I'm not so certain on the more "arcane" portions of the commands - I was trying to find the location of a file through a combination of ls, grep, and more - which turned out to be the wrong approach anyways, because of the "find" command which I deduced must exist.
Therein lies the problem - I'm from a DOS background, and so I'm used to the conventions of the DOS prompt. You want to find a file, you type "dir /s [filename]".
I can't even figure out exactly how ls applies wildcard filters, or if it even does...
It's just a major paradigm shift, and I was hoping for something nice 'n easy to ease me into it.
"That's why it's always worth having a few philosophers around the place. One minute it's all Is Truth Beauty and Is Beauty Truth, and Does A Falling Tree in the Forest Make A Sound if There's No one There to Hear It, and then just when you think they're going to start dribbling one of 'em says, Incidentally, putting a thirty-foot parabolic reflector on a high place to shoot the rays of the sun at an enemy's ships would be a very interesting demonstration of optical principles."
|
Post #118,041
9/17/03 3:45:35 PM
|
Hie thee to the One True Source of Truth
[link|http://www.oreilly.com/catalog/upt3/|UNIX Power Tools], O'Reilly and Associates. \r\n\r\n Yes, it's a big-ass honkin' book, and not cheap. No, you don't have to read The Whole Damned Thing. Though it helps if you can be there for it. \r\n\r\n That text, plus Unix in a Nutshell (I'd recommend [link|http://www.oreilly.com/catalog/linuxnut4/|Linux in a Nutshell]) got me "over the hump" WRT grokking Unix. Once you're there, the manpages start to make a lot more sense (tip: man -Tps foo | mpage -2 | lpr prints the manpage in pretty-formatted Postscript, two pages up). The information is available elsewhere online. In particular, Jerry Peek's got some good online pages (he's a principle contributer to UPT). \r\n\r\n Core concepts, IMO: \r\n\r\n \r\n- You're an adult, look for it. Help is at: man (particularly man bash), info ([link|http://twiki.iwethey.org/twiki/bin/view/Main/InfoVsManpage|shudder]), apropos. Google, natch. Here ain't half bad either. If you've got a real distro, /usr/share/doc/ has a lot of stuff. I think Cygwin includes some of this. I've also started a bit of a [link|http://twiki.iwethey.org/twiki/bin/view/Main/CygwinEndUserQuickReference|Cygwin guide for Windows users], though it didn't get very far.
\r\n\r\n- Pipes. Output from one command can be fed to another.
\r\n\r\n- Shell globs. They happen at the shell. Commands (usually) don't see 'em, unless escaped. *, ?, \\, and [A-z0-9] have specific meanings to bash, understand 'em.
\r\n\r\n- Simple tools, simple tasks. My own most frequently issues shell commands: exit, ls, cd less, date, vi, apt-cache, man, dict, ssh, for expression, sudo, rm, dpkg, grep, bunzip2, sleep, host, bc, echo, while, mv, cp, scp, mkdir, wc, ping, irssi, ll, cvs, gpg, pstree, which, w3m, find, locate, kill, top, tar, apropos, time, egrep, ar, sort, head, file, sed, dfq, based on current history.
\r\n\r\n- Command-line editing (readline). I use emacs bindings: ^A == front of linee, ^E == end of line, ^W == kill word, ^K == kill to end of line, ^F == forward char, ^B == backward char, ^P == prior line, ^N == next line, ^R == reverse incremental search. That last is very, very useful.
\r\n\r\n- Really useful stuff: simple toss-off sed and awk scripts (cut can substitute for many of these). Bash 'for' loops (for f in *; do something to file; done). find/xargs. Piping. Command-line editing.
\r\n\r\n \r\n\r\n Learn your tools. Love 'em. Realize that cygwin is good, but it's still a bastard child.
--\r\n Karsten M. Self [link|mailto:kmself@ix.netcom.com|kmself@ix.netcom.com]\r\n [link|http://kmself.home.netcom.com/|http://kmself.home.netcom.com/]\r\n What part of "gestalt" don't you understand?\r\n [link|http://twiki.iwethey.org/twiki/bin/view/Main/|TWikIWETHEY] -- an experiment in collective intelligence. Stupidity. Whatever.\r\n \r\n Keep software free. Oppose the CBDTPA. Kill S.2048 dead.\r\n[link|http://www.eff.org/alerts/20020322_eff_cbdtpa_alert.html|http://www.eff.org/alerts/20020322_eff_cbdtpa_alert.html]\r\n
|
Post #118,072
9/18/03 1:27:35 AM
|
Turkey!
Served cold. \r\n\r\n If you're going to make the cut, set up a Linux box, and use it. As your primary system. At home if not at work. \r\n\r\n Cygwin-on-Windows is well and fine. I use it to make Windows as tolerable an annoyance as possible (and am happy to report that this fails utterly in that goal). It's a good way to provide yourself with 'Nix-like tools. It's not a Linux system. \r\n\r\n The problem IMO is that it's too much a crutch, and you're goiing to be falling back too much on the 'Doze stuff. You need to learn your way through the Linux filesystem, get comfortable with the shell, use tools (browsers, mailers, editors, schedulers, etc.). In my own case, with some prior familiarity of Unix, I made a clean cutover to RH Linux on a dual boot system. Within the first month, I was hardly booting NT at all. After 6-9, I'd wiped it from my system. \r\n\r\n Go ahead and use cygwin. But don't try to make it something it's not.
--\r\n Karsten M. Self [link|mailto:kmself@ix.netcom.com|kmself@ix.netcom.com]\r\n [link|http://kmself.home.netcom.com/|http://kmself.home.netcom.com/]\r\n What part of "gestalt" don't you understand?\r\n [link|http://twiki.iwethey.org/twiki/bin/view/Main/|TWikIWETHEY] -- an experiment in collective intelligence. Stupidity. Whatever.\r\n \r\n Keep software free. Oppose the CBDTPA. Kill S.2048 dead.\r\n[link|http://www.eff.org/alerts/20020322_eff_cbdtpa_alert.html|http://www.eff.org/alerts/20020322_eff_cbdtpa_alert.html]\r\n
|