Giter Club home page Giter Club logo

bash_aliases's Introduction

#bash_aliases

bash 2-3 letter aliases to shortcut various commands, variously:

  • git commands
  • package commands for apt (Ubuntu/Debian), dnf (Fedora/CentOS) & pacman (ARCH)
  • octopress blogging
  • .mov to .gif conversion (using ffmpeg)
  • common DOS command equivalents
  • ssh encryption key creation and authorization (especially elliptical curve)
  • dns cache flush
  • command history
  • mysql/mariadb
    • ls
    • mkdir/rmdir
    • vi/vim
    • dpkg
    • btrfs
    • systemctl
    • journalctl
    • blkid
    • mount/umount

##Installation assuming the git clone directory tree has a conventional layout and looks like

~/git/
  └── bash_aliases/
      ├── bash_aliases
      ├── LICENSE
      └── README.md

Use the following commands:

ln -s ~/git/bash_aliases/bash_aliases ~/.bash_aliases 
source ~/.bash_aliases

#
# add bash_aliases login load for everyone
#
BR=bashrc							#run control file name
BA=bash_aliases 					#alias file name
EF=\$EF								#execution file
if [ -e /etc/bash.$BR ]				#?-ubuntu central rc?
then
	BR=/etc/bash.$BR				#y-save for later
else
	BR=/etc/$BR						#n-use fedora style
fi									#@end rc style check

grep "source" $BR  >/dev/null	 	#see if we are already there
if [ $? -eq 1 ]						#?-find us?
then								#n-add the logic
cat <<_EOF >>$BR					#append to /etc RC file
# do alias load for everyone
EF=~/.$BA 
if [ -e $EF ];
then
	source $EF
fi
_EOF
fi									#@-done adding bashrc logic

bash_aliases's People

Contributors

anomalyst avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.