如何找出别名(在bash的意义上)在Mac OS X上运行时,终端定义 [英] How to find out where alias (in the bash sense) is defined when running Terminal in Mac OS X

查看:253
本文介绍了如何找出别名(在bash的意义上)在Mac OS X上运行时,终端定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎样才能找出一个别名是我的系统上定义的?我指的是(10.6.3)从Mac OS X推出了终端会话中使用的那种别名。

How can I find out where an alias is defined on my system? I am referring to the kind of alias that is used within a Terminal session launched from Mac OS X (10.6.3).

例如,如果我输入与终端命令提示符没有参数的别名命令,我得到了我设置别名的列表,例如:

For example, if I enter the alias command with no parameters at a Terminal command prompt, I get a list of aliases that I have set, for example:

alias mysql='/usr/local/mysql/bin/mysql'

不过,我已经找遍了各种启动文件我的系统使用Spotlight和 mdfind ,至今找不到在哪里这个别名已经定义。 (我做了很长一段时间以前,并没有写下来,我分配的别名)。

However, I have searched all over my system using Spotlight and mdfind in various startup files and so far can not find where this alias has been defined. ( I did it a long time ago and didn't write down where I assigned the alias).

推荐答案

您可以只是简单的命令提示符下键入别名来看看有什么别名你。否则,你可以做一个找到在别名定义的最常见的地方,如:

you can just simply type in alias on the command prompt to see what aliases you have. Otherwise, you can do a find on the most common places where aliases are defined, eg

grep -RHi "alias" /etc /root

这篇关于如何找出别名(在bash的意义上)在Mac OS X上运行时,终端定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