1

I have seen % and then some letter for example %h in config files in Ubuntu and in other Linux distributions but I do not know the names of them or what they all do, so I am just wondering if there is a resource that lists them all and/or gives descriptions of what they all do? If am not mistaken I think that %h is a variable for a users home directory but I am not positive.

1
  • 2
    In what context? % as an escape character is used in several unrelated formats, it can mean completely different things. May 5, 2016 at 1:26

2 Answers 2

5

The meaning of %h in a config file should be documented in the corresponding program's man page. Here are some examples for %h:

  • smb.conf - the Internet hostname that Samba is running on.

  • date - same as %b (locale's abbreviated month name (e.g., Jan))

  • ssh_config - various (e.g. remote host name)

  • sshd_config - home directory of the user being authenticated

1
  • Here is a snippet from the sshd _config ChrootDirectory %h
    – Alex Lowe
    May 5, 2016 at 2:29
0

Perhaps you're thinking of date format strings?

date '+%h', for example, returns the current month.

Run man date to see other sequences like this.

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