All Mac users need to know the nine practical terminal command lines, mac Terminal

Source: Internet
Author: User
Tags password protection

All Mac users need to know the nine practical terminal command lines, mac Terminal

Generally, terminal applications are often used only by high-end users. This does not mean that the command line is very difficult to learn. Sometimes, the command line can easily and quickly solve the problem. I believe that all Mac users have tried the command line. Today, we have nine very practical command line operations. Some command lines can be used only after Xcode is installed. Xcode is available for free in Mac App Store.


1. Use caffeinate to prevent Mac from running Screen Protection and sleep

Caffeinate can prevent Mac from entering sleep state, and screen protection will not be activated. We 'd better use-t to add the specific time for the command. For example, the following command does not enable Mac to sleep for an hour.

Copy code





2. Use pkgutil to decompress the PKG File

To view a special file in the PKG Installation File, run the pkgutil command. The following command will decompress the macx. pkg file to the desktop

Copy code





3. Use the purge command to release memory

The purge command can clear the cache of memory and hard disk, which is similar to restarting Mac. The purge command can convert inactive system memory to available memory. You only need to enter the following command in the terminal.

purge



4. Use the open command to open multiple identical applications

The open command can enable the application on the terminal, and use-n to enable multiple identical applications. For example, you can use the following command to open the new Safari window.

Copy code





5. Update OS X without using App Store

Do you want to update the system but do not want to open a bloated Mac App Store? The following command can help you use the terminal to upgrade OS X.

Copy code





6. list all downloaded files

We can use the following command to list all downloaded content

Copy code





7. Use the chflags command to hide files or folders.

If you want to shadow a file or folder, you can run the chflags command. You only need to fill in the correct file path, for example, to hide the macx folder on the desktop. If you want to see the folder again, you only need to change hidden to nohidden.

Copy code





8. automatically enter the file path

Do you know how to drag any file from the Finder to the terminal window to obtain the detailed path of the file. If you want to enter the path of a file, drag and drop the file.



9. Create a compressed file with password protection

You can create a password-protected file protected.zip using the following commands.

Copy code

 

Related Article

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.