Mac terminal directives commonly used in iOS

Source: Internet
Author: User

1. Use Caffeinate to prevent your Mac from running screen saver and sleepCaffeinate can prevent your Mac from going to sleep, and screen saver won't activate. We'd better use-t to add a specific time to the command. For example, the following command can make the Mac not sleep in an hour. Caffeinate-t 36002. Using Pkgutil to extract pkg filesIf you want to view a special file in the PKG installation file, you can do so using the Pkgutil command. The following command extracts the macx.pkg file to the desktoppkgutil--expand macx.pkg ~/desktop/3. Use the Purge command to free up memoryThe Purge command clears both the memory and the hard disk cache, similar to the effect of restarting the Mac. The Purge command allows inactive system memory to be converted into memory that can be used. You just need to enter the following command in the terminal. Purge4. Use the Open command to open multiple identical applicationsThe Open command opens the app in the terminal and uses-N to open multiple identical apps. For example, you can use the following command to open a new safari windowopen-n/applications/safari.app/5. Do not update OS X from the App Storewant to update your system but don't want to open the bloated Mac App Store? The following command can help you to upgrade OS X using a terminal.
  1. sudo softwareupdate-i-A
  2. 6. List all downloaded files
  3. We can use the following command to The downloaded content is listed in the sqlite3 ~/library/preferences/com.apple.launchservices.quarantineeventsv* ' Select Lsquarantinedataurlstring from Lsquarantineevent ' |more 
  4. 7. Use the Chflags command to hide files or folders If you want to hide a file or folder, the Chflags command can be implemented. You just need to fill in the file path, like we're going to hide the Macx folder on the desktop. If you want to see the folder again, simply change the hidden to Nohidden.
  5. Chflags Hidden ~/desktop/macx
  6. 8. Auto-Input file path You know that you can get a detailed path to a file by dragging any file from the Finder to a terminal window. When you want to enter a path to a file, you may wish to drag the file to try. 9. Create a password-protected compressed file You can create the Macx.txt file on the desktop as a password-protected compressed file protected.zip by following the command below.


Mac terminal directives commonly used in iOS

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.