[Bash] Create Aliases in .bash_profile for Common Bash Commands
.bash_profile is a file that bash invokes (or more technically sources) before the start of a new bash session. In .bash_profile, we have the opportunity to add variables, functions, and aliases to customize our bash environment and provide reusable functionality.
In this lesson, we’ll look at adding a git_sync alias as well as a ll alias. Aliases act like shortcuts and save us time and typing at the terminal. .bash_profile is a good spot for smaller functions and aliases.
Note that on most linux distributions you'll use .bashrc instead of .bash_profile.
1. cd ~
2. touch .bash_profile
3. Add alias
alias ll="ls -laG"
alias git_sync="git pull -r && git push"
4. To check what the alias does:
type ll
[Bash] Create Aliases in .bash_profile for Common Bash Commands的更多相关文章
- Bash脚本编程之脚本基础和bash配置文件
脚本基础 参考资料:Shell Scripts (Bash Reference Manual) 不严谨地说,编程语言根据代码运行的方式,可以分为两种方式: 编译运行:需要先将人类可识别的代码文件编译成 ...
- Common administrative commands in Red Hat Enterprise Linux 5, 6, and 7
https://access.redhat.com/articles/1189123 Common administrative commands in Red Hat Enterprise Linu ...
- [Bash] Create nested folder in Bash
We can create a single folder by doing: mkdir onefolder If we want to create nested folder we need t ...
- bash參考手冊之六(Bash特性)
6 Bash 特性 这部分描写叙述Bash独有的特性. * 调用Bash : Bash能够接受的命令行选项. * Bash启动文件 : Bash何时及怎样运行脚本. * 交互Shell : 什么 ...
- bash帮助文档简单学习;bash手册翻译
关于bash的四种工作方式的不同,可以参考:http://feihu.me/blog/2014/env-problem-when-ssh-executing-command-on-remote/,但是 ...
- windows的cmd下的find命令比bash(win10下的Ubuntu的bash)下的grep比较
同样的一个catalina文件,windows的cmd下的find命令比bash下的grep要慢,windows确实占下风啊
- [Shell]Bash基本功能:历史命令 & 别名 & Bash快捷键
/*----------------------------------------------------------------------------------------------- @黑 ...
- [Cypress] Create Aliases for DOM Elements in Cypress Tests
We’ll often need to access the same DOM elements multiple times in one test. Your first instinct mig ...
- The common Linux Commands
Linux的命令总结 1. man:在线请求系统帮助 例:man mkdir NAME:这个命令的完整全名 mk(make directories) SYNOPSIS:这个命令的基本语法 mkdir ...
随机推荐
- mysqlslap 一个MySQL数据库压力测试工具
在Xen/KVM虚拟化中,一般来说CPU.内存.网络I/O的虚拟化效率都非常高了,而磁盘I/O虚拟化效率较低,从而磁盘可能会是瓶颈.一般来说,数据库对磁盘I/O要求比较高的应用,可以衡量一下在客户机中 ...
- spring---aop(8)---Spring AOP中optimize
写在前面 optimize是ProxyConfig的属性.意思为 是否对生产代理策略使用优化. public class ProxyConfig implements Serializable { p ...
- 多线程调试必杀技 - GDB的non-stop模式
作者:破砂锅 (转) 开源的GDB被广泛使用在Linux.OSX.Unix和各种嵌入式系统(例如手机),这次它又带给我们一个惊喜. 多线程调试之痛 调试器(如VS2008和老版GDB)往往只支持a ...
- .Net高级技术——垃圾收集器
垃圾收集器概述 大排档和学校食堂.一个是别人帮你收拾盘子,一个是自己收拾盘子. 垃圾收集GC(Garbage Collection).内存的分配.回收不需要程序员操心,程序员只要需要的时候new就可以 ...
- Python中函数的参数传递与可变长参数
转自旭东的博客原文 Python中函数的参数传递与可变长参数 Python中传递参数有以下几种类型: (1)像C++一样的默认缺省函数 (2)根据参数名传参数 (3)可变长度参数 示例如下: (1)默 ...
- xcode找不到真机设备 - 转
先确认证书是否正确 再确认Bundle Indentifier 是否与证书匹配 再确认Deployment Target 为:sdk从6.0改为4.3 如果xcode还无法识别iphone, Xcod ...
- extjs 事件监听 三种方式
xtype : 'textarea', name : 'dataSetField', labelSeparator:'', fieldLabel:'', hideLabel: true, allowB ...
- UML九种图 之 用例图和类图
前言 近期写UML文档,看视频的时候感觉掌握的还能够,当真正写文档的时候才发现不是一件easy的事.写文档自己又翻开自己的笔记看了一遍又一遍. 以下就给大家介绍一下我画的几张图: 用例图 ...
- jstl 处理字符串函数 substring spli等
在jstl中的fn标签也是我们在网页设计中经常要用到的很关键的标签,在使用的时候要先加上头 <%@ taglib uri="http://java.sun.com/jsp/jstl/f ...
- 很酷的C语言技巧
C语言常常让人觉得它所能表达的东西非常有限.它不具有类似第一级函数和模式匹配这样的高级功能.但是C非常简单,并且仍然有一些非常有用的语法技巧和功能,只是没有多少人知道罢了. 指定的初始化 很多人都知道 ...