[PLUG] Saving terminal commands
Michael
michael at jamhome.us
Wed Feb 4 20:33:33 UTC 2009
John Jason Jordan wrote:
> I'm more a GUI kinda guy, but there are certain commands that I use
> repeatedly in the terminal. For example, I use cdparanoia and lame to
> rip and encode CDs from my collection.
Parphrasing Satayana, those who forget history are condemned to repeat it.
For a simple answer to your question, use the history command.
Show all the commands stored in your history:
history
Pipe it to less because it will all scroll by too fast
history | less
just look at the times you used lame
history | grep lame
ditto wrt paranoia
history | grep cdparanoia
You can just cut and paste to a new command line to repeat. You'll also see
that history prints a number before each command, for example
575 gvim
576 mkdir s1
577 cd s1
578 scp system1:/opt/application/net*rc* .
579 cd ..
580 diff cct/nethealthrc.sh s1/nethealthrc.sh
581 diff cct/nethealthrc.sh s1/nethealthrc.sh | less
582 cd cct
583 scp *usr testbox:/var/tmp
You can type !<number> to repeat the command referenced by <number>
in my example if I canted to launch gvim again I could do so by typing !575
Having said that Jamie's suggestion to install grip to automate the whole rip
thing is to be considered. If you're a KDE person K3B is a great CD/DVD rip,
copy and more application. I find K3B to be more useful than grip, though I've
used and like both.
--
Michael Rasmussen
http://www.jamhome.us/
Be Appropriate && Follow Your Curiosity
More information about the PLUG
mailing list