La commande MAN ou sont les fichier?

Bonjour à tous
j’aimerais bien comprendre le fonctionnement de cette commande et ou sont stocke les fichiers textes de par exemple du man ls ou man grep
j’ai cherché un peut partout je ne trouve pas grand chose
usr/local/man c’est vide
merci

Et oui :stuck_out_tongue:

pour tout savoir sur la hiérarchie du système de fichiers (dans notre cas, sur Debian)

Bonsoir,

/usr/local/ :naughty:

Tu n’étais pas très loin.

Essayes /usr/share/

je dirais même plus:

/usr/share/man

$ manpath
/usr/local/man:/usr/local/share/man:/usr/share/man

[code]
$ apropos manpath

manpath (1) - determine search path for manual pages
manpath (5) - format of the /etc/manpath.config file[/code]

[code]$ whereis manpath

manpath: /usr/bin/manpath /etc/manpath.config /usr/bin/X11/manpath /usr/share/man/man5/manpath.5.gz /usr/share/man/man1/manpath.1.gz~[/code]

/etc/manpath.config

# manpath.config
#
# This file is used by the man-db package to configure the man and cat paths.
# It is also used to provide a manpath for those without one by examining
# their PATH environment variable. For details see the manpath(5) man page.
#
# Lines beginning with `#' are comments and are ignored. Any combination of
# tabs or spaces may be used as `whitespace' separators.
#
# There are three mappings allowed in this file:
# --------------------------------------------------------
# MANDATORY_MANPATH			manpath_element
# MANPATH_MAP		path_element	manpath_element
# MANDB_MAP		global_manpath	[relative_catpath]
#---------------------------------------------------------
# every automatically generated MANPATH includes these fields
#
#MANDATORY_MANPATH 			/usr/src/pvm3/man
#
MANDATORY_MANPATH			/usr/man
MANDATORY_MANPATH			/usr/share/man
MANDATORY_MANPATH			/usr/local/share/man
#---------------------------------------------------------
...

merci pour cette rafale de commandes man dont j’ignorais jusqu’à l’existence :ugeek:

voila je suis allé dans usr/share/man
donc j’ai trouvé pas mal de fichier gz
maintenant j’en ai decompresser un pour voir par exemple le mkdir
/usr/share/man/man1#
puis j’ai decompresser : gunzip mkdir.1.gz
j’ai essayé de lire le fichier mais je ne comprends pas l’affichage
en fait je voudrais savoir comment je peut retrouve la meme syntaxe ou comment cela fonctionne
quand je fais man mkdir

Pour le lire en format man, tu utilises … man.

$ man /usr/share/man/man1/mkdir.1.gz

Format brut
$ zcat /usr/share/man/man1/mkdir.1.gz

.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. .TH MKDIR "1" "July 2013" "GNU coreutils 8.21" "User Commands" .SH NAME mkdir \- make directories .SH SYNOPSIS .B mkdir [\fIOPTION\fR]... \fIDIRECTORY\fR... .SH DESCRIPTION .\" Add any additional description here .PP Create the DIRECTORY(ies), if they do not already exist. .PP Mandatory arguments to long options are mandatory for short options too. .TP \fB\-m\fR, \fB\-\-mode\fR=\fIMODE\fR set file mode (as in chmod), not a=rwx \- umask .TP \fB\-p\fR, \fB\-\-parents\fR no error if existing, make parent directories as needed .TP \fB\-v\fR, \fB\-\-verbose\fR print a message for each created directory .TP \fB\-Z\fR, \fB\-\-context\fR=\fICTX\fR set the SELinux security context of each created directory to CTX .TP \fB\-\-help\fR display this help and exit .TP \fB\-\-version\fR output version information and exit .SH AUTHOR Written by David MacKenzie. .SH "REPORTING BUGS" Report mkdir bugs to bug\-coreutils@gnu.org .br GNU coreutils home page: <http://www.gnu.org/software/coreutils/> .br General help using GNU software: <http://www.gnu.org/gethelp/> .br Report mkdir translation bugs to <http://translationproject.org/team/> .SH COPYRIGHT Copyright \(co 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. .br This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. .SH "SEE ALSO" mkdir(2) .PP The full documentation for .B mkdir is maintained as a Texinfo manual. If the .B info and .B mkdir programs are properly installed at your site, the command .IP .B info coreutils \(aqmkdir invocation\(aq .PP should give you access to the complete manual.

Traduction
$ zcat /usr/share/man/fr/man1/mkdir.1.gz

