Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: What's in your .bash_aliases file?

  1. #1
    Join Date
    Mar 2008
    Location
    Sparta NC
    Beans
    478
    Distro
    Ubuntu 10.04 Lucid Lynx

    What's in your .bash_aliases file?

    I am looking for some more neat tricks you can use with a .bash_aliases file.

    Here is my user .bash_aliases file. Post yours.

    ## tinwhistle box ~/.bash_aliases file for user
    # User specific aliases and functions

    # Streaming Radio Stations
    alias kdox='mplayer http://wms2.mainstreamnetwork.com/kdox-am &'
    alias wabc='mplayer http://69.28.128.148:80/stream/citadelcc_WABC-AM &'

    # Clear the terminal
    alias cls='clear'

    # Start X server
    alias x='startx'

    # Change bash prompt. See the article
    # http://www-106.ibm.com/developerwork.../l-tip-prompt/
    export PS1='\d \@ \[\e[32;1m\]\u\[\e[34;1m\]@\[\e[36;1m\]\H \[\e[34;1m\]\w\[\e[32;1m\] $ \[\e[0m\]'

    # Monitor logs
    # alias syslog='sudo tail -100f /var/log/syslog'
    # alias messages='sudo tail -100f /var/log/messages'

    # Keep 1000 lines in .bash_history (default is 500)
    export HISTSIZE=1000
    export HISTFILESIZE=1000

    #Stop bash from caching duplicate lines.
    HISTCONTROL=ignoredups

    # Disk free in human terms
    alias df='df -h'

    # List paths
    alias path='echo -e ${PATH//:/\\n}'

    # Upgrade/update system
    # alias upgrade='sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get autoremove'

    # Encode wav files to flac and delete the wav file
    alias zipwavd='flac -V --best --delete-input-file *.wav'

    # Encode wav files to flac and keep the wav file
    alias zipwav='flac -V --best *.wav'

    # Decode flac files to wav format
    alias uzipwav='flac -d -V *.flac'

    # Encode wav to ogg
    # alias oggem=oggenc -n *.wav -o *.ogg

    # Allow local users to use my X session
    # xhost +local:

    # I can't remember the new gnome command!
    alias gtop='/usr/bin/gnome-system-monitor'

    # Alter the ls command
    alias ll='ls --color --time-style="+%b %d %Y %H:%M"'
    alias ls='ls -ac'
    alias lls='ls -lac'
    alias la="ls --color -lAGbh --time-style='+%b %d %Y %H:%M'"

    # Set background in Fluxbox
    # alias bg='fbsetbg -a /home/phil/Pictures/kells/kelljesusarrest.gif'
    # alias bg='fbsetbg -a /home/phil/Pictures/kells/KellsFol114rArrestOfChrist.jpg'
    # alias bg='fbsetbg -a /home/phil/Pictures/kells/KellsFol007vMadonnaChild.jpg'
    # alias bg='fbsetbg -a /home/phil/Pictures/kells/4evangelists.jpg'

    # Become system administrator
    alias god='sudo -i'
    alias root='sudo -i'

    # Because less is more and more is less
    alias more='less'

    # xterm
    # alias xterm='xterm -bg black -fg green'

    # Launch links or w3m with my linux links page
    alias web='links2 -g /home/phil/bookmarks.html'
    alias wweb='w3mmee /home/phil/bookmarks.html'

    # For nano editor
    alias nano='nano -w'

    # Start gkrellm after stopping it in x
    alias gkrellm='gkrellm -w &'

    # Kill mplayer
    alias kmp='killall -9 mplayer & killall -9 gnome-mplayer'
    "Not a window in the house but somehow there's more light..."

    Linux Power Tools

  2. #2
    Join Date
    Apr 2008
    Beans
    221

    Re: What's in your .bash_aliases file?

    lt='ls -alt|more' ->newest files
    xx='exit'

  3. #3
    Join Date
    Jul 2008
    Location
    Birmingham, England
    Beans
    2,400

    Re: What's in your .bash_aliases file?

    Code:
    #Installation
    alias y='yaourt'
    alias up='y -Syu --aur'
    #
    #Network
    alias ping1='ping -c 4 www.google.com'
    alias ping2='ping -c 4 192.168.0.1'
    alias wget='wget -c'
    alias mac='ifconfig | grep HWaddr'
    #
    #Multimedia
    alias avidemux='/usr/bin/avidemux2_qt4 --video-codec xvid'
    alias handbrake1='handbrake -i /dev/sr1 -t 6 -e x264 -b 1024 -E ac3 -s 1 -o output.avi'
    alias flash='get_flash_videos'
    #
    #KDE Desktop
    alias plasmoid='kbuildsycoca4 --noincremental && clear'
    #alias shutdown='sudo shutdown -hP now'
    alias ls='ls --color=always'
    alias unmount='umount'
    alias crossover='/home/lee/cxoffice/bin/cxinstallwizard /usr/bin/crossover'
    #
    #Other
    alias 'make_me_a_sandwich'='echo "What? Make it yourself"'
    alias 'sudo_make_me_a_sandwich'='echo "ok"'
    #
    #System
    export GREP_COLOR="1;33"
    alias grep='grep --color=auto'
    #alias command=''history|awk '{print $2}'|awk 'BEGIN {FS="|"} {print $1}'|sort|uniq -c|sort -r''
    alias hddtemp='sudo hddtemp /dev/sda /dev/sdb /dev/sdc'
    #
    # Amarok SVN
    #export PATH=$HOME/kde/bin:$PATH
    export PATH=/usr/local/bin:$PATH

  4. #4
    Join Date
    Jun 2008
    Location
    UK
    Beans
    282
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: What's in your .bash_aliases file?

    Among other things, this vipath function. I don't use it much now, but it can be useful.

    Andrew

  5. #5
    Join Date
    Apr 2006
    Location
    Atlanta, USA
    Beans
    427

    Re: What's in your .bash_aliases file?

    The two most useful for me:

    Code:
    # perform 'ls' after 'cd' if successful.
    cdls() {
      builtin cd "$*"
      RESULT=$?
      if [ "$RESULT" -eq 0 ]; then
        ls
      fi
    }
    
    alias cd='cdls'
    
    # search for a string recursively in any C source files 
    alias src-grep='find . -name "*.[ch]" | xargs grep '
    Here we are, trapped in the amber of the moment. There is no why.

  6. #6
    Join Date
    Sep 2009
    Location
    Freiburg/Germany
    Beans
    1,112
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: What's in your .bash_aliases file?

    Code:
    alias apt-install='sudo apt-get install'
    alias apt-search='apt-cache search'
    alias apt-show='apt-cache show'
    alias apt-purge='sudo apt-get --purge  remove'
    alias apt-remove='sudo apt-get remove'
    alias apt-up="sudo apt-get update && sudo apt-get upgrade"
    alias apt-policy="LANG=C apt-cache policy"
    ClassicMenu Indicator - classic GNOME menu for Unity
    Unsettings - configuration program for the Unity
    Privacy Indicator - easily switch privacy settings in Unity
    Arronax - create and modify app starters

  7. #7
    Join Date
    Mar 2008
    Location
    Las Vegas
    Beans
    1,148

    Re: What's in your .bash_aliases file?

    Code:
    alias emacs='emacs22-gtk'
    alias emacsfs='emacs22-gtk -fs'
    alias gohome='cd ~; clear'
    alias h='head'
    alias ls='ls --color=auto'
    alias reload='source $HOME/.bashrc'
    alias showalias='cat $HOME/.bash_alias'
    alias shr='shred -u '
    alias t='tail'
    alias temps='acpi -t'
    Debian Stable
    FluxBox
    Mark Your Thread Solved

  8. #8
    Join Date
    Dec 2009
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: What's in your .bash_aliases file?

    alias h='history | grep '

  9. #9
    Join Date
    Jan 2008
    Beans
    1,532

    Re: What's in your .bash_aliases file?

    alias emacs='echo "emacs sucks " && sleep 2 && vim'


    Just in case I forget.

  10. #10
    Join Date
    Jun 2007
    Location
    Maryland, US
    Beans
    6,288
    Distro
    Kubuntu

    Re: What's in your .bash_aliases file?

    <oops... I misunderstood the thread; I thought it was about something meaningful.>
    Last edited by dwhitney67; January 8th, 2010 at 03:49 AM.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •