Mac OS X 贴士汇聚

Posted by 4Aiur on 02/10/2012 in MacOSX |

Mac OS X tips Find & Scan Wireless Networks from the Command Line in Mac OS X sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport airport -s Reindexing Spotlight from the Command Line Reindexing Spotlight from the command line is done with the mdutil tool, first launch Terminal and then type: sudo mdutil -E / This will reindex […]

Tags: ,

Setup Workspace On Mac OS X Lion

Posted by 4Aiur on 01/19/2012 in MacOSX |

Setup Workspace On Mac OS X Lion Software Update Click Apple () menu, choose Software Update Change System Preferences Click Apple () menu, choose System Preferences Trackpad Tap to click Scroll direction: natural Mouse Adjust Tracking Speed to max Keyboard Keyboard Shortcuts Full Keyboard Access: In windows and dialogs, press Tab to move keybiard focus […]

Tags:

Binding Multiple IP Addresses on the Same Network Interface

Posted by 4Aiur on 01/13/2012 in MacOSX |

Binding Multiple IP Addresses on the Same Network Interface Add new address sudo ifconfig en1 alias 192.168.2.2 netmask 255.255.255.0 sudo ifconfig en1 alias 192.168.3.3 netmask 255.255.255.0 sudo ifconfig en1 alias 192.168.4.4 netmask 255.255.255.0 sudo ifconfig lo0 alias 127.0.0.2 Remove alias address sudo ifconfig en1 remove 192.168.2.2 netmask 255.255.255.0 sudo ifconfig en1 192.168.3.3 netmask 255.255.255.0 delete […]

Tags:

MacOSX Services使用技巧

Posted by 4Aiur on 02/23/2011 in MacOSX |

MacOSX Services使用技巧 在MacOSX中利用Services快速完成某些工作,下面我举几个小例子演示一下。 简繁字转换 在文本编辑器中选中需要转换的文字后点击桌面左上角的编辑器名 -> Services -> Text -> Convert Selected Simplified Chinese Text 快速把文档当作附件发送 在Finder中选中文件后点击桌面左上角的Finder -> Services -> Messaging -> New Email With Attachment 使用Textmate打开文件夹 打开Automator新建Service,在Actions中搜索Open Finder Items,双击或者把“Open Finder Items”拖动到右边,在右边的Open with:中选中Textmate,保存为Open in TextMate。 之后有需要新项目需要用TextMate打开,就可以直接掉用Services了。 Finder -> Services -> Files and Folders -> Open in TextMate 附: Textmate官网提供了一个Finder中的Toolsopen in textmate from finder,用这个工具也挺方便的。 安装好后在Finder中选中要打开的Folder,点击OpenInTextMate即可。

Tags: , ,

MacOSX使用opensnoop跟踪进程使用情况

Posted by 4Aiur on 09/28/2010 in MacOSX |

MacOSX使用opensnoop跟踪进程使用情况 opensnoop参数如下: $ opensnoop -hUSAGE: opensnoop [-a|-A|-ceghsvxZ] [-f pathname] [-n name] [-p PID] opensnoop # default output -a # print most data -A # dump all data, space delimited -c # print cwd of process -e # print errno value -g # print command arguments -s # print start time, us -v # print start […]

Tags:

清除本机dns缓存的方法

Posted by 4Aiur on 04/06/2010 in MacOSX, SysAdmin |

清除本机dns缓存的方法 Windows下使用ipconfig/release, ipconfig/renew命令 Mac OS X使用dscacheutil -flushcache命令

Tags:

防止Mac Os X使用dhcp时修改hostname的方法

Posted by 4Aiur on 04/06/2010 in MacOSX |

防止Mac Os X使用dhcp时修改hostname的方法 在/etc/hostconfig中增加HOSTNAME项,这样可以阻止使用dhcp时,hostname经常被更改的问题。 使用命令行的方式修改 scutil –set HostName new_hostname sudo hostname new_hostname 或者直接编辑配置文件 udo vi /etc/hostconfig HOSTNAME=4Aiur 在桌面上修改hostname的方法: Launch ‘System Preferences’ Click the ‘Sharing’ icon Type in what you want your Mac’s new computer name to be

Tags: ,

定制MacOSX ls颜色

Posted by 4Aiur on 04/06/2010 in BSD |

定制MacOSX ls颜色 习惯了linux的ls颜色,不适应MacOSX终端中的ls颜色修改了ls颜色使用的默认环境变量,跟linux有些接近了。 首先增加一个 aliasalias ll=’ls -lG’ 之后修改LSCOLORS环境变量 export LSCOLORS=ExGxCxDxCxEgEdAbAgAcAd LSCOLORS from man ls: LSCOLORS The value of this variable describes what color to use for which attribute when colors are enabled with CLICOLOR. This string is a concatenation of pairs of the format fb, where f is the fore- ground color and b is […]

Tags:

Copyright © 2010-2019 4Aiur All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.5, from BuyNowShop.com.