Tag Archives: mac

Mac command not found solution

MacBook Air command not found. This may have been caused by modifying the Profile when configuring Java Path.
: ls CD, vim, sudo, man command not found

1. First, enter commands so that you can use commands such as Vim temporarily

export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/X11R6/bin

Then open ~/.bash_profile

vim ~/.bash_profile

2. Add PATH

export PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:${JAVA_HOME}:${JAVA_HOME}/bin"

3. Restart Profile

source ~/.bash_profile

Exit Terminal, open it again, and type Vim to see if it works

Batch modification of file names on MAC Linux rename command line

[rename] [rename] [rename] [rename] [rename] [rename]

zsh: command not found: rename

So use Homebrew to install it first:

➜  ~ brew install rename

After that, you can directly use a simple one-line command to change the name of multiple files. The general format is as follows:

➜  ~ rename 's/old/new/' *.files 

Ex. :
Change the prefix of batch PNG files from ‘ic_’ to ‘ic_setting_’ :
(ic_launcher.png -> ic_setting_launcher.png)

➜  ~ rename 's/ic_/ic_setting_/' *.png 

Modify part names of batch files:
(ic_setting_launcher.png -> ic_launcher.png)

➜  ~ rename 's/_setting//' *.png 

You can also use :
to change the first five letters to XXXXX (note ^… It’s five.

for i in `ls`; do mv -f $i `echo $i | sed 's/^...../xxxxx/'`; done

Usage is almost the same, the rest is up to us to flexibly use.

How to disable icloud drive on Mac?

ICloud Drive is a very useful feature that makes it easy to share files and documents between your devices (including other Macs, iPhones, and iPads) by automatically synchronizing and copying files between devices, so you should only disable iCloud Drive if you don’t have it enabled. So how to disable the iCloud drive on the Mac, there is a need for friends to welcome the reference!

Please note that this is disabling iCloud Drive completely on the Mac, not just disabling the iCloud desktop and documents that only store these two directories in iCloud.
Before attempting this step, make sure your Mac has a valid Internet connection.
The specific methods are as follows
1. Go to the Apple icon in the menu bar and select “System Preferences”.
2. Select “iCloud Settings”.
3. Uncheck the iCloud drive next to this check box.

4. Make sure to disable the iCloud drive and remove the iCloud files from your Mac.
You now have two options to choose what you want to do with your iCloud file.
Keep a copy – This keeps a downloaded copy of the iCloud files on the Mac. This option is recommended if you want to access the files offline later. This option works for most Mac users.
Delete from Mac – Selecting this option will remove all files from the iCloud drive on your Mac, and you will no longer be able to access these files on your computer.

5. Once you have selected the desired options, exit System Preferences on your Mac.
When you close the iCloud drive on your Mac, you’ll notice that the iCloud options disappear from the sidebar of the Finder, as well as from the Dock or anywhere else on your system. This is because you have completely disabled iCloud Drive from your Mac. You will not be able to save, copy, move, or upload files from your Mac on your iCloud drive.
To re-enable iCloud Drive, go back to System Preferences and select the iCloud Drive box.

Mac upgrade pip

I haven’t upgraded PIP for a long time. Today I will upgrade once:

$ pip install --upgrade pip
Collecting pip
  Using cached https://files.pythonhosted.org/packages/d8/f3/413bab4ff08e1fc4828dfc59996d721917df8e8583ea85385d51125dceff/pip-19.0.3-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 9.0.1
    Uninstalling pip-9.0.1:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/commands/install.py", line 342, in run
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_set.py", line 778, in install
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 754, in uninstall
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_uninstall.py", line 115, in remove
    renames(path, new_path)
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/utils/__init__.py", line 267, in renames
    shutil.move(old, new)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 300, in move
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 247, in rmtree
    rmtree(fullname, ignore_errors, onerror)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 252, in rmtree
    onerror(os.remove, fullname, sys.exc_info())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 250, in rmtree
OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/EGG-INFO/PKG-INFO'
You are using pip version 9.0.1, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Prompt permission is not enough, assign permission to the current user:

mac-temp:~ zyh$ sudo chown -R $USER /Library/Python/2.7

Upgrade again:

mac-temp:~ zyh$ pip install --upgrade pip
Cache entry deserialization failed, entry ignored
Collecting pip
  Using cached https://files.pythonhosted.org/packages/d8/f3/413bab4ff08e1fc4828dfc59996d721917df8e8583ea85385d51125dceff/pip-19.0.3-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 9.0.1
    Uninstalling pip-9.0.1:
      Successfully uninstalled pip-9.0.1
Successfully installed pip-19.0.3

$ pip --version
pip 19.0.3 from /Users/zyh/Library/Python/2.7/lib/python/site-packages/pip (python 2.7)


The use of MAC Desktop tiktok Goose pet goose

GooseDesktop is a fun desktop pet app that allows users to see a goose running around the screen.
douyin table pet goose Mac version how to use
Double click the application
to open it again to display the Settings window
. In the Settings window, you can either:
to change Settings
to exit the Desktop Goose (type killall “Desktop Goose” and press enter) or click the Settings “Quit Desktop Goose”
to open the Memes and Notes folder

Douyin Table pet goose Mac version technical description

module stored in ~/Library/Containers/net. Namedfork. Desktop chicago-brewed Goose/Data/Library/Application Support/Desktop chicago-brewed Goose/Memes.
is filled with built-in modules on the first run, but you can put more memes (GIF, PNG, JPG, and so on) in it.

note the Notes stored in ~/Library/Containers/net. Namedfork. Desktop chicago-brewed Goose/Data/Library/Application Support/Desktop chicago-brewed Goose/Notes /.
is populated with built-in comments the first time it runs, but you can put more comments here (as a TXT file).
to open the Settings window, double-click the icon again after the application runs.
can also change the Settings of the terminal using the default command. Here are the Settings and their default values:
CanAttackAtRandom: NOMinWanderingTimeSeconds: 20 maxwanderingtimeseconds: 40 firstwandertimeseconds: 20 framerate: 60 soundvolume: 1 – (use values between 0 and 1) UseCustomColors: NOGooseWhite: #ffffffGooseOrange: #ffa500GooseOutline: #d3d3d3GooseEye: #000000GooseMud: #8b4513
For example, to frame rate down to 30:
defaults write net. Namedfork. DesktopGoose FrameRate 30
let goose red:
defaults write.net. Namedfork. DesktopGoose GooseWhite “# ff0000”
defaults write net. Namedfork. DesktopGoose UseCustomColors – bool YES
quieted goose:
defaults write.net. Namedfork. DesktopGoose SoundVolume 0
changes will take effect immediately, without having to restart the Desktop chicago-brewed Goose.
application scripting
desktop goose for Mac can script with AppleScript. Drag the application to the script editor to see what is supported.
some examples you can do:
tell app “Desktop Goose” to collect meme “Meme4.png”
tell app “Desktop Goose” to collect meme “https://i.redd.it/4bamd6lnso241.jpg”
tell app “Desktop Goose” to wander
tell app “Desktop Goose” to nab mouse
tell app “Desktop Goose” to collect note “Honk from AppleScript” title “HoNK”

How to open an app from an unidentified developer

How to open an app from an unidentified developer
You can run apps that you’ve downloaded directly from the internet that aren’t registered with Apple. You just have to give the OK.

    After downloading an app from an unidentified developer, drag it to the Applicationsfolder. Select the app and right or control-click.   Click on Open. Click on Open again to confirm you want to complete the action.

Opening an app from unidentified developer with a right or control-click overrides Gatekeeper for that specific app. From now on, you’ll always be able to open it without having to go through the process again.
How to reinstate the Anywhere setting in Gatekeeper
If the thought of having to right or control-click to open apps from unidentified developers seems arduous and tiresome, you can turn back time with Gatekeeper and bring back the ability to open apps from anywhere. All it takes is a bit of coding in Terminal.

    Close System Preferences on your Mac. Open Terminal. Type the following command: sudo spctl –master-disable Hit enter on your keyboard. Enter your administrator password. Hit enter on your keyboard.

Gatekeeper’s “Anywhere” setting will now be restored. It will also be selected by default. You can confirm the changes by opening System Preferences and selecting Security & Privacy.

If you ever want to enable the macOS Sierra Gatekeeper settings again, type sudo spctl –master-enable into Terminal.

Free dynamic screen capture drawing tool under MAC: KAP

If you want to take live screenshots on your MAC, here’s a free tool: KAP.
The address of the project: https://github.com/wulkano/Kap
1) homebrewCask installation (not recommended)
brew cask install kap
2) official website release
3) My network disk sharing (fast and permanent)
Link: https://pan.baidu.com/s/1YGZ8p5HHN3Xsnp4dY-0a9A password: ficg
The installation
Double-click DMG to install directly
1. Click Kap in the docking station

2. Click the KAP icon in the top taskbar

3. After the mouse becomes a cross, hold down and drag to select the range

5. After selecting the range, click the red circle button above to start recording the screen.
6. After recording, click the KAP icon (circle) in the top menu bar.
7. As shown in the figure below, you can choose to Export to GIF format. Click Export and select save path


Blogger: Test to make money
Motto: Focus on testing and automation, to improve the efficiency of RESEARCH and development; Through the test to complete the original accumulation, through reading financial management toward financial freedom.
Garden: blog https://www.cnblogs.com/qa-freeroad/
51 cto:https://blog.51cto.com/14900374


Mac — Open keyboard F1 – F12 function key

1. Enter system preferences
2. Keyboard
3. Select the option “use F1, F2, etc. as standard function keys…” After setting
, the original function key can be implemented by holding fn+F1 ~ F12
Some functions in F1 ~ F12 are often used in the development of IDEA, so it is convenient to set up the development