Author Topic: Aliases you use  (Read 19496 times)


  •      v-ger
  • Posts: 4237
    • View Profile
    • VSIDO Community
Re: Aliases you use
« Reply #15 on: August 13, 2014, 08:54:14 PM »
^ Great alias list greywolf, thanks for sharing it and Welcome to the Asylum!
VSIDO      VSIDO FB       

    I dev VSIDO


  • Posts: 401
    • View Profile
    • Star
Re: Aliases you use
« Reply #16 on: August 14, 2014, 12:22:41 AM »

I'm still working thru the list, but I've noted some I will steal!  ;)


  • Posts: 2
    • View Profile
Re: Aliases you use
« Reply #17 on: August 20, 2014, 09:18:23 AM »

I'm still working thru the list, but I've noted some I will steal!  ;)

Help yourself, I certainly did over time.  :D 

In my 1st decade or so in Unix/Linux circles there was no such thing as a GUI, so, anything that "sensibly" saves typing is ok with me.

Besides, this is Linux - we are all thieving hackers bent on world destruction didn't you know!  :)

It is about the Dragons - it was always about the Dragons!


  • Posts: 330
    • View Profile
Re: Aliases you use
« Reply #18 on: September 18, 2014, 03:45:45 PM »
The only thing I tend to do differently than what you have there Grey Wolf is I like to have my things like ff as functions rather than as aliases.  It's a minor difference but organizationally it helps me to keep them separate.

I also use cdargs as opposed to aliases for movement.  But those ../.../.... are pretty nice.  Might have to rethink that.


  • Posts: 86
  • the Earth has music for those who listen-Santayana
    • View Profile
Re: Aliases you use
« Reply #19 on: September 28, 2014, 03:02:25 PM »
Current aliases file, customized for zsh:

Code: [Select]
alias up='sudo apt-get update && sudo apt-get dist-upgrade'
alias get='sudo apt-get install'
#alias rem='sudo apt-get autoremove'
#alias cl='sudo apt-get autoclean'
alias prg='sudo apt-get purge'
alias dupgrd='sudo apt-get update && sudo apt-get dist-upgrade -d'
alias acs='apt-cache search'
alias se='apt-cache policy'
alias deps='apt-cache show' #with app will give you depends info etc.
alias upg='sudo update-grub'
alias grc='ps aux | grep'
#alias cd..='cd ..'
alias md=mkdir
alias sdn='sudo shutdown -h now'
alias sdr='sudo shutdown -r now'
alias ls='ls -F --color --group-directories-first'
alias l='ls -lha'
alias c='clear'
alias q='exit'
alias s='sudo'
alias reload='source ~/.zshrc'
alias al='cat ~/.zsh_aliases'
alias alr='ls -R'

alias gpoud='gpo update && gpo download'

alias hmr='mplayer'

### from greywolf on VSIDO forums
## Colorize the grep command output for ease of use (good for log files)##
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'

# install  colordiff package :)
alias diff='colordiff'

alias mount='mount |column -t'

## pass options to free ##
alias meminfo='free -m -l -t'
## get top process eating memory
alias psmem='ps auxf | sort -nr -k 4'
alias psmem10='ps auxf | sort -nr -k 4 | head -10'
## get top process eating cpu ##
alias pscpu='ps auxf | sort -nr -k 3'
alias pscpu10='ps auxf | sort -nr -k 3 | head -10'
## Get server cpu info ##
alias cpuinfo='lscpu'
## older system use /proc/cpuinfo ##
##alias cpuinfo='less /proc/cpuinfo' ##
## get GPU ram on desktop / laptop##
alias gpumeminfo='grep -i --color memory /var/log/Xorg.0.log'
# some more ls aliases
alias ls='ls --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F'
alias ll='ls -l --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F'
alias la='ls -la --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F'
alias lx='ls -lXB'        # sort by extension
alias lk='ls -lSr'        # sort by size
alias lr='ls -lR'        # recursice ls
alias lt='ls -ltr'        # sort by date
alias lm='ls -al |more'        # pipe through 'more'
alias tree='tree -Cs'        # nice alternative to 'ls'
alias l='ls -hF --color'    # quick listing
alias lsize='ls --sort=size -lhr' # list by size
alias lsd='ls -l | grep "^d"'   #list only directories

# copy with a progress bar.
alias cpv="rsync -poghb --backup-dir=/tmp/rsync -e /dev/null --progress --"

