News for hackers. Stuff that matters.
Re:The sad state of sysadmin in the age of containers by stephenr on Wednesday April 22, 2015 @08:31AM (#9419876)
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.
Re:The sad state of sysadmin in the age of containers by wflann on Wednesday April 22, 2015 @09:36AM (#9420269)
I 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.
Re:The sad state of sysadmin in the age of containers by Gracana on Wednesday April 22, 2015 @11:01AM (#9420909)
I 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.
Re:The sad state of sysadmin in the age of containers by tormeh on Wednesday April 22, 2015 @10:41AM (#9420744)
Recursively 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?
Re:The sad state of sysadmin in the age of containers by jsight on Wednesday April 22, 2015 @11:08AM (#9420957)
I think a lot of people would hate having it be recursive by default.
Re:The sad state of sysadmin in the age of containers by Retra on Wednesday April 22, 2015 @12:36PM (#9421618)
If it were up to me it would be called `find` and it would have flags to find files or text within files.
Re:The sad state of sysadmin in the age of containers by Pxtl on Wednesday April 22, 2015 @11:46AM (#9421248)
All the core unix tools have the problem of predating the vowel generation (http://c2.com/cgi/wiki?VowelGeneration).
Re:The sad state of sysadmin in the age of containers by bcoates on Wednesday April 22, 2015 @01:38PM (#9422077)
'grep' isn't a case of disemvowelment (there's an e!), it's just a weird mnemonic that's outlived its referent.
Re:The sad state of sysadmin in the age of containers by markrages on Wednesday April 22, 2015 @11:33AM (#9421151)
Recursive 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.

Re:The sad state of sysadmin in the age of containers by gnaritas on Wednesday April 22, 2015 @11:37AM (#9421183)
Recursion 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.
Re:The sad state of sysadmin in the age of containers by stephenr on Wednesday April 22, 2015 @11:46AM (#9421247)
Use the built-in search.

Edit: the rest of my comment (somehow submitted to soon!)

    man grep

    /recurs<enter>
Re:The sad state of sysadmin in the age of containers by markrages on Wednesday April 22, 2015 @01:25PM (#9421986)
or 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
Re:The sad state of sysadmin in the age of containers by Anderkent on Wednesday April 22, 2015 @11:02AM (#9420913)
Nah, 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.
Re:The sad state of sysadmin in the age of containers by peatmoss on Wednesday April 22, 2015 @11:34AM (#9421158)
Being 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.

Re:The sad state of sysadmin in the age of containers by stephenr on Wednesday April 22, 2015 @01:43PM (#9422108)
Can 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?
Re:The sad state of sysadmin in the age of containers by Anderkent on Wednesday April 22, 2015 @04:43PM (#9423422)
OK, 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.

Re:The sad state of sysadmin in the age of containers by needs on Thursday April 23, 2015 @06:33AM (#9425792)
One reason to keep reading man pages is because you will likely discover new thing you did not expected. Also reading man pages help you to understand the tool philosophy/workflow, if the man page is well writen (which is often the case). This hold for any kind of documentation as well.

When I google something, I usually do not remember the answer to my question, the only thing I remember is the keyword to put in my futur query to get the same answer. You will get your answer quicker, but you wont learn much. So personally, I prefer reading man pages (when I can) than use google.

Re:The sad state of sysadmin in the age of containers by yAnonymous on Thursday April 23, 2015 @04:07AM (#9425452)
I too find it much easier to google for actual working examples of commands rather than the abstract documentation in the manual.

Rsync for example, where trailing slashes make a difference and it's not obvious from skipping over the manual.

Looking at working code/commands often works better than piecing it together from the manual imo.

Re:The sad state of sysadmin in the age of containers by eropple on Wednesday April 22, 2015 @09:46AM (#9420344)
I 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.
Re:The sad state of sysadmin in the age of containers by c22 on Wednesday April 22, 2015 @12:31PM (#9421585)
I probably haven't read a man page "cover to cover" since high school. Usually I just need to read a couple lines about a specific flag or the location of some configuration file which I can find quickly with a simple search or by scanning the document with my eyes.
Re:The sad state of sysadmin in the age of containers by stephenr on Wednesday April 22, 2015 @10:11AM (#9420507)
Your terminal doesn't scroll with wheel/trackpad?
Re:The sad state of sysadmin in the age of containers by rspeer on Wednesday April 22, 2015 @11:38AM (#9421187)
The 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?)

Re:The sad state of sysadmin in the age of containers by stephenr on Wednesday April 22, 2015 @12:55PM (#9421748)
No 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!

Re:The sad state of sysadmin in the age of containers by c22 on Wednesday April 22, 2015 @12:28PM (#9421557)
I 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').
Re:The sad state of sysadmin in the age of containers by eropple on Wednesday April 22, 2015 @02:29PM (#9422483)
It can do continuous scrolling of the terminal or line-by-line scrolling of the pager. Both are poor options for trying to actually read prose content inside the terminal, IMO, and opening a browser is easier.
Re:The sad state of sysadmin in the age of containers by c22 on Wednesday April 22, 2015 @04:24PM (#9423299)
What do you mean by "continuous" versus "line-by-line" scrolling? When I use the mousewheel to scroll a man page in xterm it behaves and appears the same as when I use the mousewheel to scroll a webpage in Chrome (the content moves smoothly up and down, disappearing at the top and bottom edges of the viewport).
Re:The sad state of sysadmin in the age of containers by johnchristopher on Saturday April 25, 2015 @09:05AM (#9438209)
some man pages are really obscure though. i am thinking of policy kit and find which can be as long and as arid.