############################################################################## ## ## .tcshrc.alias 01Apr2003, Simos Xenitellis (simos74@gmx.net) ## ## This is the .tcshrc.alias file, part of the TCSHRC project ## at http://tcshrc.sourceforge.net ## Standard aliases - security # "-i" asks for confirmation when deleting. This is good. # In the "dangerous" section there are aliases for non-confirmation. ## Standard aliases - CPM/MSDOS heritage alias del 'rm -i' alias cls 'clear' # "-p" lets you create a path structure with one command, ex. mkdir -p /a/b/c alias md 'mkdir -p' alias rd 'rmdir' ## Standard aliases - convenience # Color syntax alias ls 'ls -GF' # Typicaly "more" does not allow you to use the arrow keys/etc for navigation. # Thus, we try to use "less", if it exists. Some distros do not put the # fileutils package and it is annoying if the alias exists without the app. if ( -e `where less` ) then alias more 'less' endif # To be used as in "cp /etc/inetd.conf /etc/inetd.conf.`today`" alias today "date '+%d%h%y'" # As in "Message Less", use it on a free terminal to see the logs as they come. alias mess 'clear ; tail -f /var/log/messages' # The following was removed because standard installations of Linux do not # install "vi-enhanced" by default. This lead to the situtation that # "vi" was not working even though it was there... # Plain "vi" does not support syntax highlighting and other tricks. # We check if vim is installed, then set. Sorry non-vim users. if ( -e `where vim`) then alias vi 'vim' endif # Pressing "x" and enter exits. alias x 'exit' # Quite handy, type "ff test.c" to find "test.c". # Keep in mind that there is also "locate test.c" which is faster. alias ff 'find . -name $*' # Alias for "." and ".." # Shows current directory alias . 'pwd' # Goes back one directory alias .. 'cd ..' alias ../ 'cd ../' # Goes back two directories alias ... 'cd ../..' alias .../ 'cd ../../' # Goes to previous directory alias - 'cd -' # Goes to the root directory alias / 'cd /' # The following are not generic enough. Disabled for the moment. #alias vt 'tar tvf' #alias xt 'tar xvf' #alias ct 'tar cvf' #alias zv 'unzip -v' #alias zt 'unzip -t' #alias restart 'clear ; exec tcsh' ## Standard aliases - for typos # These are the most common typos made by users, even experienced ones. # Send me yours. alias maek 'make' alias alais 'alias' alias csl 'clear' alias sl 'ls --color' ## Aliases specific to TCSH # What is the help command? Type "ls" and hit F1. Will show a help line. # From version tcshrc-1.x we use the man page facility as the help source. # Once you read the help, press "q" to quit and you can continue editing the # line. #alias helpcommand whatis alias helpcommand man ############# WATCH OUT THIS ONE ############################# # This is handy but dangerous! # To erase a directory structure, use "mrm openssl-0.9.5a". # It will be erased, no questions asked. # The "\" in the command disabled any further aliases encountered. ##### To enable this command, uncomment the following. #alias mrm '\rm -fr' ## Custom aliases - I can put whatever here ## These are handy to run on a console virtual console. # The tcpdump line is nice to see what traffic goes on the network # -s 2000 means to grab all the packet (max is about 1500, but anyway..) # -n means do not resolve names. Makes it faster and lightweight. # -i eth0 means only the Ethernet interface. In some distros, the loopback is # shown too which clutters the output. alias log_tcpdump 'clear ; exec tcpdump -s 2000 -n -i eth0' # This is a console lock. -a means that the user cannot switch consoles, # needs to unlock this console to continue. Before using this, check that # the SysRq linux kernel combination is disabled. If not, users may be able to # to kill the "vlock" process and access the other terminals. alias log_lock 'clear; exec vlock -a' # Put the following on a free console and leave it there. # Even when the logs are circulating, it will carry on. # If someone kills this process, it automatically exits due to the "exec". alias log_messages 'clear; exec tail -f /var/log/messages --follow=name --retry' # This creates a PostScript file out of a .txt one, in a economic way. # the output file is "output.ps" in all cases (carefull with overwrites..) # You need the "enscript" package installed. # It sets Duplex mode, prints in landscape two pages on each side of the # paper. alias enscriptit 'enscript -o output.ps -DDuplex:true -DTumble:true -r -M A4 -2' # If you are on Sourceforge, this may be handy. Also try RSA authentication # so that you do not need to put a password to connect. It is also handy with # "scp". # You can run it as "shell1 -l my_username" without modifying the following. alias shell1 'slogin -x shell1.sourceforge.net -l CHANGE_WITH_YOUR_USERNAME_IN_.tcshrc.alias' # This is another way to get RFCs nicely. Just do "rfcget 1234" # to get the appropriate RFC. Needs the ncftp package. alias rfcget 'ncftpget ftp://ftp.isi.edu/in-notes/rfc\!^.txt' # This erases the backup files from emacs, vi (if enabled) and others. # It is disabled by default. #alias clean 'rm -f *~' # This is useful to translators checking .po files. alias msgcheck 'msgfmt -o /dev/null --statistics --strict --verbose' alias gvr 'gvim --servername GVIM --remote-tab' alias pkginfo '/bin/ls -1 /var/db/pkg | grep -i' # cvs aliases alias acvs 'cvs -d freebsdanoncvs@anoncvs.FreeBSD.org:/home/ncvs' alias pcvs 'cvs -d lme@pcvs.FreeBSD.org:/home/pcvs' alias dcvs 'cvs -d lme@dcvs.FreeBSD.org:/home/dcvs' alias ncvs 'cvs -d lme@ncvs.FreeBSD.org:/home/ncvs' #cvs mirror local alias lpcvs 'cvs -q -R -d /home/pcvs' alias ldcvs 'cvs -q -R -d /home/dcvs' alias lncvs 'cvs -q -R -d /home/ncvs' alias sshot 'sleep 2; import -window root screenshot-`date "+%Y-%m-%d%"`.jpg' alias wff 'wine ~/.wine/drive_c/Program\ Files/Mozilla\ Firefox/firefox.exe'