[ubuntu-uk] ubuntu-uk Digest, Vol 103, Issue 2

Neil Greenwood neil.greenwood.lug at gmail.com
Wed Nov 6 06:55:15 UTC 2013


On 5 Nov 2013 22:59, "Simon Greenwood" <sfgreenwood at gmail.com> wrote:
>
>
>>
>> Cheers, guys, maybe you're right, I might need to up my game a bit in
the Shell script stakes at least (and with aliases).
>>
>> To answer the question of why I need so much history - I forget stuff!
>>
>> I'd never be a programmer (I reckon) as I forget things - the command
history is a reminder of the syntax I've used previously - it's also a
reminder of what I've actually done - like a paper trail. As I am learning
the commands and their syntax, the history is creating a document of my
learning, in a way. An example was in setting up a VPN and installing some
CMSes purely with the command line - I look up the syntax for SCP and stuff
but forget it when I've not used it for a while . So next time I want to
set up a new SQL database I can look at my history to help me do it again
without researching it all over again. Also, I get in the zone sometimes -
looking up stuff and learning etc - so I can't remember how I got there
even!!
>>
>> Maybe I should just install Webmin!!
>>
>> ;)
>>
>> PS This is my first (brave) attempt at inline posting - I hope it
formats well.
>>
>> Thanks again for your tips though!!
>>
>
> In that case you'd be much better off keeping a Google document with the
things that you need to remember pasted into it. Easier to search too.
>

You do know how to search the history without opening the file in an
editor, don't you? Otherwise even 1000 commands is too many!

CTRL-R will start an interactive search in reverse, so as you type more
characters from the command you're looking for it will search further back.
And using an exclamation mark followed by some characters will repeat the
last command starting with those characters, e.g. !ls will repeat the last
directory list command.

Search through the bash man page for "history expansion" to find lots more
shortcuts.

Neil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-uk/attachments/20131106/856a3e0d/attachment.html>


More information about the ubuntu-uk mailing list