Your system aliases

What you use alias? :) It will be possible interestingly not only me :stud
I use:
Code:
alias mic       make install clean
alias mrc       make reinstall clean
alias mdc       make deinstall clean
alias pfu       portsnap fetch update
alias wtf       man
 
lMicROl said:
What you use alias? :) It will be possible interestingly not only me :stud
I use:
Code:
alias mic       make install clean
alias mrc       make reinstall clean
alias mdc       make deinstall clean
alias pfu       portsnap fetch update
alias wtf       man

Code:
alias pkg_radd 'pkg_add -r'
alias ping 'ping -c4'
alias cls 'clear'
alias FTP 'ftp -a'
alias del 'rm -r'
 
Code:
alias ls='ls -FG'
alias scilab='scilab -nw -nb'
alias bc='bc -l'
alias sudo='sudo -E'
alias vi="vim"
alias less="less -c"
alias mathomatic="mathomatic -b"
 
Code:
alias glg="git log"
alias gsh="git show"
alias gci="git commit -a"
alias gsv="git commit -a -m 'save'"
alias gco="git checkout"
alias gps="git push"
alias gpl="git pull"
alias gad="git add"
alias gst="git status"
alias gas="git stash"
alias gdf="git diff"
alias gbr="git branch"
alias gsup="git svn rebase"
alias gsci="git svn dcommit"

alias rs="screen -d -r"

alias yim="yi --as=vim"

alias pub="cd $REPOS_PATH/pub"
alias own="cd $REPOS_PATH/own"
 
Useful aliases (and prompt)

I thought I'd share some useful aliases from my ~/.cshrc... hopefully its useful for someone.

Code:
# unrelated but I also like my prompt to be user[currentdir]#
set prompt = "%n[%C05]# "


# go to given port directory, e.g. gotoport mplayer = cd /usr/ports/multimedia/mplayer
alias gotoport          'cd `whereis -sq \!*`'
# cat out the description file of the given port
alias portdescr             'cat `whereis -sq \!*`/pkg-descr'
# list outdated ports
alias oldports          pkg_version -IvL '='

Please feel free to post any others you may use
 
The usual aliases involving ls, and a few others that might be of interest.

But for most things I use (bash) functions instead.

Code:
alias la='ls -abFG'
alias lc='ls -bCG'
alias ll='ls -abhlG'
alias lr='ls -bRG'

alias e="vim"
alias y="/usr/local/bin/e"   # simple expression evaluator

alias cclive='cclive -f best -F "%t.%s"'

I like to use "e" to invoke the text editor, because that's what you use in vi(m) and most tools (e.g., misc/vifm) that have been influenced by vi.

Unfortunately, that creates a name clash with the nifty little expression evaluator math/e. So I also have an alias for it. I used y because it reminds me of y = f(x).
 
My three most useful aliases :p

Code:
alias mroe more
alias mkea make
alias mkae make

And a convenient shortcut for adding other frequent typo's
Code:
alias vc 'vi ~/.cshrc;source ~/.cshrc'
 
jalla said:
My three most useful aliases :p

Code:
alias mroe more
alias mkea make
alias mkae make

And a convenient shortcut for adding other frequent typo's
Works for (t)csh: [cmd=]set correct = command[/cmd] ;)
 
Code:
alias cdburn    "mkisofs -o cd.iso -r \!*;\
                 sudo burncd -f /dev/acd0 data cd.iso fixate; rm cd.iso"
alias devl      "sudo camcontrol devlist"
alias mcd       "sudo mount -r -t cd9660 /dev/acd0 /mnt; cd /mnt; ls"
alias mfl       "sudo mount_msdosfs -u sverreh /dev/da0 /a; cd /a; ls"
alias msk       "cd /usr/ports; make search key=\!* display=name,path,info\
                 keylim=1|less; cd -"
alias msn       "cd /usr/ports; make search name=\!* display=name,path,info\
                 keylim=1|less; cd -"
alias po        "popd -v \!*"
alias pu        "pushd -v \!*"
alias xpdf      "xpdf -g 1000x1000+140+0 -papercolor cornsilk -mattecolor steelblue\
                 -z 175 -level1 \!*"
alias xt        "xterm -sb -sl 9999 -cc 33:48,36-37:48,43:48,45-47:48,64:48\
                 -geometry 80x25+100+100 -cr red -bg \!:1 -fg \!:2 -fn 7x13&"
 
I posted a thread just like this the other day but it must have gotten deleted :(!

Code:
#.csh rc - default aliases snipped

alias  lm           'ls -F | more'
# cd to the directory 'port', usage: cdport 'port'
# make sure to use backquotes around whereis
alias  cdport       'cd `whereis -sq \!*`'
# cat out the pkg-descr file of given port  
# portdescr 'port'
alias  portdescr    'cat `whereis -sq \!*`/pkg-descr'
alias  portplist    'cat `whereis -sq \!*`/pkg-plist | more'
alias  oldports     pkg_version -IvL '='
 
ikbendeman said:
Code:
# cd to the directory 'port', usage: cdport 'port'
# make sure to use backquotes around whereis
alias  cdport       'cd `whereis -sq \!*`'

Nice! If you have the sourcecode for FreeBSD itself installed, cdport can take you there too.

Try it with anything from /usr/bin. :)
 
If whereis returns an empty string, the cdport alias takes you to your home directory -- which might be unexpected or not what you want.

So in bash I would use a shell function instead.

For csh, I'd have the alias invoke a script, like so:

Code:
alias src source $HOME/bin/cdsrc

A simple cdsrc script might look like this:

Code:
#!/bin/csh

set d = `whereis -sq $1`

if ( "X$d" == "X" ) then
	echo "No source directory found for $1"
else
	cd $d
endif
 
Code:
alias grep grep --color        #colored search 
alias helpcommand info         #place cursor over command and do alt-h
 
I use this to help me (a unix noob) to stay at 'home'

Code:
alias q         exit
alias cls       clear
alias sysoff    'shutdown -p now'
alias diskstat  'df -achT'
alias ver       'echo "`uname` `uname -r`"'
alias dir       'ls -ahlFGT'
alias del       rm
alias copy      cp
alias md        mkdir
alias rd        rmdir

if ( `whereis -bq mc` != "" ) then
   alias edit   'mc -e'
   alias view   'mc -v'
else
   alias edit   ee
   alias view   'less -M -Q -J -~'
endif
 
dear Beastie, perhaps there are many ways to do something, my background is Windows, I love FreeBSD like Windows, much more than linux, I like tcsh more than bash, but I cannot spend my life reading manuals and papers, so when I found a way to do something I call it with a confortable name and aliases it.

'cls' already exists in my mind so 'clear' become 'cls'. 'sysoff' was not previously in my mind, when I found how to turn freebsd off I call it 'sysoff' and aliased, problem solved.

In my very own opinion, many freebsd users (and forum people) are real experts about FreeBSD 1st and also other OSs, but 'not all people born teached', what is simple for you could be complicated fot others. :)
 
My favourite.
Code:
alias 'make love' 'Not war.'
I don't know who author, it's csh built-in from time immemorial.
 
Back
Top