Hidden Files

Certain files are listed only when you specifically ask to see them. These are called hidden files. Your .profile file is an example of a hidden file. Any file whose name begins with a . is treated as hidden. These filenames are not displayed by an unadorned ls command, but are displayed when requested with the -a option (-a means all).

The following example shows an ls -l command with no hidden files displayed, followed by an ls -la command that includes hidden files in its output:

 $ ls –l # Does not display hidden files total 4 -rw-r--r-- 2 obrien guest 629 Nov 2 00:54 hardlinktostats -rwxr-xr-- 1 obrien guest 412 Nov 2 00:53 openone lrwxrwxrwx 1 obrien guest 11 Nov 2 01:20 pass -> /etc/passwd lrwxrwxrwx 1 obrien guest 5 Nov 2 ...

Get Korn Shell Programming by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.