You are not logged in.
Pages: 1
We have a thread for vim tricks, a thread for xdefaults, a thread for twmn and yet not one for the aliasses we use.
It should be interresting to see the aliases other #!ers use.
So here are mine:
#file compressing/decompressing
alias guntar="tar -xzvf"
alias untar="tar -xvf"
alias targ="tar -cvzf"
alias buntar="tar -jvxf"
#if i invoke emacs from the terminal, start it in terminal
alias emacs="emacs -nw"
#interpreter tricks
alias poly="rlwrap -pBlue poly"
alias clisp="rlwrap -pBlue poly"
#other stuff
alias vc="sudo vpnc"
alias l="ls -lha"
Last edited by gensym (2012-02-18 12:50:54)
'Multiple exclamation marks,' he went on, shaking his head, 'are a sure sign of a diseased mind.', {Eric}
Offline
I like this thread (and I'm going to steal some of your aliases). I just have a few lame ones right now (and there are probably easier ways to do some of this, so don't laugh!)
alias cd..='cd ..'
alias md=mkdir
alias sai='sudo apt-get install'
alias sar='sudo apt-get remove'
alias rbn='sudo reboot'
alias sdn='sudo shutdown -h now'
alias amx=alsamixer
alias sx=startx
Be eggsalad to each other.
Offline
alias up='sudo apt-get update && sudo apt-get dist-upgrade'
alias get='sudo apt-get install'
alias rem='sudo apt-get remove'
alias cl='sudo apt-get autoclean'
alias se='apt-cache policy'
alias upg='sudo update-grub'
alias grc='ps aux | grep'
alias re='source ~/.bashrc'
alias al='cat ~/.bash_aliases'
Mine are just as lame, but they work for me!!
I did borrow some from both of you
Offline
Forgot one
alias ls='ls -F --color --group-directories-first'
VastOne, I'm stealing your 're' and 'se' -- thanks.
Be eggsalad to each other.
Offline
I just made a change to mine
alias grc='ps aux | grep'
so if you
grc anything
It will find it
I am always using this for tint2 and conky to kill an instance when I am done editing
I changed it in the post above too
I borrowed 3 from yours: cd md and sdn
Offline
we do have a thread for your ~/.bashrc which also holds aliases.. but what the hell, who cares.
i got this in my ~/.bashrc
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.rhowaldt_bashrc ]; then
. ~/.rhowaldt_bashrc
fi
and this in ~/.rhowaldt_bashrc
# ----------------
# ~/.rhowaldt_bashrc
# personal bashrc aliasses etc file
# ----------------
# Make it shorter
alias inst="sudo apt-get install -y"
alias update="sudo apt-get update"
alias upgrade="sudo apt-get upgrade"
alias uninst="sudo apt-get purge"
alias brc="gedit ~/.bashrc &"
alias rbrc="gedit ~/.rhowaldt_bashrc &"
alias q="exit"
alias c="clear"
# some ls options, with directories first
alias ls="ls -F --color --group-directories-first"
alias ll="ls -AlhF --group-directories-first"
alias la="ls -A --group-directories-first"
alias lc="ls -CF --group-directories-first"
# search
alias where="which"
alias what="apropos"
alias apr="apropos"
alias ff="find . -type f -name"
# navigation
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../../"
alias ......="cd ../../../../.."
alias fonts="cd /usr/share/fonts"
alias scripts="cd $HOME/scripts"
# count the number of files in a folder
alias numfiles="echo $(ls -1 | wc -l)"
# Use human-readable filesizes
alias du="du -h"
alias df="df -h"
# I only use Telnet for Medieval
alias mval="telnet moo.medievalmoo.nl 1111"
# renoise + scripting tools
alias renoise="/usr/local/bin/renoise-2.7.1 --scripting-dev"
# Automatically do an ls after each cd
cd() {
if [ -n "$1" ]; then
builtin cd "$@" && ls --group-directories-first
else
builtin cd ~ && ls --group-directories-first
fi
}
# Set some colors (ripped from kestrel @ crunchbang forums)
BLACK='\e[0;30m'
WHITE='\e[1;37m'
LIGHTGRAY='\e[0;37m'
DARKGRAY='\e[1;30m'
RED='\e[0;31m'
GREEN='\e[0;32m'
BLUE='\e[0;34m'
YELLOW='\e[1;33m'
PURPLE='\e[0;35m'
BROWN='\e[0;33m'
CYAN='\e[0;36m'
LIGHTBLUE='\e[1;34m'
LIGHTGREEN='\e[1;32m'
LIGHTCYAN='\e[1;36m'
LIGHTRED='\e[1;31m'
LIGHTPURPLE='\e[1;35m'
NC='\e[0m' # No Color
HISTFILESIZE=100000000
HISTSIZE=100000
# to get 'bc' to default to 6 decimal places
# use a .bcrc file in your home-dir with 'scale=6'
export BC_ENV_ARGS=~/.bcrc
# for detect_syllables-script
alias ds="detect_syllables"
# some shortcuts
export STORAGE=/media/storage
export MP3=/media/storage/_mp3
export MUSIC=/media/storage/_music
export MOVIE=/media/storage/_movie
# stuff for which the terminal window title doesn't get updated automatically
alias irssi="urxvt -title 'irssi (urxvt)' -e irssi &"
alias rtorrent="urxvt -title 'rtorrent (urxvt)' -e rtorrent &"
# more
alias bm="sudo bashmount"
alias aura="wine $HOME/bin/aura_2/Aura2.exe &"
alias apache="sudo apache2ctl start"
alias convertx="wine /home/rhowaldt/.wine/drive_c/Program\ Files/convertxtodvd4/ConvertXtoDvd.exe &"
Offline
^ Perhaps it has more to do with that thread being quiet for 5 months, out of site and out of mind.
Anything that can teach is a good thing, and in your aliases is a mountain of knowledge.
Offline
^ the thread has been silent for some time, hasn't it? sad. it is a great thread. still a worthwhile link because there's lots of useful stuff to be found in there as well. i got a lot of my own aliases from that thread.
thanks for the kind words
Offline
I'm very new to this, but this is what I've done to mine so far.
##########################
#
# NTA ALIASES
#
##########################
#### SYSTEM ####
alias update='sudo apt-get update; ~/.bash_messages/update.sh'
alias upgrade='sudo apt-get upgrade; ~/.bash_messages/upgrade.sh'
alias ss='sudo apt-cache search'
alias get='sudo apt-get install'
alias remove='sudo apt-get remove'
alias clean='sudo apt-get autoclean -y;sudo apt-get autoremove -y;sudo apt-get clean -y; ~/.bash_messages/clean.sh'
alias sup='sudo ~/.sysupgrade.sh; ~/.bash_messages/sup.sh'
#### INTERFACE ####
alias se='setxkbmap se'
alias svorak='setxkbmap se dvorak'
#### INTERNET ####
alias twitter='twidge update'
alias message='twidge dmsend'
#### DIRECTORIES ####
alias ..='cd'
alias stream='.. /media/windows/Stream/; ll'
alias downloads='.. /media/windows/Downloads/Complete/; ll'
alias ls='ls -F --color --group-directories-first'
#### UNCATEGORIZED ####
alias reboot='sudo reboot'
alias black='xterm -geometry 120x40 -fg white -bg black && daemon'
#### NANO ####
alias edit='sudo nano'
alias editbash='edit ~/.bashrc'
#### TERMINAL ####
alias q='exit'
alias c='clear'
##########################
#
# End of Aliases
#
##########################
Offline
Easy reboot/poweroff/suspend/hibernate from the CL
alias reboot='dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart'
alias poweroff='dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop'
alias suspend='dbus-send --system --print-reply --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Suspend'
alias hibernate='dbus-send --system --print-reply --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Hibernate'
bootinfoscript - emacs primer - wireless problems- I ♥ #!
Offline
@xaos: yeah those are awesome. really need to add those to my own aliases.
@nta: out of curiosity: what are all those scripts being called with the update/upgrade etc commands?
Offline
Edit important files (requires vim):
# files
alias gtk='vim '"$HOME"'/.gtkrc.mine'
alias xinitrc='vim '"$HOME"'/.xinitrc'
alias sz='source "'"$HOME"'/.zshrc"'
alias va='vim '"$HOME"'/.zaliases ; source '"$HOME"'/.zaliases'
alias vz='vim '"$HOME"'/.zshrc ; source '"$HOME"'/.zshrc'
alias xdefs='vim '"$HOME"'/.Xdefaults ; xrdb -load '"$HOME"'/.Xdefaults'
alias xconf='su -c "vim /etc/X11/xorg.conf"'
Listing related stuff.
Most of these are from GRML's zshrc.
# Execute \kbd{ls -lSrah}
alias dir="ls -lSrah"
# Only show dot-directories
alias lad='ls -d .*(/)'
# Only show dot-files
alias lsa='ls -a .*(.)'
# Only files with setgid/setuid/sticky flag
alias lss='ls -l *(s,S,t)'
# Only show 1st ten symlinks
alias lsl='ls -l *(@)'
# Display only executables
alias lsx='ls -l *(*)'
# Display world-{readable,writable,executable} files
alias lsw='ls -ld *(R,W,X.^ND/)'
# Display the ten biggest files
alias lsbig="ls -flh *(.OL[1,10])"
# Only show directories
alias lsd='ls -d *(/)'
# Only show empty directories
alias lse='ls -d *(/^F)'
# Display the ten newest files
alias lsnew="ls -rl *(D.om[1,10])"
# Display the ten oldest files
alias lsold="ls -rtlh *(D.om[1,10])"
# Display the ten smallest files
alias lssmall="ls -Srl *(.oL[1,10])"
Permissions/chmod:
# chmod
# Execute \kbd{chmod 600}
alias rw-='chmod 600'
# Execute \kbd{chmod 700}
alias rwx='chmod 700'
# r-{}- Execute \kbd{chmod 644}
alias r--='chmod 644'
# Execute \kbd{chmod 755}
alias r-x='chmod 755'
Debian (apt/aptitude) related:
alias afs='apt-file search --regexp'
alias aps='aptitude search'
alias apsh='aptitude show'
alias apsrc='apt-get source'
alias apv='apt-cache policy'
alias apdg='su -c "aptitude update && aptitude safe-upgrade"'
alias apud='su -c "aptitude update"'
alias apug='su -c "aptitude safe-upgrade"'
alias update='su -c "aptitude update"'
alias upgrade='su -c "aptitude safe-upgrade"'
alias fupgrade='su -c "aptitude full-upgrade"'
alias di='su -c "dpkg -i ./*.deb"'
alias quikdeb='/usr/bin/time -p dpkg-buildpackage -rfakeroot -us -uc'
Colourful Mplayer Verbosity:
alias mplayer='mplayer -msgcolor -msgmodule -nolirc'
Last edited by gutterslob (2012-02-18 18:37:43)
Point & Squirt
Offline
@xaos: yeah those are awesome. really need to add those to my own aliases.
@nta: out of curiosity: what are all those scripts being called with the update/upgrade etc commands?
I was just messing around, trying to learn more about using different files and folders in bash-commandos so I just created some .sh "scripts".
echo "##############################################"
echo "##############################################"
echo "##############################################"
echo "########### #############"
echo "########### #############"
echo "########### #############"
echo "########### C L E A N I N G #############"
echo "########### #############"
echo "########### P R O C E S S #############"
echo "########### #############"
echo "########### D O N E #############"
echo "########### #############"
echo "########### #############"
echo "########### #############"
echo "##############################################"
echo "##############################################"
echo "##############################################"
echo "##############################################"
echo "##############################################"
echo "##############################################"
echo "########### #############"
echo "########### #############"
echo "########### #############"
echo "########### S Y S T E M #############"
echo "########### #############"
echo "########### U P D A T E #############"
echo "########### #############"
echo "########### D O N E #############"
echo "########### #############"
echo "########### #############"
echo "########### #############"
echo "##############################################"
echo "##############################################"
echo "##############################################"
As you see, nothing to serious. Quite annoying to tell you the truth But it's all for the sake of learning :]
Offline
^ hahaha those made me laugh!
in love, war and learning, everything is permitted
Offline
I love my functions and aliases!
# some more ls aliases
alias ls='ls --color=auto'
alias lx='ls -lXB' # sort by extension
alias lk='ls -lSr' # sort by size
alias la='ls -Al' # show hidden files
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 ll='ls -l' # long listing
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
#Command substiution
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 reload='source ~/.bashrc'
alias dupgrd='sudo apt-get update && sudo apt-get dist-upgrade -d'
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'
# search for a package
alias search="apt-cache search"
# empty trash
alias trash="rm -fr ~/.Trash"
## Moving around & all that jazz
alias back='cd "$OLDPWD"'
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias ......="cd ../../../../.."
## Dir shortcuts
alias home='cd ~/'
alias documents='cd ~/documents'
alias downloads='cd ~/downloads'
alias images='cd ~/images'
alias videos='cd ~/videos'
## App-specific
alias wget='wget -c'
alias scrot='scrot -cd 5'
## Sudo fixes
alias install='sudo apt-get install'
alias policy='apt-cache policy'
alias remove='sudo apt-get remove'
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 updatedb='sudo updatedb'
alias htop='sudo htop'
## Personal things :D
alias weather='ctw USPA1470'
alias zork='frotz ~/downloads/textadventures/zork1/DATA/ZORK1.DAT'
alias hhgttg='frotz ~/downloads/textadventures/hhgttg/hhgg.z3'
alias dorf='~/downloads/df_linux/df &'
alias dorft='~/src/dwarftherapist/bin/release/DwarfTherapist &'
alias mountc='sudo mount -o credentials=/home/robert/smbcred'
alias sprungeit='curl -F "sprunge=<-" http://sprunge.us | xsel -b'
and these:
### FUNCTIONS
# Calculator
calc(){ awk "BEGIN{ print $* }" ;}
# Easy extract
extract () {
if [ -f "$1" ] ; then
case "$1" in
*.tar.bz2) tar xvjf "$1" ;;
*.tar.gz) tar xvzf "$1" ;;
*.bz2) bunzip2 "$1" ;;
*.rar) rar x "$1" ;;
*.gz) gunzip "$1" ;;
*.tar) tar xvf "$1" ;;
*.tbz2) tar xvjf "$1" ;;
*.tgz) tar xvzf "$1" ;;
*.zip) unzip "$1" ;;
*.Z) uncompress "$1" ;;
*.7z) 7z x "$1" ;;
*.cbr) rar x "$1" ;;
*.cbz) unzip "$1" ;;
*) echo "don't know how to extract '$1'..." ;;
esac
else
echo "'$1' is not a valid file!"
fi
}
# Makes directory then moves into it
function mkcdr {
mkdir -p -v $1
cd $1
}
# Creates an archive from given directory
mktar() { tar cvf "${1%%/}.tar" "${1%%/}/"; }
mktgz() { tar cvzf "${1%%/}.tar.gz" "${1%%/}/"; }
mktbz() { tar cvjf "${1%%/}.tar.bz2" "${1%%/}/"; }
# Does some stuff like magic :/
tree_contains(){
# return true (0) as soon as we find a "*.foo" file
find "$1" -type f -name "*.flac" -print0 |
read -r -d $'\0' file && return 0
return 1
}
#Screensaver like thing, should be cool
cascade_colors()
{
_I=1
_J=0
_K=0
_WIDTH=$COLUMNS
_MARGIN=0
while true; do
_A=$(($RANDOM % 3))
_B=$(($RANDOM % 2))
_C=$(($RANDOM % 3))
case $_A in
0)
case $_B in
0)
[ $_I -gt 1 ] && _I=$(($_I - 1))
;;
1)
[ $_I -lt 6 ] && _I=$(($_I + 1))
;;
esac
;;
1)
case $_B in
0)
[ $_J -gt 0 ] && _J=$(($_J - 1))
;;
1)
[ $_J -lt 5 ] && _J=$(($_J + 1))
;;
esac
;;
2)
case $_B in
0)
[ $_K -gt 0 ] && _K=$(($_K - 1))
;;
1)
[ $_K -lt 5 ] && _K=$(($_K + 1))
;;
esac
;;
esac
case $1 in
1)
_DELTA=$2
case $_C in
0)
[ $_WIDTH -lt $(($COLUMNS - 2*$_DELTA)) ] && _WIDTH=$(($_WIDTH + 2*$_DELTA))
;;
1)
[ $_WIDTH -gt $((1 + 2*$_DELTA)) ] && _WIDTH=$(($_WIDTH - 2*$_DELTA))
;;
esac
_MARGIN=$((($COLUMNS-$_WIDTH)/2))
;;
2)
_WIDTH=$2
_DELTA=$3
case $_C in
0)
[ $_MARGIN -le $(($COLUMNS - $_WIDTH - $_DELTA)) ] && _MARGIN=$(($_MARGIN + $_DELTA))
;;
1)
[ $_MARGIN -ge $_DELTA ] && _MARGIN=$(($_MARGIN - $_DELTA))
;;
esac
;;
*)
_WIDTH=$COLUMNS
_MARGIN=0
;;
esac
_NUMBER=$((15 + $_I + 6*$_J + 36*$_K))
echo -en "\e[0;49m"
if [ $_MARGIN -gt 0 ]; then
for _FOO in $(seq $_MARGIN); do
echo -en " "
done
fi
printf "\e[0;48;5;${_NUMBER}m"
for _FOO in $(seq $_WIDTH); do
echo -en " "
done
echo -e "\e[0;49m"
done
}
calc is cool, and cascade_colors. There are a few options for cascade_colors, but I don't want to get a scrot right now.
Offline
I seem to use aliases less and less - things done all the time get tied to ADeskBar launcher buttons and lesser stuff goes in openbox menus, but these aliases and functions still get some use:
alias aptiget='sudo aptitude update && sudo aptitude -D -R -P -Z install '
alias aptipurge='sudo aptitude -DPZ purge '
# search command-fu:
cmdfu(){ wget -qO - "http://www.commandlinefu.com/commands/matching/$@/$(echo -n "$@" | openssl base64)/plaintext"; }
# grep results in whole paragraphs, with search term in colour ( from command-fu )
grepp() { [ $# -eq 1 ] && perl -00ne 'if ( /'"$1"'/i ){$s = $_;$s =~ s/'"$1"'/\033[1;31m$&\033[0m/g; print $s}' || perl -00ne 'if ( /'"$1"'/i ){$s = $_;$s =~ s/'"$1"'/\033[1;31m$&\033[0m/g; print $s}' < "$2";}
newest () { # newest file of arguments, eg 'newest *'
[[ $1 ]] || return 1
local i
candidate="$1";
for i in "$@";
do
[[ -f $i ]] || continue
[[ $i -nt $candidate ]] && candidate="$i"
done
echo "$candidate"
}
oldest () {
[[ $1 ]] || return 1
local i
candidate="$1"
for i in "$@"
do
[[ -f $i ]] || continue
[[ $i -ot $candidate ]] && candidate="$i"
done
echo "$candidate"
}
John
--------------------
( a boring Japan blog , Japan Links, idle twitterings and GitStuff )
#! forum moderator BunsenLabs
Offline
Not much more than the default.
alias ls='ls --color=auto'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias minecraft='java -jar /home/parker/minecraft.jar'
alias glcc='glc-capture -l /dev/stdout -v 3 -i -j -o game.glc -b back '
alias glce='glc-play game.glc -a 1 -o audio.wav && glc-play game.glc -y 1 -o - | mencoder -demuxer y4m - -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=9000 -audiofile audio.wav -oac mp3lame -o video.avi && rm -rf game.glc && youtube-upload --email=parker.l.reed@gmail.com --password=hahanotthatdumb --title="More testing" --description="Testing" --category=Games --keywords="testing" video.avi && rm -rf audio.wav video.avi'
alias syn='sudo synaptic'
alias sagi='sudo apt-get install '
alias fix='xmodmap -e "keycode 94 = backslash bar"'
Offline
Maybe interesting for some: get RSS weather and/or news, requires curl
~/rss.sh
uri=$1 #URI of RSS Feed
lines=$2 #Number of headlines
titlenum=$3 #Number of extra titles
curl -s --connect-timeout 30 $uri |\
sed -e 's/<\/title>/\n/g' |\
grep -o '<title>.*' |\
sed -e 's/<title>//' |\
head -n $(($lines + $titlenum)) |\
tail -n $(($lines))
alias for weather (serving as example, modify to your needs, keep the 1 1)
alias weather='sh ~/rss.sh http://www.rssweather.com/wx/ie/dublin/rss.php 1 1 && sh ~/rss.sh http://www.rssweather.com/wx/de/stuttgart-echterdingen/rss.php 1 1 && sh ~/rss.sh http://www.rssweather.com/wx/cn/guilin/rss.php 1 1'
for news, change the URL and the two numbers (starting entry/number of entries)
others:
alias sources='sudo nano /etc/apt/sources.list.d/debian.list'
alias xp='xprop | grep "WM_WINDOW_ROLE\|WM_CLASS" && echo "WM_CLASS(STRING) = \"NAME\", \"CLASS\""'
Sweaty lads picking up the soap | I love the new "Ignore user" button
Offline
I use Terminator as my background, so I use nano for almost all text editing. There's probably a config file for irssi that makes that one useless, but I haven't gotten around to it yet.
alias iirc='irssi --connect chat.freenode.net'
alias c='cd; clear'
alias nn='nano ~/notes' #Open a notepad file, my Terminator version of KDE's desktop sticky notes
alias term='terminator_desktop --profile Desktop -b --geometry 1680x1018+0+32 &
exit'
alias lh='ls -lh'
alias armory='python /usr/share/armory/ArmoryQt.py' # the Armory Bitcoin client, very nice, tho heavy!
Offline
alias play='mplayer -fs -msgcolor -msgmodule'
alias playa='mplayer -aspect 16:10 -fs -msgcolor -msgmodule'
alias playl='mplayer -msgcolor -msgmodule -playlist'
alias pl='apt-cache policy'
alias fl='sudo update-flashplugin-nonfree --install'
alias nc='ncmpcpp'
alias tv='~/.tv'
alias ps='apt-cache search'
alias sf='screenfetch'
alias rts='mplayer -fs -msgcolor -msgmodule -aspect 16:10 -nomouseinput mmsh://rts.videostreaming.rs/rts'
alias ncm='cd ~/.ncmpcpp'
Offline
my favourite is 'monarch' which automatically mounts my linode server. It takes a 3 line command (with multiple arguments) and makes it so simple.
Another favourite is for the different compilers and make command. I won't post mine because its very specific to what your compiling. But extremely useful.
just call me...
~FSM~
Offline
# ALIASES
alias reload='source ~/.bashrc'
alias bash='cd /usr/local/bin && ls'
alias fox='bin/firefox/firefox/firefox&'
alias fm='thunar&'
alias wire='watch -n 1 cat /proc/net/wireless'
alias tasks='~/bin/myTasks.py'
# FUNCTIONS
# clock
clock ()
{
while true;do clear;echo "===========";date +"%r";echo "===========";sleep 1;done
}
# network info
netinfo ()
{
/sbin/ifconfig | awk /'inet addr/ {print $2}'
/sbin/ifconfig | awk /'Bcast/ {print $3}'
/sbin/ifconfig | awk /'inet addr/ {print $4}'
/sbin/ifconfig | awk /'HWaddr/ {print $4,$5}'
}
## Function extract, extract everything with one command
extract () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjfv $1 ;;
*.tar.gz) tar xzfv $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) rar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xfv $1 ;;
*.tbz2) tar xjfv $1 ;;
*.tgz) tar xzfv $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*) echo "'$1' cannot be extracted via extract()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
up() { [ $(( $1 + 0 )) -gt 0 ] && cd $(eval "printf '../'%.0s {1..$1}"); }
Offline
.bash_aliases
alias easyfind='find . | grep -i -s -e '
alias dict='sdcv'
so far.
whats interesting is that you can also put functions in there, like;
function pushtokrava() { scp "$@" user@server.org:/home/user/incoming ;}
this will be used on client as for example:
pushtokrava file1.txt file2.jpg file3.mp4
Last edited by brontosaurusrex (2012-08-08 18:16:21)
Offline
Pages: 1
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat