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

[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. scss-@if指令

    @if指令接受表达式和使用嵌套样式,无论表达式的结果只不过是false或null. 语法: @if expression { //CSS codes are written here } scss实例 ...

  2. 我为什么不用Django而用Flask?

    前言 对于初学者来说,找到一个好的框架来学习或者项目开发都是非常有必要的,而当你有一定开发经验后,你应该选择适合当前业务需要的框架.我这里并不想探讨哪个框架好哪个不好,这个永恒的话题就跟探讨“世界上哪 ...

  3. Java JSONArray的封装与解析

    package com.kigang.test; import net.sf.json.JSONArray; import net.sf.json.JSONObject; import java.ut ...

  4. python ftp download with progressbar

    i am a new one to learn Python. Try to download by FTP. search basic code from baidu. no one tells h ...

  5. asyncio标准库2 Hello Clock

    如何调度协程,并发运行 asyncio.gather方法可以聚合协程or future def gather(*coros_or_futures, loop=None, return_exceptio ...

  6. Consul在linux系统, 群集实战

    Consul作为微服务的服务注册与发现组件,是非常重要的一部分 目前想用Consul作为配置管理的统一管理 准备两台机器 11.11.11.1011.11.11.20 下载consul linux版  ...

  7. ASP.NET中引用dll“找不到指定模块"的完美解决办法 z

    DllImport是System.Runtime.InteropServices命名空间下的一个属性类,其功能是提供从非托管DLL导出的函数的必要调用信息.DllImport属性应用于方法,要求最少要 ...

  8. thrift基本概念和实例

    一.thrift可以做什么 thrift是一个跨语言通信的工具,支持的语言多,而且还提供服务器端的众多网络模型,使服务端的开发可以只专于服务本身的逻辑. 二.thrift重要概念 1.processo ...

  9. c++利用互斥锁实现读写锁

    很简单就是在读的时候把写的锁锁住就好了 class readwrite_lock { public: readwrite_lock() : read_cnt(0) { } void readLock( ...

  10. HDU-3092 Least common multiple---数论+分组背包

    题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=3092 题目大意: 有一个数字n,现在要把它分解成几个数字相加!然后这几个数字有最小公倍数,题目目的是 ...