How to define alias in Linux
来源:互联网 发布:w3school node 编辑:程序博客网 时间:2024/06/05 19:39
1. view ~/.bashrc
It looks like below:
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
alias commandA='bash ./test.sh'
2.cd ~
touch test.sh
chmod 777 test.sh
3.run ~/.bashrc
[e_dingl@test3tcapprh01 ~]$ . ~/.bashrc
It looks like below:
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
alias commandA='bash ./test.sh'
2.cd ~
touch test.sh
chmod 777 test.sh
3.run ~/.bashrc
[e_dingl@test3tcapprh01 ~]$ . ~/.bashrc
4.in command line, type "commandA" and enter
==============
Other Sample :
# User specific aliases and functions
#Counts for incoming and processed
alias reads='echo -n "Incoming: "; find /home/pipe/Incoming/MultiDrive/MeterReads/ -type f | grep -v "Event" | wc -l; echo -n "Processed: "; find /home/pipe/Processed/MultiDrive/MeterReads/ -type f | grep -v "Event" | wc -l; date'
0 0
- How to define alias in Linux
- linux, how to define a new array in bash
- How to define an array in c#.
- Emacs: How to Define Templates in YASnippet
- How to define hash tables in bash?
- How to screenshot in Linux
- How to Daemonize in Linux
- How to Daemonize in Linux
- How to define a custom separator in TLex
- How to define multiple controllers for one view in angularJS?
- How to install Mysql in linux server
- how to disable ipv6 in linux
- How to setup tomcat in linux?
- How to Backup Your System in linux
- How to write a script in Linux
- How to use svn in Linux
- How to use git in Linux
- How to install JDK in Linux
- LeetCode (Remove Nth Node From End of List)
- 关于C/C++数据结构中结构体的定义
- bzoj 1211: [HNOI2004]树的计数 (prufer序列+组合数学)
- RTSP 协议
- EasyDarwin开源流媒体云平台之EasyRMS录播服务器功能设计
- How to define alias in Linux
- eclipse正则表达式搜索
- MySQL原子性数据
- shell脚本中echo显示内容带颜色的实现方法
- Badboy安装教程(含下载地址)
- 微信小程序教程(一)
- Xilnx FPGA配置时的比特交换处理
- mysql binlog系列(一)----binlog介绍、日志格式、数据查看等
- httpclient 上传及返回参数类型,解析json 或xml