Sunday, 22 January 2012

How to Make Hidden Files on Ubuntu

Sometimes you may want to protect some files from being seen by standard means and to keep them from being messed with by people who don't know what they are doing. Making your files and directories hidden will make them invisible to ls and view in a file manager under a standard mode.

Move the file. Move the file so that it is prefixed with a dot. For example, to move a file from the command line, type: mv file .file. This will also work with directories.

Make the file visible by renaming it from its "." prefix or, if you simply want to view it from the file manager, select "Show Hidden Files." or press Ctrl-H. From the command line, type: ls -a, to list all files. To search for this file, run: ls -a | grep *pattern* for files that match "*pattern*", using standard wildcards.

Most of your configuration settings for your desktop environment and applications are kept hidden in your home directory (/home/username or ~), unhiding these may make your applications not work (They may require that directory with the dot prefix). To view the directory from the parent directory, follow the instructions explained above.


Click Here for Source

No comments:

Post a Comment