What is the detailed option in mkdir?

I made my way through the shell tutorial (Bash) and noticed that the manpage mkdirdescribes a verbose version that displays a message when creating a directory:

-v, --verbose
       print a message for each created directory

It seems to mkdir -vhave a predefined message that it prints. Is there a way to print a custom message? Is there a way to constantly set a custom message instead of the default message?

+4
source share
4 answers

From the source code formkdir.c , this is the section on options -v:

    case 'v': /* --verbose  */
      options.created_directory_format = _("created directory %s");
      break;

, , , . , mkdir.

+4

script :

#/bin/bash

/bin/mkdir "$@" |sed -e"s/mkdir: created directory /$USER created folder /"

script, mkdir.

script , , -e "s/x/y" sed.

, mkdir, mkdir.

mkdir. , mkdir

+3

, -

mkdir -v "$@" | sed 's/mkdir: created directory /jar-jar: yea, weesa gotta /'

, mkdir . , , .

, mkdir gettext, .po , , . . http://translationproject.org/domain/coreutils.html

, , - .

+2

?

lgml-alfasi2:dotfiles alfasi$ mkdir -v tp
mkdir: created directory 'tp'  <-- see why it is called 'verbose' ?
lgml-alfasi2:dotfiles alfasi$

:

-v      Be verbose when creating directories, listing them as they are created.

, : - ""

, , , , , PR .. http://opensource.apple.com/source/file_cmds/file_cmds-212/mkdir/mkdir.c

+1
source

All Articles