[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 ...
随机推荐
- 【BZOJ 2986】 莫比乌斯函数+容斥原理
2986: Non-Squarefree Numbers Time Limit: 10 Sec Memory Limit: 128 MBSubmit: 337 Solved: 156 Descri ...
- 【贪心】Google Code Jam Round 1A 2018 Waffle Choppers
题意:给你一个矩阵,有些点是黑的,让你横切h刀,纵切v刀,问你是否能让切出的所有子矩阵的黑点数量相等. 设黑点总数为sum,sum必须能整除(h+1),进而sum/(h+1)必须能整除(v+1). 先 ...
- HTTP 499 状态码 nginx下 499错误[转]
日志记录中HTTP状态码出现499错误有多种情况,我遇到的一种情况是nginx反代到一个永远打不开的后端,就这样了,日志状态记录是499.发送字节数是0. 老是有用户反映网站系统时好时坏,因为线上的产 ...
- 20162327WJH实验五——数据结构综合应用
20162327WJH实验五--数据结构综合应用 实 验 报 告 课程:程序设计与数据结构 班级: 1623 姓名: 王旌含 学号:20162327 成绩: 指导教师:娄嘉鹏 王志强 实验密级: 非密 ...
- PUSH MESSAGE 云控等交互类测试业务的自动化
针对的业务: 1. PUSH消息,即由云端服务向客户端推送消息 2. MESSAG消息,即用户间消息.用户群消息和聊天室消息 上干货,框架见下图:
- CentOS 7 下编译安装lnmp之nginx篇详解
一.安装环境 宿主机=> win7,虚拟机 centos => 系统版本:CentOS Linux release 7.5.1804 (Core),ip地址 192.168.1.168 ...
- Reverse Engineering the NC ECU (revisited) -- SH7508
http://forum.miata.net/vb/showthread.php?t=536601 Hey all! About 5 years ago, there was a great thre ...
- PLSQL Developer 配置Oralce11g连接 转
PLSQL Developer因为没有对应的64位程序,所以用该程序连接Oracle时只能对应x86的Oracle客户端.本示例为Oracle11g,去官网下载instantclient_11_2的x ...
- 浅析OpenGL光照
浅析OpenGL光照 之前从来都没有涉及光照的内容,心想只要能通过常规的方法渲染出几何体甚至是模型就可以了,然而没有光照的日子注定是苦涩的,因为仅凭几何体和模型的颜色无法达到真是渲染的效果,在实际中有 ...
- OPC and .NET
Note: recent OPC standards, including Unified Architecture (UA) and Express Interface (Xi) were desi ...