Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I saw in my programs properties they have a "%u" in the end of the command, what does this do? Using Ubuntu 10.04.

e.g. My Chrome have the command: /opt/google/chrome/google-chrome %U for what this %u is used here?

share|improve this question
up vote 3 down vote accepted

When you associate a file with a command, you can call this command with several arguments. %u simply means that the file name should go there. It is useful so you can put arguments after the filename. There are several other flags you can use.

share|improve this answer
%u is the GNOME's file URI (such as file:///etc/motd or sftp://foohost/home/tom/file.txt). %s would get you the "normal" file path. – grawity May 6 '10 at 21:25
Thanks for the clarification. – petersohn May 7 '10 at 6:58

%u is used in Java's FileHandler to generate a unique field value.


A pattern consists of a string that includes the following special components that will be replaced at runtime:

* "/" the local pathname separator
* "%t" the system temporary directory
* "%h" the value of the "user.home" system property
* "%g" the generation number to distinguish rotated logs
* "%u" a unique number to resolve conflicts
* "%%" translates to a single percent sign "%"

Does that make sense in your particular context?

share|improve this answer
Its not just in java programs that the %u appears – Tom Brito May 7 '10 at 14:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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