How does a Mac hide a file?

Source: Internet
Author: User
Tags mkdir

We know that under Windows system hidden files is very simple, right click the Select "Properties" to choose "hidden" can be, then in the MAC system we do not see this option? If we have the need to hide files or folders, how do we implement them? Here Small compilation teaches everybody several simple and practical hiding method.

Hiding is just a way to protect a file, it just makes it invisible under certain conditions, but there's actually a much more powerful way to hide it, which is encryption, and maybe that's the way Apple wants to give it to you. Let's take a look at some of the ways to hide the files below.

The use of resource libraries, programs, installation packages to hide files

If you just want to make files difficult to find, there are several ways to do this:

1, put the file into the "~/Resource Library directory:

After the Lion system, the system defaults to use the Repository folder in the head of household as a hidden folder, so you can create a folder in this directory to bury your pile of secrets, even if you can put them in the "~/repository/application support/" Then create a folder to put your secrets in.

Click on the desktop or Finder, then click on the Menu "Go", and then click "Resource Pool" to access the Repository folder.

2, put the file in the program:

MAC program is actually a number of extensions to the. App folder, so right click on the program selected "Display package content" can see the Program files and resource files, so now you can put the data here, which is a hidden way.

Of course you can create a new folder, then name it as an. app file, such as Microsoft Office 2011.app, and then right-click the file to select "Show Package Content" to put the data in the app, or simply rename your secret folder to Microsoft Office 2011.app. If you want to see the file, just right-click on the app and choose "Show Package Content".

Second, make the file not visible

This is the most common way, but also the most practical way, people always think that hidden people can not see, if you want to hide the file or folder under the Mac there are several ways:

1. Create a new hidden folder

Enter mkdir in the terminal. Folder name

For example, if you want to create a new hidden folder in the document directory, just open the terminal, and enter mkdir DOCUMENTS/.ABC to make a. ABC hidden folder in the document directory. (How to display a Mac hidden file see here "How to display the Mac hidden file")

2. Turn a folder into a hidden folder

Enter MV file. File or MV folder. folder in the terminal to hide. The most direct way to enter the MV in the terminal and then drag the file or folder to the Terminal window, and then enter a space plus. Drag the file here and press RETURN to run it to hide the file. This is the way the Mac is used to hide files in front of the name, but you can't add directly to a file in the Finder directly under the Mac, and it must be implemented in a terminal.

By modifying the hidden properties of a file

Enter Chflags hidden in the terminal and drag the file here to hide the file by pressing return.

Chflags is a change file hidden attributes of the command, he means changes flags, that is, modify the file's logo, hidden is hidden, so chflags hidden is hidden files. If you want to unhide the file, just enter the "chflags nohidden file.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.