可以使用sysctl 命令: [code] sysctl hw [/code] 会列出一些和CPU内存配置相关的参数,其中还有此CPU的byteorder, 4321 为bigendian, 1234为little endian.
Tag: osx
修复OSX中出现重复的Open with子菜单项的问题
在Terminal中运行以下命令即可修复: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/\ LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local\ -domain system -domain user
Mac OSX Mountain Lion 的全局环境变量, For all GUI apps and Spotlight
以前osx的全局变量可以通过~/.MacOSX/envrironment.plist文件来设置,现在Mountain lion后就不行了。现在的文件换成/etc/launchd.conf 可以使用一下方法来设置: 1) Open a terminal prompt 2) Type sudo vi /etc/launchd.conf (note: this file might not yet exist) 3) Put contents like the following into the file # Set environment variables here so they are available globally to all apps # (and Terminal), including those launched via Spotlight. # # After editing this file run… Continue reading Mac OSX Mountain Lion 的全局环境变量, For all GUI apps and Spotlight
OSX 的 iTerm2中显示中文文件系统
在iTerm2中需要正确的显示中文文件目录和文件名需要对iTerm2进行以下设置: iTerm2 Preference——Profiles——Terminal 修改其中的文字编码为utf-8 然后在使用ls时加上 -v 参数,作用是: -v Force unedited printing of non-graphic characters; this is the default when output is not to a terminal. 这样中文字就能以UTF-8编码正确的显示了。 修改一下文件就可以输入中文了: ~/.inputrc中添加: set convert-meta off set meta-flag on set output-meta on