Interview Preparation mode beta
Funny Facebook Status Funny Facebook Status
Enter your email address

Explain about Wildcards in UNIX

Nice?Vote!

1 Answer

Nice?Vote!
The characters * and ?
----------------------
The character * is called a wildcard, and will match against none or more character(s) in a file (or directory) name. For example, in your unixstuff directory, type

% ls list*

This will list all files in the current directory starting with list....

Try typing

% ls *list

This will list all files in the current directory ending with ....list

The character ? will match exactly one character.
So ls ?ouse will match files like house and mouse, but not grouse.
Try typing

% ls ?list
answered 1 year ago by siva (10,720 points)

Related questions