z/OS UNIX System Services User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


The ? character

z/OS UNIX System Services User's Guide
SA23-2279-00

In a pathname, the question mark ? can stand for any single character, except a leading dot. For example:
file.?
refers to any and all files with names that consist of file. followed by any single character. This can mean file.a, file.b, file.c, and so on ... whichever of the files currently exist.
You can combine * and ?.
ls *.?
displays the names of all files under the working directory that have one-character file name suffixes.
Again, you can use the ? in directory names as well as file names. For example:
ls ???/*
shows all files in every directory under your working directory that have a three-character name.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014