Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Possible Duplicate:
How can I hide directories without changing their names?

I'm using Ubuntu 11.10 and I want to make a file hidden.

How do I make for example a .docx file or a directory hidden?

Please put a way to do it with and without the terminal?

share|improve this question

marked as duplicate by Lekensteyn, Octavian Damiean, James Henstridge, Marco Ceppi Feb 26 '12 at 15:56

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3 Answers 3

up vote 10 down vote accepted

Hiding files and directories in Linux is very simple. All you have to do is append a period at the beginning of the name of the file/directory.

With terminal:

mv filename .filename

(This command also works with directories)

Some additional information about the mv command; if the second argument is a directory, the first argument will be moved into that directory, rather than being renamed to it (regardless of whether the first argument was a file or a directory). If the first argument is a directory and the second is a file, you will get an error. If both the first and the second arguments are existing files, the second will be overwritten without prompting you! If you wish to be prompted before overwriting, add -i to the command before either argument

To view hidden files and directories in a terminal, use ls -a.

Without terminal:

Click on the file, press the F2 key and add a period at the beginning of the name. To view hidden files and directories in Nautilus (Ubuntu's default file explorer), press Ctrl+H. The same keys will also re-hide revealed files.

share|improve this answer

To make a file or folder hidden, rename it to begin with a dot, for example, .file.docx.

To see the hidden files in Nautilus, hit Ctrl + H, and in the terminal, use ls -a.

share|improve this answer

You just put a dot at the beginning of a folder or a file.
Nautilus has the option to show this files.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.