In personal computers we have some private files or materials that we do not want to be discovered or used by anyone. There are many ways to protect private files, such as encrypting files, hiding files, modifying file suffixes, and so on. In Mac we can also protect private files in some simple way. Here we briefly introduce three ways.
1. Modify the file suffix
Modify the file suffix name to the suffix of the other file type. For example, to protect a text file, we will modify the 1.txt to 1.dll. You can't open a file by double-clicking it, but you can still open it with a text editor.
2. hidden files
As with hidden files under windows, we can also set file properties to be hidden and displayed. Modify the file properties in the terminal by using the following command.
Chflags hidden file path--Hidden file
Chflags Nohidden file path-Unhide
If the file path points to a file, the specified file is hidden, and if you point to a folder with a * number appended to the folder, all the files under that folder are hidden, but the folder itself is not hidden.
3. Package the files in the installation package
- Create a folder, any named xxx.pkg, such as uninstall Macosx.pkg, the folder will automatically appear as a yellow installation package file.
- Open the installer with the show package contents on the right-click menu and drag the file you want to protect.
This way, double-clicking the installation package file cannot be opened.
Protect private files in your Mac, hide files