Mac OS X 中无法清空 Trash 时的解决办法

在安装了 Paragon NTFS for Mac 后经常会遇到在 NTFS 分区中删除文件后无法清空 Trash 的情况,如果你也遇到了这种情况,不妨尝试以下的办法: 使用终端手工删除: $ sudo su # cd /Volumes/Sonic_MD # rm -rf .Trashes 此时删除失败的可能性比较大: # rm -rf .Trashes/ rm: .Trashes//501/tset: Input/output error rm: .Trashes//501: Directory not empty rm: .Trashes/: Directory not empty 接下来,打开 Disk Utility, 选择那个 NTFS 分区,点 Verify Disk。 然后 log 会提示一些错误,最后再 Repair Disk 就解决了。 不行的话… Continue reading Mac OS X 中无法清空 Trash 时的解决办法

Mac OS X Terminal shortcut

(转自stackoverflow,略改) On Mac OS X 10.7 – the following keyboard shortcuts work by default. Meta-Right to jump forward by a word Meta-Left to jump backward by a word I have observed that default emacs key-bindings for simple text navigation seem to work on bash shells. You can use Meta-d to delete a word starting from… Continue reading Mac OS X Terminal shortcut

Install dnsmasq on Mac OS X with homebrew

上月发现某203.208.46.xx IP用于代替一堆域名很不错。今天发现这个IP被屏蔽了。于是只能换一个。但是要改好多东西好麻烦。于是想到用dnsmasq的方式来玩。hosts表示好累。 首先安装Homebrew /usr/bin/ruby -e “$(curl -fsSL https://raw.github.com/gist/323731)” 安装成功后将配置文件模版复制到配置文件的位置: cp /usr/local/Cellar/dnsmasq/2.57/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf 再配置一下自动启动: sudo cp /usr/local/Cellar/dnsmasq/2.57/uk.org.thekelleys.dnsmasq.plist /Library/LaunchDaemons sudo launchctl load -w /Library/LaunchDaemons/uk.org.thekelleys.dnsmasq.plist 然后修改上面的conf配置文件。修改网络连接的dns到127.0.0.1,而让dnsmasq去/usr/loca/etc/resolv.conf中找真正的DNS查询。这里/usr/local/etc/resolv.conf需要自信创建,并且告知配置文件。

关闭Mac OS X的虚拟内存

[bash] sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist [/bash] 这样在/private/var/vm下的swapfile?文件就可以删除了, sleepimage还会存在,这点不影响。 需要恢复可以使用如下命令: [bash] sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist [/bash]