Sponsored by Best Buy
He sings, he strums, and he works at Best Buy. view!
youtube.com - Musician and Best Buy employee, Keith Parsons, rocks his Best Buy holiday campaign audition.
41 Comments
- uberushaximus, on 10/12/2007, -1/+9Use this link if it doesn't load :)
http://www.google.com/search?q=cache:MvOhdAxRI3gJ:www.linux.ie/lists/pipermail/ilug/2006-May/087799.html+bang+commands&hl=en&lr=&strip=1 - soogy, on 10/12/2007, -2/+9Shell bang, shell bang!
- aroedl, on 10/12/2007, -1/+8Also pretty helpful:
http://linuxhelp.blogspot.com/2005/08/bash-shell-shortcuts.html
ALT + . -> Last argument from previous command - recover82, on 10/12/2007, -1/+7If you don't like the story or the comments save us the trouble of filtering through your muck and just leave it alone. Nobody cares that you don't like Linux or "fanboys" (whatever the hell that even means. . )
- dc2447, on 10/12/2007, -1/+6Try ctrl r - and you can search your history
- neko, on 10/12/2007, -0/+4$ man bash | wc -l
Reformatting bash(1), please wait...
5151
Because the manpage for bash is gigantic. It helps to learn the simple, everyday things first, and then slowly pick up tips and tricks as you go along. Like the ctrl-R history search dc2447 posted above. Looks handy. Up until now, I too had been using 'history | less' like a fool ;) - fazed, on 10/12/2007, -1/+4hey thanks dc2447!! that's much better than the history | grep that i was doing ;)
- statmobile, on 10/12/2007, -1/+4I always found tips like these to sound quite useful, but whenever trying to apply them I become too lazy and rely upon bash_completion and regular tab completion in bash to carry me through a productive work day. Regardless, if you can remember these in the heat of programming, KUDOS!!! I'm sure it will save you many keystrokes throughout the day!
- Haroldx, on 10/12/2007, -0/+3http://www.duggmirror.com/linux_unix/_Linux_Unix_OSX_Bash_Shell_tip:_bang_commands/
- rpdillon, on 10/12/2007, -0/+3I am a Gentoo user, and I found this *awesome* thread in their forums about bash tricks...I learned quite a bit from it! The other link may be useful as well.
http://forums.gentoo.org/viewtopic-t-15443-start-0-postdays-0-postorder-asc-highlight-bash+tricks.html
http://forums.gentoo.org/viewtopic.php?t=5850 - spirituscanis, on 10/12/2007, -0/+2i <3 Quicksilver
- schappim, on 10/12/2007, -2/+4This is really handy! It works in Mac OS X's Bash Terminal, but it also works with Quicksilver, for really really really quick Terminal commands!
- burke, on 10/12/2007, -0/+2okay, $? is the return code, correct? What is $_ (? ;) )
- FilCab, on 10/12/2007, -0/+2Bad links aren't to be used when the server blows...
They're to be used when the link given... is bad (e.g: blogspam and stuff) - webhead74, on 10/12/2007, -0/+1Here's a PDF version I uploaded:
http://download.yousendit.com/ADC2C5873D7486AD - neko, on 10/12/2007, -0/+1For longer ranges, it got to the point where I started writing a quickie perl script to help me generate the sequence of numbers.. mere days later I discovered the 'seq' command that comes as part of coreutils. How did I manage to miss that little gem?
Anyway, it works like this:
for N in $(seq 35 152); do
mv Image$N.jpg ~/stuff/blah/
done - fazed, on 10/12/2007, -1/+2nice, i have only used ! with history up until now
- cprior, on 10/12/2007, -0/+1While we're at it:
http://www.ugu.com/sui/ugu/show?I=tip.today
I love to get the "Today's Tip" newsletter with all those cool snippets... Educative at least once a week! ;) - DPyro, on 10/12/2007, -0/+1Do they make these commands on purpose so we can make perverted jokes about them? i mean, man, jobs, who, grep, finger, head, bang, more, stop, whoami now? I'm pretty sure DOS doesn't do this =)
- cprior, on 10/12/2007, -0/+1#While we're at it:
#http://www.ugu.com/sui/ugu/show?I=tip.today
#I love to get the "Today's Tip" newsletter with all those cool snippets...
#Educative at least once a week! ;)
Tss, the wegpage didn't refresh. But I cannot delete that re-post :( - krazikamikaze, on 10/12/2007, -0/+1I stumbled upon the pattern matching full line one accidentally and I've been using it ever since. I didn't realize there were more! Definitely very useful.
- elusive, on 10/12/2007, -0/+1To go to the last visited directory:
cd - - burke, on 10/12/2007, -0/+1Ah, ok. Thanks.
- dc2447, on 10/12/2007, -0/+1My bad - I meant that using !$ should be deprecated and $_ should be used, both are the last argument
ls /tmp
cd $_
would list /tmp then cd /tmp - cakefart, on 10/12/2007, -0/+1This is a great list, probably one of the best noted on digg since I've been reading posts here. Bang shortcuts have saved me countless hours over the years.
If anyone is interested in more shortcuts, Paul Dubois' "Using csh & tcsh" (ORA Nutshell Handbook) is one of the best books ever written on the subject.
P.S. The Irish Linux User Group mailing list this is list is taken from is also best in class. The people are extremely helpful, and most of the content is equally useful. I raid their archives constantly when I'm trouble shooting. - lollerskates, on 10/12/2007, -1/+1Wait, does Quicksilver support ALL terminal commands? Damn, I knew I should have kept it.
- linuxrebel, on 10/12/2007, -1/+1If you ever feel like really learning something about the command line (OSX, Unix or Linux, site designed on Linux) then hop on over to
http://www.linuxcommand.org/
This guy and his company have put together what I think is the most comprehensive and easy to understand command line tutorial for new users. Admittedly it's Bash and Linux centric but if you tolerate minor changes most of what is in here works on csh or zsh as well. - burke, on 10/12/2007, -1/+1Whoah! I didn't realize emacs mode extended quite that far. That's awesome!
- dbr_onix, on 10/12/2007, -1/+1It seems the duggmirror.com thing could be implimented to the site, if enough "Bad links" reports are sent, it displays an alternative link (along with the original one)..
- Ben - AeroGuy, on 10/12/2007, -0/+0Thanks, dc2447. Your post eductaed me on the fact that you don't need to put those lines in a file. I was doing something similar but didn't know I could just enter the lines one after another at the command line.
- AeroGuy, on 10/12/2007, -0/+0Okay, bad example. In the second one, I am thinking of moving a1.dat, a2.dat, etc to a1.txt, a2.txt, etc in one fell swoop. I usually use a script to do this, but I am hoping I can do it at the command line.
- dc2447, on 10/12/2007, -0/+0many ways of doing this
for i in 1 2 3 4 5 6
do
mv a$i.dat a$i.txt
done - u02sgb, on 10/12/2007, -0/+0Try using Esc-K in the Korn shell too (ksh).
Make sure you run "set -o vi"
Then Esc k, will show your previous command, J and K will scroll up and down the list (as if the list of commands was a file in vi and you were scrolling up and down it).
You can also do anything you can in vi, so all your editing commands will work and:
To search for a previous command just use vi's search command "/" and type in any regular expression.
Stu. - pauldonnelly, on 10/12/2007, -0/+0$_ is too harder to type though.
- AeroGuy, on 10/12/2007, -0/+0Two similar questions:
1.)Is there a way to match an earlier argumment in the same command?
2.) What about matching whatever a wildcard matches... For instance, suppose I want to copy foobar.dat to foobar.txt, and I start typing "cp foo*.dat fooSOMETHING.txt" Is there something I can put in there in place of SOMETHING that will refer to "bar"?
Thanks in advance. - dc2447, on 10/12/2007, -3/+2Gosh I hate when people advise others to use $? - it should of course be $_
- uberushaximus, on 10/12/2007, -3/+1Great link :D
- linuxrebel, on 10/12/2007, -4/+1If you ever feel like really learning something about the command line (OSX, Unix or Linux, site designed on Linux) then hop on over to
http://www.linuxcommand.org/
This guy and his company have put together what I think is the most comprehensive and easy to understand command line tutorial for new users. Admittedly it's Bash and Linux centric but if you tolerate minor changes most of what is in here works on csh or zsh as well. - inactive, on 10/12/2007, -14/+4I have some Bang Commands for you.
- jzp-digg, on 10/12/2007, -12/+2RTFM - no digg. why did this even get front page? pathetic.
- shakeyshakey, on 10/12/2007, -20/+0BANG!
Another linux fanboy dead!
Horray!


What is Digg?