查找已删除但未释放的磁盘空间
lsof(8)
A specification of the form
+L1
will select open files that have been unlinked.A specification of the form
+aL1 <file_system>
will select unlinked open files on the specified file system.
lsof(8)
A specification of the form
+L1
will select open files that have been unlinked.A specification of the form
+aL1 <file_system>
will select unlinked open files on the specified file system.
https://support.apple.com/en-us/HT208209
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE
运行后重新登录即可。
git ls-files -ziX .gitignore | xargs -0 git rm
缺点是如果仓库里有多个 .gitignore
文件,只能覆盖到当前目录的。
另一种比较危险的方案是移除所有文件再添加,注意先确保工作区干净。
git rm -r --cached .
git add .
菜单中选择 ... -> Phone -> SMS message,发送短信后进入模拟器的短信应用就可以将文本复制到模拟器内的剪贴板了。
Android Emulator Copy & Paste: Back by popular demand, we added back the Copy & Paste feature to the latest Emulator (v25.3.1). We have a shared clipboard between the Android Emulator and host operating system, which will allow you to copy text between both environments. Copy & Paste works with x86 Google API Emulator system images API Level 19 (Android 4.4 - Kitkat) and higher.
如果镜像 API Level 高于 18,直接复制粘贴就好,和系统剪贴板互通。
如果 Android 模拟器无法上网,测试 adb shell
里 ping 域名解析不出 IP,可以试试用 ./emulator/emulator -avd <name> -dns-server 1.1.1.1
启动。
When starting the emulator at the command line, you can also use the-dns-server <serverList>
option to manually specify the addresses of DNS servers to use, where<serverList>
is a comma-separated list of server names or IP addresses. You might find this option useful if you encounter DNS resolution problems in the emulated network (for example, an "Unknown Host error" message that appears when using the web browser).
https://developer.android.com/studio/run/emulator-networking#dns