Hidden Files

First, making a file a "hidden file" has nothing whatever to do with security since regardless of the operating system that you use there are simple ways of displaying all filenames including "hidden files". With linux the way to do this is to add the -a flag (meaning display all filenames) to the ls (list) command. Typing "ls -a" will display all of the files in the current directory regardless of whether the filenames are visible or hidden.

The purpose of "hiding" filenames is to hide those files that the user usually does not need to access from their regular display list. This means that hidden files are usually system files that have fixed well known names and which are used for a well defined and well known purpose. The filenames are hidden more because everyone who knows about them knows that they are there and doesn't need their directory listing cluttered with standard filenames rather than through any attempt to conceal the existence of the file.

Linux provides a vary simple way of "hiding" a file. All that you need to do when you create the file is to add a period to the front of the filename. This is what defines to Linux that the filename is "hidden". So .bashrc is a hidden file while bashrc is not.

As the only difference between a visible and a hidden file is the period on the front of the filename, Linux does not require any special commands to convert files from visible to hidden (or vice versa). Instead this can be done using the mv (move or rename) command for example mv .bashrc bashrc would make that hidden file visible by renaming the file to remove the period.


This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow