alias with switches

Ralf Mardorf silver.bullet at zoho.com
Mon Mar 14 15:04:19 UTC 2016


On Mon, 14 Mar 2016 14:45:37 +0000 (UTC), thufir wrote:
>alias fjdk = 'ls -alh`
>
>
>just to pick something simple.  That doesn't work when I put it 
>in .bash_aliases and try "source .bashrc", it just chokes.  What's the 
>correct way?

I'm using something similar, based on my Arch aliases for Ubuntu too:

[rocketmouse at archlinux ~]$ a
# Commands
alias a='echo "# Commands"; c; echo "# Files"; f'
alias c='grep alias ~/.bashrc | grep -v "#\""'
alias f='grep alias ~/.bashrc | grep "#\""'
alias cda='cd /var/cache/aur/ && ls -hAl'
alias cdwin='cd /mnt/winos/winOS/ && ls -hAl'
alias cpuo='echo ondemand | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor >/dev/null && cpus'
alias cpup='echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor >/dev/null && cpus'
alias cpus='cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor'
alias deus_of_keys='printf "°~ \"@ §# &^ /& (* )( =) ?_ ß- ´=\nzy ü[ Ü{ +] *}\nö; Ö: Ä\" #\\ \nyz ;< :> -/ _?\n"'
alias dsize='df -h|head -n1; df -h|grep v/|grep -v tmpfs; du -sh /dev/null'
alias drecksconf='echo " $(id -un)@$(hostname): \"dconf > /dev/nirvana\""; sudo rm /run/user/1???/dconf/user'
alias gkey='gpg --keyserver hkp://pgp.uni-mainz.de --recv-keys'
alias hgg='hg . --'
alias ls='ls --color=auto'
alias lsdconf='printf "[su] Root-"; su -c "ls -hAl /run/user/*/dconf/user"'
alias lsDesk='ls -hAl ~/Desktop/'
alias lsmnt='ls -hAl /mnt/ /media/'
alias lsVirt='ls -hAl ~/Virt*/winOS/*.vdi ~/Virt*/winOS/Snap*'
alias lsvm='ls -hAl /mnt/winos7/vmw7/*.qcow /mnt/winos7/vmw7/Snap*'
alias melb='meld /root/.bashrc /home/rocketmouse/.bashrc'
alias naourt='echo "Not AnOther User Repository Tool";rm -rf /{.,}tmp/yaourt-tmp-$(id -un);yaourt --tmp /.tmp'
alias of='lsof|head -n1;lsof|grep'
alias bluma='pluma ~/.bashrc ~/.bash_history'
alias sluma='sudo pluma'
alias u1w='llmount -w u1.precise;llmount -w archvm;llmount -w u1.1music;llmount -w u1.2music;\
alias u1r='llmount -r u1.precise;llmount -r archvm;llmount -r u1.1music;llmount -r u1.2music;\
alias u1u='llmount -u u1.precise;llmount -u archvm;llmount -u u1.1music;llmount -u u1.2music;\
# Files
alias fstab='sudo pluma /etc/fstab' #"
alias grub.cfg='llmount -w debi386 && sudo pluma /mnt/debi386/boot/grub/grub.cfg && llmount -u debi386' #"
alias pacman.conf='sudo pluma /etc/pacman.conf' #"

Hth ;),
Ralf




More information about the ubuntu-users mailing list