.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH MKDIR 1 "juillet 2013" "GNU coreutils 8.21" Commandes .SH NOM mkdir \- Créer des répertoires .SH SYNOPSIS \fBmkdir\fP [\fIOPTION\fP]... \fIRÉPERTOIRE\fP... .SH DESCRIPTION .\" Add any additional description here .PP Créer les RÉPERTOIREs s'il n'existent pas. .PP Les paramètres obligatoires pour les options de forme longue le sont aussi pour les options de forme courte. .TP \fB\-m\fP, \fB\-\-mode\fP=\fIMODE\fP utiliser le mode du fichier (comme avec «\ chmod\ »), et non au format umask (a=rw) .TP \fB\-p\fP, \fB\-\-parents\fP créer des répertoires parent (répertoires intermédiaires) si nécessaire, sans générer d'erreur s'ils existent .TP \fB\-v\fP, \fB\-\-verbose\fP afficher un message pour chaque répertoire créé .TP \fB\-Z\fP, \fB\-\-context\fP=\fICONTEXTE\fP attribuer le CONTEXTE de sécurité SELinux à tous les répertoires créés .TP \fB\-\-help\fP Afficher l'aide\-mémoire et quitter .TP \fB\-\-version\fP Afficher le nom et la version du logiciel et quitter .SH AUTEUR Écrit par David MacKenzie. .SH "SIGNALER DES BOGUES" Signaler toute anomalie de mkdir à bug\-coreutils@gnu.org .br Page d'accueil de GNU coreutils\ : <http://www.gnu.org/software/coreutils/> .br Aide générale sur l'utilisation des logiciels GNU\ : <http://www.gnu.org/gethelp/> .br Signaler toute erreur de traduction de mkdir à <http://translationproject.org/team/> .SH COPYRIGHT Copyright \(co 2013 Free Software Foundation, Inc. Licence GPLv3+\ : GNU GPL version\ 3 ou supérieures <http://gnu.org/licenses/gpl.html> .br Ce programme est un logiciel libre. Vous pouvez le modifier et le redistribuer. Il n'y a AUCUNE GARANTIE dans la mesure autorisée par la loi. .SH "VOIR AUSSI" mkdir(2) .PP La documentation complète pour \fBmkdir\fP est disponible dans un manuel Texinfo. Si les programmes \fBinfo\fP et \fBmkdir\fP sont correctement installés sur votre système, la commande .IP \fBinfo coreutils \(aqmkdir invocation\(aq\fP .PP devrait vous donner accès au manuel complet (en anglais). .SH TRADUCTION Cette page de manuel a été traduite par Michel Robitaille <robitail AT iro DOT umontreal DOT ca> et mise à jour pour Debian par Guilhelm Panaget <guilhelm DOT panaget AT free DOT fr> et les membres de la liste <debian\-l10n\-french AT lists DOT debian DOT org>. Veuillez signaler toute erreur de traduction par un rapport de bogue sur le paquet manpages\-fr\-extra.

Tu remarques les .IP, .PP, .TP, .SH … en tête de ligne.
On les trouve expliqués en
$ man groff_man

[code]
GROFF_MAN(7) Miscellaneous Information Manual GROFF_MAN(7)

NAME
groff_man - groff `man’ macros to support generation of man pages[/code]

USAGE
       This  section  describes the available macros for manual pages.  For further customization, put
       additional macros and requests into the file man.local which is loaded  immediately  after  the
       man package.

       .TH title section [extra1] [extra2] [extra3]
              Set  the title of the man page to title and the section to section, which must take on a
              value between 1 and 8.  The value section may also have a string appended,  e.g.  `.pm',
              to  indicate  a  specific subsection of the man pages.  Both title and section are posi‐
              tioned at the left and right in the header line (with section in parentheses immediately
              appended  to  title.   extra1 is positioned in the middle of the footer line.  extra2 is
              positioned at the left in the footer line (or at the left on even pages and at the right
              on  odd  pages  if  double-sided  printing is active).  extra3 is centered in the header
              line.

              For HTML output, headers and footers are completely suppressed.

              Additionally, this macro starts a new page; the new line number is 1  again  (except  if
              the  `-rC1'  option  is  given on the command line) -- this feature is intended only for
              formatting multiple man pages; a single man page should contain exactly one TH macro  at
              the beginning of the file.

       .SH [text for a heading]
              Set  up an unnumbered section heading sticking out to the left.  Prints out all the text
              following SH up to the end of the line (or the text in the next input line if  there  is
              no  argument  to  SH)  in  bold  face (or the font specified by the string HF), one size
              larger than the base document size.  Additionally, the left margin and  the  indentation
              for the following text is reset to the default values.

       .SS [text for a heading]
              Set up a secondary, unnumbered section heading.  Prints out all the text following SS up
              to the end of the line (or the text in the next input line if there is  no  argument  to
              SS)  in bold face (or the font specified by the string HF), at the same size as the base
              document size.  Additionally, the left margin and the indentation for the following text
              is reset to the default values.

       .TP [nnn]
...

je vous remercie tous maintenant c’est beaucoup plus clair.