Re: [ubuntu-uk] 1000 commands
On 7 November 2013 16:50, Stuart Ward wrote: > > On 7 November 2013 10:40, Alan Pope wrote: > >> awk '{print $1}' ~/.bash_history | sort | uniq -c >> | sort -rn | head >> > > ~$ awk '{print $1}' ~/.bash_history | sort | uniq -c | sort -rn | head > 75 git > 74 cd > 57 sudo > 39 tail > 37 ls > 33 dig > 20 man > 13 python > 13 curl > 12 cat > > Looks like I have been using git a bit recently...? > Same here with ls and cd in front: $ awk '{print $1}' ~/.bash_history | sort | uniq -c | sort -rn | head 407 ls 283 cd 217 git 171 vi 114 make 53 dot 52 sudo 47 rm 44 erl 41 grep The only reason why python is not up there is because I tend to do chmod +x on my python scripts. I also had a dot and Erlang frenzy recently (not together though). What is also interesting is how it changes when you include the first parameter. The positions of "git status" and simple "ls" showing that I regularly need reminding what the hell I've just modified and what was in there in the first place: $ awk '{print $1 " " $2}' ~/.bash_history | sort | uniq -c | sort -rn | head 242 ls 72 git status 53 make 53 dot -Tsvg 50 vi Makefile 43 git add 41 vi test.sh 41 bash test.sh 39 git commit 33 cd .. Bruno -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/
Re: [ubuntu-uk] 1000 commands
On 7 November 2013 10:40, Alan Pope wrote: > awk '{print $1}' ~/.bash_history | sort | uniq -c > | sort -rn | head > ~$ awk '{print $1}' ~/.bash_history | sort | uniq -c | sort -rn | head 75 git 74 cd 57 sudo 39 tail 37 ls 33 dig 20 man 13 python 13 curl 12 cat Looks like I have been using git a bit recently...? -- Stuart Ward M +44 7782325143 -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/
Re: [ubuntu-uk] 1000 commands
The ranger CLI file manager is awesome too if your familiar with vi/vim. I use it a lot for getting to where I need to be. S is your friend (puts you in a shell in the directory you have selected in ranger). On 7 Nov 2013, at 15:09, Liam Proven wrote: > On 7 November 2013 10:40, Alan Pope wrote: >> Indeed, I type "ls" and "cd" way more than I should :) > > > Way back in the mists of ancient time, when I used to maintain just > half a dozen Unix boxes ever, I aliased just the bare command "l" - > lower-case L - to "ls -lah". > > That saved me a /lot/ of keystrokes. > > -- > Liam Proven • Profile: http://lproven.livejournal.com/profile > Email: lpro...@cix.co.uk • GMail/G+/Twitter/Flickr/Facebook: lproven > MSN: lpro...@hotmail.com • Skype/AIM/Yahoo/LinkedIn: liamproven > Tel: +44 20-8685-0498 • Cell: +44 7939-087884 > > -- > ubuntu-uk@lists.ubuntu.com > https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk > https://wiki.ubuntu.com/UKTeam/ -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/
Re: [ubuntu-uk] 1000 commands
On 7 November 2013 10:40, Alan Pope wrote: > Indeed, I type "ls" and "cd" way more than I should :) Way back in the mists of ancient time, when I used to maintain just half a dozen Unix boxes ever, I aliased just the bare command "l" - lower-case L - to "ls -lah". That saved me a /lot/ of keystrokes. -- Liam Proven • Profile: http://lproven.livejournal.com/profile Email: lpro...@cix.co.uk • GMail/G+/Twitter/Flickr/Facebook: lproven MSN: lpro...@hotmail.com • Skype/AIM/Yahoo/LinkedIn: liamproven Tel: +44 20-8685-0498 • Cell: +44 7939-087884 -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/
Re: [ubuntu-uk] 1000 commands
On 6 November 2013 20:23, Alan Jenkins wrote: > There is no problem with keeping a lengthy history per se, just > sometimes those commands are often variations on the same thing > Indeed, I type "ls" and "cd" way more than I should :) alan@deep-thought:~$ awk '{print $1}' ~/.bash_history | sort | uniq -c | sort -rn | head 474 cd 359 ls 173 adb 109 ./click_n_run.sh 100 sudo 46 nano 38 cat 32 mv 31 grep 27 ssh Cheers, Al. -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/
Re: [ubuntu-uk] 1000 commands
On 06/11/13 20:23, Alan Jenkins wrote: There is no problem with keeping a lengthy history per se, just sometimes those commands are often variations on the same thing in which case you may be better off creating scripts and aliases to save yourself time and effort. Always seek quicker and easier ways to do things as it makes your life easier and means you can spend the saved time working on other cool things or having fun. Just as a follow up as I don;t think I actually noticed a reply explaining where the limit is configured... nano ~/.bashrc # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) HISTSIZE=1000 HISTFILESIZE=2000 Cheers Al -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/
Re: [ubuntu-uk] 1000 commands
There is no problem with keeping a lengthy history per se, just sometimes those commands are often variations on the same thing in which case you may be better off creating scripts and aliases to save yourself time and effort. Always seek quicker and easier ways to do things as it makes your life easier and means you can spend the saved time working on other cool things or having fun. On 6 Nov 2013, at 20:16, Avi Greenbury wrote: > Alan Jenkins wrote: >> Shell scripts and aliases are the way to go for common commands. What on >> earth are you using more than a 1000 commands in your history for? I >> recommend making yourself aliases and scripts for your most used commands >> which you should be able to discern from your history file. > > I expect my shell to do things that make life easier for me, which > includes keeping all the commands I run relatively frequently in its > history rather than making me specifically configure it so. What's the > issue with keeping a lengthy history? > > -- > Avi > > -- > ubuntu-uk@lists.ubuntu.com > https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk > https://wiki.ubuntu.com/UKTeam/ -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/
Re: [ubuntu-uk] 1000 commands
Alan Jenkins wrote: > Shell scripts and aliases are the way to go for common commands. What on > earth are you using more than a 1000 commands in your history for? I > recommend making yourself aliases and scripts for your most used commands > which you should be able to discern from your history file. I expect my shell to do things that make life easier for me, which includes keeping all the commands I run relatively frequently in its history rather than making me specifically configure it so. What's the issue with keeping a lengthy history? -- Avi -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/
Re: [ubuntu-uk] 1000 commands
Shell scripts and aliases are the way to go for common commands. What on earth are you using more than a 1000 commands in your history for? I recommend making yourself aliases and scripts for your most used commands which you should be able to discern from your history file. On 5 Nov 2013, at 17:32, Simon Greenwood wrote: On 5 November 2013 17:18, Steven Roberts wrote: > I just discovered that, as a default, only the last 1000 commands are > stored in the bash history file. Pretty horrified! A quick bit of googling > gave me the fix to increase the limit etc. > > Not sure if this is just Ubuntu or linux in general. > > If you're into the command line 1000 commands don't cover a very long > period. I had made a backup of my history file in google docs/drive so not > all was lost. But it's something I've never seen reference too before. I > was on Ubuntu 12.04 so maybe it's changed since then? Don't know. > > > It's been a thousand on most Linux distributions for a while. It certainly is in CentOS 5 and 6 so that goes back about six years. Interestingly it appears to have been 500 in Ubuntu in 2009 but I honestly can't remember. Would converting a few things into aliases or shell scripts reduce your reliance on history? S/ -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/ -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/
Re: [ubuntu-uk] 1000 commands
On 5 November 2013 17:18, Steven Roberts wrote: > I just discovered that, as a default, only the last 1000 commands are > stored in the bash history file. Pretty horrified! A quick bit of googling > gave me the fix to increase the limit etc. > > Not sure if this is just Ubuntu or linux in general. > > If you're into the command line 1000 commands don't cover a very long > period. I had made a backup of my history file in google docs/drive so not > all was lost. But it's something I've never seen reference too before. I > was on Ubuntu 12.04 so maybe it's changed since then? Don't know. > > > It's been a thousand on most Linux distributions for a while. It certainly is in CentOS 5 and 6 so that goes back about six years. Interestingly it appears to have been 500 in Ubuntu in 2009 but I honestly can't remember. Would converting a few things into aliases or shell scripts reduce your reliance on history? S/ -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/
[ubuntu-uk] 1000 commands
I just discovered that, as a default, only the last 1000 commands are stored in the bash history file. Pretty horrified! A quick bit of googling gave me the fix to increase the limit etc. Not sure if this is just Ubuntu or linux in general. If you're into the command line 1000 commands don't cover a very long period. I had made a backup of my history file in google docs/drive so not all was lost. But it's something I've never seen reference too before. I was on Ubuntu 12.04 so maybe it's changed since then? Don't know. Steve Roberts. Linux Audio Enthusiast. -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/