ls /etc/rc0.d /etc/rc1.d /etc/rc2.d /etc/rc3.d
ls /etc/rc4.d /etc/rc5.d /etc/rc6.d /etc/rcS.d

This is tedious. Instead, you can use the ? wildcard as shown here:

ls /etc/rc?.d

/etc/rc?.d expands to a list of filenames that begin with rc, followed by any single character, followed by .d.

Available wildcards include the following:

* Matches any group of 0 or more characters.

? Matches exactly one character.

[...] If you enclose some characters in brackets, the result is a wildcard that matches those characters. For example, [abc] matches either a, or b, or c. If you add a ^ after the first bracket, the sense is reversed; so [^abc] matches any character that is not a, b, or c. You can include a range, such as [a-j], which matches anything between a and j. The match is case sensitive, so to allow any letter, you must use [a-zA-Z].

Expansion patterns are simple once you see some concrete examples:

*.txt This will give you a list of all filenames that end in .txt, since the * matches anything at all.