bind a web server in $PWD

python -c "import SimpleHTTPServer;SimpleHTTPServer.test()"

-3
By: hypnojazz
2009-03-26 15:26:27

These Might Interest You

  • Due to the recent dynamic update vulnerability with bind, I was forced to dig a little deeper into dig... Show Sample Output


    8
    dig -t txt -c chaos VERSION.BIND @<dns.server.com>
    din7 · 2009-07-30 18:38:39 3
  • Command binds a set of commands to the F12 key. Feel free to alter the dashboard according to your own needs. How to find the key codes? Type read Then press the desired key (example: F5) ^[[15~ Try bind '"\e[15~"':"\"ssh su@ip-address\C-m""" or bind '"\e[16~"':"\"apachectl -k restart\C-m""" Show Sample Output


    17
    bind '"\e[24~"':"\"ps -elF;df -h;free -mt;netstat -lnpt;who -a\C-m"""
    Neo23x0 · 2009-06-21 23:57:20 5
  • This is similar to using `!!` or In bash 4.1 it seems you can bind directly to a shell command, but I'm not running that version. Show Sample Output


    0
    bind '"\C-h": "\`fc\ \-s\`"'
    rthemocap · 2010-08-16 17:58:16 0
  • Now type Ctrl-l and it will list all files


    23
    bind '"\C-l":"ls -l\n"'
    strzel_a · 2010-11-19 09:14:16 5

What Others Think

Guy, use the search box before posting! This was already posted (and shorter).
lme · 478 weeks ago
sorry :(
hypnojazz · 478 weeks ago

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: