Software - Support > Tutorials

How to hide files and directories

(1/1)

anon222:
There are two ways to do this:
   
One is to rename your file or folder and add a dot as the first character in the file/folder new name.
Example:
file   ----> .file
folder ----> .folder
You can do it by right-clicking on the file/folder and then on Rename. I mostly use the F2 key to rename files and folders.
If you want to use the command line:

--- Code: ---mv file-name  .file-name
--- End code ---

--- Code: ---mv folder-name .folder-name
--- End code ---

The other way is better because you don't have to rename a file or a folder.
All you need to do is to create a file .hidden in that folder where you want to hide your files or folders and type in the file or folder name you want to hide.

Here is an example:
You want to hide these folders Documents, Pictures, Videos, and this file bootfloppy.img. All of these are in the /home/user/
1. Open a file manager, go to /home/user/ and show all hidden files. Click on View and when menu pops out on Show Hidden Files. Instead of this you can use a keyboard shortcut Ctrl+H to show/hide hidden files.
2. Right click on an empty space inside a folder and when the floating menu appears go to Create Document > Empty File.
3. Name the new file .hidden and open it. Double click on it or open that file with Leafpad.
4. In the file .hidden you will save file/folder names you want to hide. In this case the folders and a file.
Here is the .hidden  file content:

--- Code: ---Documents
Pictures
Videos
bootfloppy.img
--- End code ---
As you can see, one file/folder per line.
5. Save it and hide all the hidden files and folders (Ctrl+H).
6. Now all you have to do is to "Refresh" the view. You can do this by clicking on Trash or Desktop and then just go back to the folder, or just close and open the file manager again.

Navigation

[0] Message Index

Go to full version