Next: , Up: Format Directives



3.2.2.1 Name Directives
%p
File's name (not the absolute path name, but the name of the file as it was encountered by find - that is, as a relative path from one of the starting points).
%f
File's name with any leading directories removed (only the last element).
%h
Leading directories of file's name (all but the last element and the slash before it). If the file's name contains no slashes (for example because it was named on the command line and is in the current working directory), then “%h” expands to “.”. This prevents “%h/%f” expanding to “/foo”, which would be surprising and probably not desirable.
%P
File's name with the name of the command line argument under which it was found removed from the beginning.
%H
Command line argument under which file was found.