On Mon, Feb 11, 2019 at 05:26:34PM -0000, Curt wrote: > I follow your logic. Give me everything in /etc/skel/ beginning with a dot. > Which works. But apparently a dot is also something else. Like a directory. > > curty@einstein:~$ ls /etc/skel/.* > /etc/skel/.bash_logout /etc/skel/.bashrc /etc/skel/.profile > > /etc/skel/.: > > /etc/skel/..: > > (etc.--the contents of /etc/ > > I'm not sure what it all means.
The shell glob .* expands to everything in the current directory that begins with a dot. Which includes "." and "..". "." is the current directory. ".." is the parent directory. E.g. when you type "cd .." it moves you "up" to the parent directory. Asking ls to show you .* is usually a bad idea, precisely because it expands to a list which includes . and .. and does exactly what you just described. This is why the ls command has -a and -A options.