#Command substitution
alias ff='sudo find / -name $1'
alias df='df -h -x tmpfs -x usbfs'
alias psg='ps -ef | grep $1'
alias h='history | grep $1'
#alias rm='rm -i'
#alias cp='cp -i'
#alias mv='mv -i'
alias mkdir='mkdir -p -v'
alias which='type -all'
alias path='echo -e ${PATH//:/\\n}'
alias vi='vim'
alias du='du -h -c --max-depth=1'
alias c='clear'

#Personal Help
#alias dn='OPTIONS=$(\ls -F | grep /$); select s in $OPTIONS; do cd $PWD/$s; break;done'
#alias help='OPTIONS=$(\ls ~/.tips -F);select s in $OPTIONS; do less ~/.tips/$s; break;done'

#show most popular commands
alias top-commands='history | awk "{print $2}" | awk "BEGIN {FS="|"} {print $1}" |sort|uniq -c | sort -rn | head -10'

# empty trash
alias trash="rm -fr ~/.Trash"

## Moving around & all that jazz
alias -g back='cd "$OLDPWD"'
alias -g ..="cd .."
alias -g ...="cd ../.."
alias -g ....="cd ../../.."
alias -g .....="cd ../../../.."
alias -g ......="cd ../../../../.."

## Dir shortcuts (slightly diff from bash
hash -d home=~/
hash -d docs=~/Documents
hash -d dls=~/downloads
hash -d imgs=~/images
hash -d vids=~/videos
hash -d muz=~/music
#hash -d news=~/gPodder/Downloads/NBC Nightly News '(video')')

## App-specific

## Sudo fixes
alias orphand='sudo deborphan | xargs sudo apt-get -y remove --purge'
alias cleanup='sudo apt-get autoclean && sudo apt-get autoremove && sudo apt-get clean && sudo apt-get remove && orphand'
alias upddb='sudo updatedb'
alias swapclear='sudo swapoff -a && sleep 2s && sudo swapon -a'

#find sorted list of biggest files under current directory:
alias biggest='find -type f -printf '\''%s %p\n'\'' | sort -nr | head -n 40 | gawk "{ print \$1/1000000 \" \" \$2 \" \" \$3 \" \" \$4 \" \" \$5 \" \" \$6 \" \" \$7 \" \" \$8 \" \" \$9 }"'

### /from grewolf

### from digit on VSIDO forums

alias big='ls -laSh | head'
alias cdls='cd $1 && ls'
alias dit='emacsclient'
alias fehb='feh --bg-scale'
alias fehbc='feh --bg-center'
alias fehbf='feh --bg-fill'
alias fehbs='feh --bg-scale'
alias ls='ls --color=auto'
alias running='PS_FORMAT="user,pid,pcpu,pmem,start,args" ps axf'

### /from digit on VSIDO forums
#digit's flite aliases
alias fime='flite_time `date +%H:%M`'

### from me
alias weathIL='inxi -W60089'
alias weathSD='inxi -W92116'
alias weathAT='inxi -W30064'
alias weathHO='inxi -W70002'

## a few from
# List only directories and symbolic
# links that point to directories
alias lsd='ls -ld *(-/DN)'
# List only file beginning with "."
alias lsa='ls -ld .*'

## ## ## ## FUNCTIONS
### /from statmonkey @

# This is just a simple function to take notes.  You can just enter note (whatever you want)
# and it will append it to notes in home/documents but you can set it to go anywhere
note () {
    # if file doesn't exist, create it
    if [[ ! -f $HOME/documents/notes ]]; then
        touch $HOME/documents/notes

    if [[ $# -eq 0 ]]; then
        # no arguments, print file
        cat $HOME/documents/notes
    elif [[ "$1" == "-c" ]]; then
        # clear file
        echo "" > $HOME/documents/notes
    elif [[ "$1" == "-e" ]]; then
        nano $HOME/documents/notes
        # add all arguments to file
        echo "$@" >> $HOME/documents/notes


  • Posts: 2302
    • View Profile
    • PackRat configs on github
Re: Aliases you use
« Reply #20 on: January 19, 2017, 02:09:50 PM »
some aliases for checking systemd units -

Code: [Select]
alias listu='sudo systemctl list-unit-files|grep enabled'
alias statoff='sudo service --status-all | grep -w -'
alias staton='sudo service --status-all | grep +'
I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo