告诉 HN:macOS 上的截图不必是带空格的日期命名文件
4 分•作者: cs1996•6 天前
您是否不喜欢桌面上有大量文件,例如 Screenshot 2026-09-14 at 6.42.17 AM.png?
mkdir ~/Screenshots
defaults write com.apple.screencapture location "$HOME/Screenshots"
killall SystemUIServer
https://gist.github.com/andrewarrow/1584ca32badeb19868dcc3bec657eaa9
https://gist.github.com/andrewarrow/3d61d1c8ecdd3a7e7401bbec481718ca
launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.aa.rename-screenshot.plist
现在我得到:
~/Screenshots $ ls
basifacial_decidua.png
dehull_knopweed.png
erlking_walloping.png
查看原文
Do you not like lots of files on your Desktop like Screenshot 2026-09-14 at 6.42.17 AM.png ?<p>mkdir ~/Screenshots<p>defaults write com.apple.screencapture location "$HOME/Screenshots"<p>killall SystemUIServer<p>https://gist.github.com/andrewarrow/1584ca32badeb19868dcc3bec657eaa9<p>https://gist.github.com/andrewarrow/3d61d1c8ecdd3a7e7401bbec481718ca<p>launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.aa.rename-screenshot.plist<p>And now I get:<p>~/Screenshots $ ls<p>basifacial_decidua.png<p>dehull_knopweed.png<p>erlking_walloping.png