This method is suitable for all Linux systems. Although it was carried out under Fedora. We all know that Windows can change the hidden nature by setting the properties of the file. So how do you do it under Linux? This article describes how to hide and display files and folders.
1, first show how to hide folders. (The file and folder methods are exactly the same, and the following is omitted.) If there's a Pythonar directory in your home directory, there's a folder called "Invisible."
2, then click it, rename it with F2 (or Fn + F2), and then press the home key to enter a decimal (.) At the front.
3, then, click Home, and then click Pythonar back to the previous "invisible" location. Sure enough, the folders are gone.
4, on the display of hidden folders, you can use the relevant settings for file browser. But it's too much trouble to do it at the terminal. So now please open the terminal. Enter the Pythonar directory.
5, and then use the command: LS-A, to display all the contents of the directory. You'll see. " .. . Can't see "three things." The first represents the current directory, and the second represents the parent directory. The most important is the third, it is your hidden directory.
6, use MV command to rename it:
mv. Can't see, see
So it is not only visible, but also renamed.
7, back to the previous directory, you can see the folder back.
PS: You can use the command Nautilus ~/pythonar to cut back from the terminal to the directory.
8. Conclusion:
This is a bit of a hassle for files/folders that often need to be hidden/displayed. It can be done by writing a shell script or Python script. However, most of the time, you can use this method to hide a file.
Note: about how to implement "SEC display" in Python to hide/display a file, if you need, please leave a comment