commandlinefu.com is the place to record those command-line gems that you return to again and again.
Delete that bloated snippets file you've been using and share your personal repository with the world. 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.
If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/
You can sign-in using OpenID credentials, or register a traditional username and password.
First-time OpenID users will be automatically assigned a username which can be changed after signing in.
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
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:
Netcat is used to serve a log-file over a network on port 1234.
Point a browser to the specified server/port combo to view log-file updates in real-time.
There are 2 alternatives - vote for the best!
it also works with the chrome browser. The alternative with tail and nc doesn't
This one is tried and tested for Ubuntu 12.04. Works great for tailing any file over http.
If you can do better, submit your command here.
You must be signed in to comment.
That doesn't seem to work with my Firefox.
How does netcat handle the http procol ?
Sorry i should have mentioned i tested this on MacOS.
Here is the Linux (Ubuntu) version:
( echo -e "HTTP/1.0 200 Ok\n\r"; tail -f error_log; ) | nc -lp 1234
I did as you posted in your comment, but my nc man pages says that l and p cannot be used together, nc won't start; I'm on Ubuntu 10.04, my nc version is: OpenBSD netcat (Debian patchlevel 1.89-3ubuntu2)
I've taken the last version from sourceforge but it still doesn't work, when I point my browser to http://localhost:1234 it keeps loading...
there are two versions of netcat. One should be started with -l -p and another one without -p. Yeah, welcome to the unix world. This command doesn't work well because browser buffers some amount of data and if nothing is written to the transferred file nothing is shown. Additionally this command doesn't work with chrome browser.