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

[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学习一阶段总结

    写笔记需要打开eclipse写 哈哈哈哈,不然写什么都屡不清了 ……还需要打开API说明文档. JFrame 窗体组件. JFrame里面常用的函数: setSize 设置窗体大小 setDefaul ...

  2. java线程安全问题原理性分析

    1.什么是线程安全问题? 从某个线程开始访问到访问结束的整个过程,如果有一个访问对象被其他线程修改,那么对于当前线程而言就发生了线程安全问题:如果在整个访问过程中,无一对象被其他线程修改,就是线程安全 ...

  3. Java—IO流 RandomAccessFile类

    RandomAccessFile java提供的对文件内容的访问,既可以读文件,也可以写文件. 支持随机访问文件,可以访问文件的任意位置. java文件模型,在硬盘上的文件是byte byte byt ...

  4. 转:一个优秀windows C++程序员的知识体系

    转自:http://www.cppblog.com/weiym/archive/2012/06/10/178287.html.根据自身的经历,觉得作者总结的很好. 思考一个优秀windows C++ ...

  5. 一个简单的 HTML 文档,带有最基本的必需的元素

    <html> <head> <title>文档的标题</title> </head> <body> 文档的内容... ... & ...

  6. asyncio标准库5 TCP echo client and server

    server import asyncio async def handle_echo(reader, writer): data = await reader.read(100) message = ...

  7. String, StringBuffer and StringBuilder

    一 String 概述: String 被声明为 final,因此它不可被继承. 在 Java 8 中,String 内部使用 char 数组存储数据. public final class Stri ...

  8. Extjs 自动列宽

    //auto column width Ext.grid.Panel.prototype.viewConfig = { listeners: { refresh: function (dataview ...

  9. web端 调试 手机混合应用中的h5部分(chrome浏览器的devtool使用)

    Learning Hybird App Test–Appium Java(Leyden) 浏览器的远程调试工具,使得我们可以通过PC上开启的控制台,调试手机浏览器中正在运行的代码.运行于 Androi ...

  10. Apache常见问题

    Apache如何修改端口? 找到Apache安装目录,conf目录下的httpd.conf文件,用编辑器打开. 找到“Listen 80”,修改为我们想要的端口号就可以了,如“Listen 8080” ...