Magic space on the current command line

2010-06-25 1 min read Bash Fedora Linux

# For how to set up magic space for Bash see:
# – http://www.ukuug.org/events/linux2003/papers/bash_tips/#slide15
# – http://codesnippets.joyent.com/posts/show/1690

man bash 2>/dev/null | less -p ’magic-space’

man bash 2>/dev/null | less -p ’Event Designators’

man bash 2>/dev/null | less -p &#8217;\!#&#8217; # &#8221;The entire <a class="zem_slink" title="Command-line interface" rel="wikipedia" href="http://en.wikipedia.org/wiki/Command-line_interface">command line typed so far.&#8221;

<a href="http://snippets.dzone.com/posts/show/10265">Read more :<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles by Zemanta <ul class="zemanta-article-ul"> <li class="zemanta-article-ul-li"><a href="http://www.makeuseof.com/tag/trigger-wake-lan-mac-address/">How To Trigger Wake On LAN Using The MAC Address (makeuseof.com) <li class="zemanta-article-ul-li"><a href="http://smarterware.org/4271/projectview-lists-your-todo-txt-by-project">Projectview Lists Your Todo.txt by Project (smarterware.org) <li class="zemanta-article-ul-li"><a href="http://helpdeskgeek.com/linux-tips/shell-script-backup-directory-linux/">Back Up a Directory in Linux using a Shell Script (helpdeskgeek.com) <div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/038d79c3-59e6-41ad-a8ad-31d1af669509/"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/reblog_e39.png" alt="Reblog this post [with Zemanta]" /><span class="zem-script more-related pretty-attribution">

Continue reading

wmctrl – window control manager

2010-06-16 0 min read Fedora Linux
\"Blue
Image via Wikipedia

What is <a class="zem_slink freebase/en/wmctrl" title="Wmctrl" rel="wikipedia" href="http://en.wikipedia.org/wiki/Wmctrl">wmctrl?

wmctrl  is  a  command that can be used to interact with an X Window manager that is compatible with the EWMH/NetWM specification.  wmctrl can query the <a class="zem_slink freebase/en/window_manager" title="Window manager" rel="wikipedia" href="http://en.wikipedia.org/wiki/Window_manager">window manager for information, and it can request that certain window management actions be taken.

Continue reading

IRC on Linux de-mystified for new users only

2010-06-15 2 min read Linux

The other day, I was trying to fix something in my firefox and found that the way to go was to login to IRC and go to the mozilla <a class="zem_slink freebase/en/server" title="Server (computing)" rel="wikipedia" href="http://en.wikipedia.org/wiki/Server_%28computing%29">server and join #firefox.

Though IRC is quite native to <a class="zem_slink freebase/en/linux" title="Linux" rel="wikipedia" href="http://en.wikipedia.org/wiki/Linux">Linux, I did not know where to start. So, I noted down the list of steps that need to be done to get you started. (Note this may not be new to most of you).

Continue reading

let a cow tell you your fortune

2010-06-03 1 min read Bash Linux
Here\’s something that I saw on commandlinefu yesterday. That sent me thinking about some command to have the cow file picked randomly 🙂 So, here\’s the original command from the commandlinefu:

let a cow tell you your fortune

    <td>
      <div class="text codecolorer">
        $ fortune | <a class="zem_slink freebase/en/cowsay" title="Cowsay" rel="homepage" href="http://www.nog.net/%7Etony/warez/cowsay.shtml">cowsay</a> -f tux
      </div>
    </td>
  </tr>
</table>

Delete all files in a folder that don't match a certain file extension

2010-04-30 1 min read Bash Fedora Linux

$ rm !(.foo|.bar|*.baz)

Deletes all files in a folder that are NOT *.foo, *.bar or *.baz files. Edit the pattern inside the brackets as you like.

  • <a href="http://www.commandlinefu.com/commands/view/5351/delete-all-files-in-a-folder-that-dont-match-a-certain-file-extension">View this command to comment, vote or add to favourites
  • <a href="http://feeds2.feedburner.com/commands/by/hutch">View all commands by <a href="http://feeds2.feedburner.com/commands/by/hutch">hutch

<a href="http://www.commandlinefu.com"><img src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/header-logo.jpg" alt="" align="bottom" />

by David Winterbottom (<a href="http://codeinthehole.com">codeinthehole.com)

<a href="http://feedads.g.doubleclick.net/~a/kewaFMgsXI4A1vQfeLscg2Vcv8o/0/da"><img src="http://blog.amit-agarwal.com/wp-content/uploads/img.zemanta.com/~a/kewaFMgsXI4A1vQfeLscg2Vcv8o/0/di" alt="" align="bottom" />
<a href="http://feedads.g.doubleclick.net/~a/kewaFMgsXI4A1vQfeLscg2Vcv8o/1/da"><img src="http://blog.amit-agarwal.com/wp-content/uploads/img.zemanta.com/~a/kewaFMgsXI4A1vQfeLscg2Vcv8o/1/di" alt="" align="bottom" />

<img src="http://blog.amit-agarwal.com/wp-content/uploads/img.zemanta.com/~r/Command-line-fu/~4/TCRb2ku_V1Y" alt="" width="1" height="1" align="bottom" />

Continue reading

Upgrade to Fedora 13 from your existing version using yum.

2010-04-21 1 min read Fedora Uncategorized

Well. this time it seems to be very simple :

yum –releasever=13 upgrade

update 22/April/2010:
The key file will not be there so there are two options for you in this case:

  1. Install the following rpms from the downloaded rpms with &#8221;yum –nogpg localinstall&#8221;
    a) fedora-release
    b) fedora-release-notes
  2. Run the whole upgrade with –nogpg option.

Issue observed after the upgrade:
The new kernel was not added in the grub menu and I had to manually add the below entry in the <a class="zem_slink freebase/en/gnu_grub" title="GNU GRUB" rel="homepage" href="http://www.gnu.org/software/grub/">menu.lst file:

Continue reading

Advanced Sed Substitution Examples

2010-04-11 1 min read Bash Linux

This article is part of the on-going Unix Sed Tips and Tricks series. In our previous sed articles we learned — sed printing, sed deletion, sed substitute , sed file write, and sed multiple commands. In this article, let us review some interesting workarounds with the “s” substitute command in sed with several practical examples. I. […]

Read More: <a href="http://www.thegeekstuff.com/2009/10/unix-sed-tutorial-advanced-sed-substitution-examples/">Unix Sed Tutorial: Advanced Sed Substitution Examples

URL: <a href="http://feedproxy.google.com/~r/TheGeekStuff/~3/uN-cE6UOvfA/">http://feedproxy.google.com/~r/TheGeekStuff/~3/uN-cE6UOvfA/<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles by Zemanta <ul class="zemanta-article-ul"> <li class="zemanta-article-ul-li"><a href="http://www.slumpedoverkeyboarddead.com/2009/08/06/vim-video-tutorial/">VIM video tutorial (slumpedoverkeyboarddead.com) <li class="zemanta-article-ul-li"><a href="http://www.slumpedoverkeyboarddead.com/2009/08/22/turn-vim-or-emacs-into-and-ide-with-exuberant-ctags/">Turn Vim or Emacs Into and IDE With Exuberant-Ctags (slumpedoverkeyboarddead.com) <div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/0d68ebaf-6fc5-419a-a31c-7d31bc55ab3f/"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/reblog_e8.png" alt="Reblog this post [with Zemanta]" /><span class="zem-script more-related pretty-attribution">

Continue reading
1