ls ( -I option ) do not list implied entries matching shell PATTERN

UNIX Command

$ls
bp  cfg.c  cfg.h  CVS  gtk  Makefile  sample.cfg  simpleproxy.c
$ls -I gtk
bp  cfg.c  cfg.h  CVS  Makefile  sample.cfg  simpleproxy.c
$ls -I gtk CVS
Entries  Repository  Root
$ls -I CVS gtk
main.c	Makefile  simpleproxy-gtk.c
$ls -I cfg.c
bp  cfg.h  CVS	gtk  Makefile  sample.cfg  simpleproxy.c
$ls -I bp
cfg.c  cfg.h  CVS  gtk	Makefile  sample.cfg  simpleproxy.c
$

UNIX Explanation

-I, --ignore=PATTERN
              do not list implied entries matching shell PATTERN

Theory Drop

In computer science,  pattern matching is the act  of checking some
sequence of  tokens for  the presence of  the constituents  of some
pattern. In contrast to  pattern recognition, the match usually has
to  be  exact. The  patterns  generally  have  the form  of  either
sequences  or tree  structures.  Uses of  pattern matching  include
outputting  the locations  (if any)  of  a pattern  within a  token
sequence, to output  some component of the matched  pattern, and to
substitute  the matching  pattern  with some  other token  sequence
(i.e., search and replace).

source : http://en.wikipedia.org/wiki/Pattern_matching

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s