第一个里程碑 ---- 查看系统别名

[root@xilong ~]# alias
alias cp='cp -i'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias l.='ls -d .* --color=auto'
alias ll='ls -l --color=auto'
alias ls='ls --color=auto'
alias mv='mv -i'
alias rm='rm -i'
alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'

第二个里程碑 ---- 配置系统别名

[root@xilong ~]# alias xilong='pwd'
[root@xilong ~]# xilong
/root

第三个里程碑 ---- 临时生效

要求: 执行rm命令时,提示“Do not use this command!”
:临时生效
[root@xilong ~]# alias rm='echo "do not use this command"'
[root@xilong ~]# rm
do not use this command

第四个里程碑 ---- 永久生效

[root@xilong ~]# tail - /etc/profile
#alias
alias rm='echo "Do not use this Command!"'
[root@xilong ~]# source /etc/profile
[root@xilong ~]# rm
Do not use this Command! [root@xilong ~]# cat /root/.bashrc
# .bashrc # User specific aliases and functions #alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i' # Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

Configuration Alias的更多相关文章

  1. MyBatis的getMapper()接口、resultMap标签、Alias别名、 尽量提取sql列、动态操作

    一.getMapper()接口 解析:getMapper()接口 IDept.class定义一个接口, 挂载一个没有实现的方法,特殊之处,借楼任何方法,必须和小配置中id属性是一致的 通过代理:生成接 ...

  2. C# 利用Unity 实现IOC+AOP

    public interface INoticy { void Noticy(string msg); } public class SMSNoticy : INoticy { public void ...

  3. Unity 3(二):Unity在AOP方面的应用

    本文关注以下方面(环境为VS2012..Net Framework 4.5以及Unity 3): AOP简介: Interception using Unity示例 配置文件示例 一.AOP简介 AO ...

  4. 使用Unity解耦你的系统—PART4——Unity&PIAB

    在前面几篇有关Unity学习的文章中,我对Unity的一些常用功能进行介绍,包括:Unity的基本知识.管理对象之间的关系.生命周期.依赖注入等,今天则是要介绍Unity的另外一个重要功能——拦截(I ...

  5. macOS Ruby版本需要升级到2.2.2以上

    在安装 Ruby on Rails 时遇到问题,提示依赖 ruby 2.2.2 或更高的版本. ERROR: Error installing rails: activesupport require ...

  6. Azure & FaaS in Action

    Azure & FaaS in Action VSCode & Azure azure tenant select subscription Cloud Shell https://a ...

  7. 20190703_创建 unity 的配置节处理程序时出错: The type name or alias Microsoft.Practices.Unity.InterceptionExtension.Configuration.InterceptionConfigurationExtension

    创建 unity 的配置节处理程序时出错: The type name or alias Microsoft.Practices.Unity.InterceptionExtension.Configu ...

  8. The type name or alias SqlServer could not be resolved.Please check your configuration

    The type name or alias SqlServer could not be resolved.Please check your configuration file.... 检查一下 ...

  9. 6.mybatis异常:SQL Mapper Configuration,Error parsing Mapper XML,Could not resolve type alias

    在xxxMapper中 <select id="getClazz" parameterType="int" resultType="getCla ...

随机推荐

  1. 支持触屏的jQuery轮播图插件

    移动轮播图我看到两类, 一款是无线天猫的m.tmall.com和携程,实现了无缝轮播. 一款是蘑菇街的,没有实现无缝轮播. 我自己重写一个,类似天猫. 1.页面代码 <!DOCTYPE html ...

  2. abc098D Xor Sum 2(two point)

    题意 题目链接 给出一个序列,求出有多少区间满足\(A[l] \oplus A[l+1] \oplus \dots \oplus A[r] = A[l] + A[l + 1] +\dots+ A[r] ...

  3. Exchange 域用户无权管理邮箱

    将需要管理邮箱的域用户添加至“Microsoft Exchange Security Groups”用户组即可.

  4. hibernate 一览表

  5. Laravel Service Provider 开发时设置延迟加载时遇到的问题

    因实际项目需求,近日在开发 laravel-database-logger 包的时候,发现设置 ServiceProvider defer 属性设置为 true 时,会导致在register 方法中注 ...

  6. nginx http强制跳转https

    通过nginx的rewrite 进行301永久重定向,参考如下配置即可. server { listen  192.168.1.111:80; server_name test.com; rewrit ...

  7. php nginx 获取header信息

    nginx中可能没有getallheaders函数 因此编写新函数 function NginxGetAllHeaders(){//获取请求头 $headers = []; foreach ($_SE ...

  8. 如何将iso文件安装到VirtualBox里的ubuntu去

    我在Window的virtualbox里安装了一个ubuntu: 默认情况下IDE Secondary Master是空的. 方法1:Devices->Insert Guest Addition ...

  9. 用trie树实现输入提示功能,输入php函数名,提示php函数

    参照刘汝佳的trie树 结构体 #include "stdio.h" #include "stdlib.h" #include "string.h&q ...

  10. IOS 摇一摇的方法

    ● 监控摇一摇的方法 ● 方法1:通过分析加速计数据来判断是否进行了摇一摇操作(比较复杂) ● 方法2:iOS自带的Shake监控API(非常简单) ● 判断摇一摇的步骤:实现3个摇一摇监听方法 ● ...