Run the script in osx spotlight and osxspotlight.

Source: Internet
Author: User

Run the script in osx spotlight and osxspotlight.

I am used to some bash operations in Linux. I often put a series of commands into a sh file. osx belongs to the Unix series and can perform the same operations, however, it cannot be executed in spotlight after being added to the environment variable. After google finds that you need to change the suffix. sh of the previous file to. command, and then you can perform quick operations. Next, we end a script for detaching a disk.

1
2
3
4
5
6
7
8
9
10
11
#! /Bin/bash
# Umount all disk privileges t disk1

Sync

For loop in 'df-h | grep "dev \/disk" | grep-v disk1 | awk {'print $1 '}'
Do
Diskutil unmount $ loop
Done

Say "unmount successfully! "

The above code uninstalls the mounting device except the local disk disk1. In osx, use diskutil instead of the umount command in Linux. After the unmounting is completed, the audio playback is uninstalled successfully.

For more articles, go to xiaopengxuan.


How can I directly access the folder where the file is located after I find it using spotlight on MAC?

Press the up-down key to select, and press cmd + enter to open the folder.

Where is spotlight in mac?

In the upper-right corner, the system preference settings are configured. If you cannot find the settings, you can search for spotlight in the system preference settings to highlight the settings.

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.