[ale] Favorite Aliases?
Scott Plante
splante at insightsys.com
Sat Jan 10 12:48:24 EST 2015
I've always used psg too. Also md for mkdir but that's pretty boring.
Actually, taking a peek at my .bashrc, it looks like a while back I switched psg from an alias to a function:
psg ()
{
ps -ef | egrep ^UID\|\[${1:0:1}\]${1:1}
}
This version gives me the header line and avoids the grep in the output.
Since more often than not I seem to want to cd to the directory I just made, I also use:
mdcd()
{
mkdir "$@"
cd "$_"
}
I think it was ksh that had a -c option on type that read though the symbolic links to tell you where the real file was. The c was for canonical I believe. Anyway bash doesn't have that option so I've been using this one for many years too, ever since I switched to bash:
type()
{
if [ "$1" = "-c" ]
then
shift;
for f in "$@"
do
ff=$(builtin type -p "$f")
readlink -f "$ff"
done
else
builtin type $typeopts "$@"
fi
}
I know you asked for aliases, but most of mine grew into functions it seems. I do also alias vi to vim and more to less, but mostly because I couldn't get out of old habits.
Also this one is handy to replace scp for a large file :
alias rscp='rsync --partial --progress --stats --inplace'
This one is handy if you're having trouble connecting with ssh:
alias sshv='ssh -vvv -o LogLevel=DEBUG3'
Scott
----- Original Message -----
From: "JD" <jdp at algoloma.com>
To: "Atlanta Linux Enthusiasts" <ale at ale.org>
Sent: Saturday, January 10, 2015 10:40:56 AM
Subject: [ale] Favorite Aliases?
It has been awfully quiet here.
What are your 3 favorite aliases?
Let's skip the ls/du/df ones, ok?
# ps with a grep
alias psg='ps -eaf | grep $*'
Oh and for programs that I constantly misspell, I'll create multiple aliases
with the misspellings just to save time.
_______________________________________________
Ale mailing list
Ale at ale.org
http://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20150110/7a5afd83/attachment.html>
More information about the Ale
mailing list