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

[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. Java入门到精通——调错篇之Spring2.5利用aspect实现AOP时报错: error at ::0 can't find referenced pointcut XXX

    一.问题描述及原因. 利用Aspect注解实现AOP的时候出现了error at ::0 can't find referenced pointcut XXX.一看我以为注解写错了,结果通过查询相关资 ...

  2. 【Linux】Linux 在线安装yum

    Linux如何安装软件? 一.RPM安装 优点: 安装过程很简单 缺点: 需要自己寻找和系统版本对应的RPM包 安装过程中需要解决包的依赖问题(例如tftp包) 二.yum在线安装 软件包仓库 仓库的 ...

  3. GitHub无法push的问题

    问题背景 换了台别人用过的电脑想要将文件push到github上,出现下面报错 remote: Permission to *****(我的)/gittest.git denied to *****( ...

  4. 【Leetcode】【Easy】Remove Element

    Given an array and a value, remove all instances of that value in place and return the new length. T ...

  5. Selenium2学习(十四)-- 加载Firefox配置

    前言有小伙伴在用脚本启动浏览器时候发现原来下载的插件不见了,无法用firebug在打开的页面上继续定位页面元素,调试起来不方便 . 加载浏览器配置,需要用FirefoxProfile(profile_ ...

  6. 如何使用Kubernetes里的NetworkPolicy

    创建一个类型为NetworkPolicy的Kubernetes对象的yaml文件. 第九行的podSelector指定这个NetworkPolicy施加在哪些pod上,通过label来做pod的过滤. ...

  7. MySQL联合索引最左匹配范例

    MySQL联合索引最左匹配范例 参考文章:http://blog.jobbole.com/24006/ 创建示例表. 示例表来自MySQL官方文档: https://dev.mysql.com/doc ...

  8. (转)Wireshark基本介绍和学习TCP三次握手

    原地址https://www.cnblogs.com/TankXiao/archive/2012/10/10/2711777.html#filter 阅读目录 wireshark介绍 wireshar ...

  9. Spring data jpa命名规范

    JPA命名规范 (sample与JPQL等效) Table 4. Supported keywords inside method names Keyword Sample JPQL snippet ...

  10. 【洛谷P1100】高低位交换

    高低位交换 题目链接 这道题非常水,我是用位运算做的 a=n>>16 二进制的“高位”b=n-(a<<16) 二进制的“低位”ans=(b<<16)+a 转换 #i ...