it's an alias to summon the command history only for lazy people well for busy too

alias h='history'
typing history it's a long way but typing only h it's my way it works in whatever distro or OSes or shells that you use, you know, only for easyness :)
Sample Output
............
  448  df
  449  ./wlan111
  450  mc
  451  htop
  452  history
  453  activate modulos/wine-1.1.6.lzm
  454  wine POV-Ray/bin/pvengine.exe
  455  df
  456  umount /mnt/myfs
  457  xfs_repair /dev/loop/24
  458  umount /mnt/myfs1
  459  xfs_repair /dev/loop/25
  460  dmesg
  ...........

-8
By: ximo88
2009-04-28 11:20:03

These Might Interest You

  • Enhancement for the 'busy' command originally posted by busybee : less chars, no escape issue, and most important it exclude small files ( opening a 5 lines file isn't that persuasive I think ;) ) This makes an alias for a command named 'busy'. The 'busy' command opens a random file in /usr/include to a random line with vim.


    0
    alias busy='rnd_file=$(find /usr/include -type f -size +5k | sort -R | head -n 1) && vim +$((RANDOM%$(wc -l $rnd_file | cut -f1 -d" "))) $rnd_file'
    frntn · 2011-10-16 00:05:59 0
  • This makes an alias for a command named 'busy'. The 'busy' command opens a random file in /usr/include to a random line with vim. Drop this in your .bash_aliases and make sure that file is initialized in your .bashrc.


    22
    alias busy='my_file=$(find /usr/include -type f | sort -R | head -n 1); my_len=$(wc -l $my_file | awk "{print $1}"); let "r = $RANDOM % $my_len" 2>/dev/null; vim +$r $my_file'
    busybee · 2010-03-09 21:48:41 8
  • alias for psql command line; works similar for Oracles sqlplus commandline interface. if you do not provide stdin you will end up in the db shell. Show Sample Output


    1
    alias QUERY='psql -h $MYDBHOST -p 5432 -d $MYDB -U $MYLOGIN --no-align'
    cp · 2011-04-08 12:44:33 0
  • I rarely need this, but I have a hard time remembering the command when I need it. Admit it. This has happened to you. Yes this is bad, and you better clean up now. Borrowed from http://thoughtsbyclayg.blogspot.com/2008/02/how-to-delete-last-command-from-bash.html Show Sample Output


    0
    alias histdel='history -d $((HISTCMD-2)) && history -d $((HISTCMD-1))'
    StefanLasiewski · 2010-07-02 00:20:44 3

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: