I'm reading a book on administration and I'm wondering whether my answers are correct related to the man command. I'm running Ubuntu.

Question 1: How would you read sync’s local man page that was kept in /usr/local/share/man?

My answer is

man l sync

but I don't think I'm correct because it gives this output;

No manual entry for sync in section l See 'man 7 undocumented' for help when manual pages are not available.

Could someone give me a better explanation of an answer to this?

  • What if you type man sync? – user3463 Jul 22 '12 at 3:10
  • It shows me the page. But I doubt that's what the author referred to; this is the full question: What command would you use to read about the sync system call (not the sync command)? How would you read sync’s local man page that was kept in /usr/local/share/man? - I'm interested in the difference between these 2 questions. – Tool Jul 22 '12 at 3:12

From the man(1) man page:

   -M path, --manpath=path
          Specify  an alternate manpath to use.  By default, man uses man‐
          path derived code to determine the path to search.  This  option
          overrides the $MANPATH environment variable and causes option -m
          to be ignored.

          A path specified as a manpath must be the root of a manual  page
          hierarchy  structured  into  sections as described in the man-db
          manual (under "The manual page system").  To view  manual  pages
          outside such hierarchies, see the -l option.

So, man -M /usr/local/share/man sync.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.