5 ms·
I would argue that anyone who is reasonably comfortable in a command line would resort to `man command`, `command --help` or `command -h` before googling for us
by stephenr 12y ago
I would argue that anyone who is reasonably comfortable in a command line would resort to `man command`, `command --help` or `command -h` before googling for usage.
- wflann 12y agoI think, occasionally, it's a lot easier to grok a command through googling than reading the built-in help. A fair amount of built-in *nix documentation I have run across is mediocre or unhelpful.
- tormeh 12y agoRecursively searching through all files in the current folder (aka the normal use case for grep) is accomplished by using "grep -r". It's on line 270 in "man grep". And that assumes that you know what grep is at all. Would it have hurt so much to call grep "regexsearch" instead? Maybe -r could be the default?
- jsight 12y agoI think a lot of people would hate having it be recursive by default.
- markrages 12y agoRecursive is not the default use for grep. stdin-stdout filtering is. "regexsearch" is more work to type and more space taken up everytime 'grep' appears in a command-line. And says nothing about recursion.
- gnaritas 12y agoRecursion is caused either by -R or -r on nearly all commands and is pretty standard, and r is virtually never the default on any command because that would be a bad idea. And yes, having to type regexsearch rather than grep would have been a bad idea; while grep isn't a great name it's far preferable to someone who types constantly. Search or find would have been better names, names need to be both short and descriptive on the command line, and short comes first.
- stephenr 12y agoUse the built-in search. Edit: the rest of my comment (somehow submitted to soon!) man grep /recurs<enter>
- markrages 12y agoor use 'grep': $ man grep | grep recursive directory, recursively, following symbolic links only if they Exclude directories matching the pattern DIR from recursive -r, --recursive Read all files under each directory, recursively, following -R, --dereference-recursive Read all files under each directory, recursively. Follow all
- Pxtl 12y agoAll the core unix tools have the problem of predating the vowel generation (http://c2.com/cgi/wiki?VowelGeneration http://c2.com/cgi/wiki?VowelGeneration).
- bcoates 12y ago'grep' isn't a case of disemvowelment (there's an e!), it's just a weird mnemonic that's outlived its referent.
- Retra 12y agoIf it were up to me it would be called `find` and it would have flags to find files or text within files.
- Gracana 12y agoI often find that GNU man pages are heavy on explanation of options and light on purpose and practical usage (the latter is tucked away in info pages). That's not necessarily the wrong way to do manpages, but I much prefer OpenBSD-style manpages, which seem to be better at providing practical information.
- eropple 12y agoI never use man pages, to be honest, and I'm quite comfortable on a command line. Reading long-ish things in a terminal kind of sucks, for me, and even if I end up reading a man page in Chrome it's nicely formatted and has readable serif fonts and is easily scrolled with the trackpad on my laptop.
- stephenr 12y agoYour terminal doesn't scroll with wheel/trackpad?
- rspeer 12y agoThe wheel or trackpad scrolls the terminal's scrollback, not the pager program that happens to be running in it. (I can imagine some sort of hackery that determines if less or something is running and scrolls that, but it sounds like a huge mess. Is that actually what you're doing? Does it send keypresses? What if you're in a mode where those keypresses do something besides scrolling?)
- c22 12y agoI just tried this on debian and my mouse wheel scrolls less inside of my terminal (and returns my previous line buffer when I type 'q').
- stephenr 12y agoNo I'm talking about scrolling in the actual program running - it's most useful in a pager obviously, but it also works for editors, and it works both locally (OS X, built-in Terminal.app) and over SSH on Debian hosts. I'll be honest - I have ~no idea~ (edit: apparently there are xterm control sequences for mouse scrolling) how it's actually implemented, but several tools have some reference to mouse support (tmux, vim, etc) in option/config files, so it's probably available for your distro/platform and just needs to be enabled. Further edit: (or PS. or whatever): `less` pager supports mouse scrolling. `more` pager does not!
- eropple 12y ago
- Anderkent 12y agoNah, man pages are usually completely useless. I use man when I remember exactly what I want to do and just aren't sure if the flag was -f or -F. For everything else there's google.
- peatmoss 12y agoBeing a few years gone from working purely in tech, and having a decade of OSX desktop usage finally made me feel I'd gotten complacent. So I installed OpenBSD. Two things of note have happened: 1. I routinely need to look things up that are a bit murky in the deep recesses of my memory. 2. I am reminded continually of how nice it is to have man pages that are well written, are easily searchable, reference appropriate other pages, and are helpful enough to remind you of big picture considerations that you didn't realize you were facing when looking for a commandline flag.
- stephenr 12y agoCan you give an example of what you might turn to google for (and what you'd search for) that is more productive than checking a manpage/help output?
- Anderkent 12y agoOK, recent simple example: Google query: git display file at revision. Immediate answer (without even having to click any links, it's in the result description): `git show revision:file` Total time: 5 seconds Trying to reproduce with man and help: man git search for display, finds nothing start scrolling down notice git-show (show various types of objects); sounds like a likely candidate git show <revision> <file> ..no output git show -h usage: git log [<options>] [<since>..<until>] [[--] <path>...] or: git show [options] <object>... .. useful man git show man git-show OPTIONS <object>... The names of objects to show. For a more complete list of ways to spell object names, see "SPECIFYING REVISIONS" section in git-rev-parse(1). man git-rev-parse a lot about specifying revisions, nothing about how actually specify a file Give up. Google it.
- 12y ago
- johnchristopher 12y agosome man pages are really obscure though. i am thinking of policy kit and find which can be as long and as arid.