Originally posted by jbsnake
# I use this so that I always have my directories and files color codedOriginally posted by Crouse
# This is usually already in some of your more user friendly versions of linux
alias ls='ls --color=auto'
# This one does four things for me
# First - it saves the directory I'm currently working in
# Second - it mounts my floppy drive
# Third - changes to the directory that it mounted the drive to
# Fourth - it lists the directory's contents
alias floppy='FDIR=`pwd`;mount /mnt/fl;cd /mnt/fl;ls'
# This one does the reverse
# First - it changes to the directory it stored while mounting the floppy
# Second - it unmounts the drive
alias xfloppy='cd $FDIR;umount /mnt/fl'
# This one does the same thing as the floppy mount, except it's for my cdrom
alias cdrom='CDIR=`pwd`;mount /mnt/cd;cd /mnt/cd;ls'
# This one does the same thing as the floppy unmount, except
# It ejects the cdrom once unmounted
alias xcdrom='cd $CDIR;umount /mnt/cd;eject'
# This set is for the usb jump drive I have
# Does the same as the floppy mount/unmount
alias usb='UDIR=`pwd`;mount /mnt/usb;cd /mnt/usb;ls'
alias xusb='cd $UDIR;umount /mnt/usb'
# This one is to keep my pacman mirrors sorted for speed :)
# Gotta love archlinux
alias resort_pacman='sortmirrors.pl </etc/pacman.conf >pacman.conf.new'
alias rd='rm -rf'Originally posted by jbsnake
heh....i never use rmdir...just
rm -Rf <directory name>
ofcourse there is also
alias shutdown='sudo shutdown'
alias l='ls -l'
alias la='ls -la'
my most loved
alias scripts='cd /home/jbsnake/scripts'Originally posted by isacklow
ok, here a few of my favorites
i have quite a few that are just shortcuts quickly ssh into my many servers. i have the same admin account on all my systems so i just setup an ssh-key with a blank password so i can quickly log in
alias <servername>="ssh <server>"
i always thought this should be the default view for lsmod
alias lsmod="lsmod | sort"
a quick shortcut when printing from the cli
this one is one of my more heavily used ones. i use it to check for open ssh connections before i logout everynight. "$ psgrep ssh"
alias psgrep="ps -aux | grep -v grep | grep"
these 2 make sure i don't do something stupid when i am housecleaning
alias cp="cp -i"
alias mv="mv -i"
the next few are just to save me a few keystrokes
alias df="date&&df -h"
alias du="du -c -s -h"
alias grep="grep -r -i"
alias su="su -l"
this one is because i am just lazy
this one is on a specific server that has some very long mount paths. it just cleans up the output a bit
alias df="date&&df -h | grep -v iso | grep -v 10[.]11[.]12[.]253"
these are some new ones that i just haven't setup into a script yet. the first one mounts port 25/smtp from my mail server to my laptop so i don't need to run sendmail for smtp and i can always send mail no matter where i am and what isp i am on. i just set my mail app to use "localhost" for the smtp server. the second one allows me to easily connect to remote ipp/cups printers at my house and a private network while i am out and about. since i am the only one with shell access to all my systems i don't see the point in installing sudo to get root access. the user is needed in the ssh commands since i don't allow root to login via ssh.
alias smtp="su -c 'ssh -L 25:localhost:25 user@host -N -f'"
alias cups_home="su -c 'etc/rc.d/rc.cups stop&&ssh -L 631:localhost:631 user@host -N -f'"