Let’s use an example, you need to pass a file to one of your friends….
but, you don’t have a web space
and,you don’t have samba installed nor you are in the same network
or, you don’t want to create an account for just on file transfer…
but…. you have linux! WOW great.
All you need is to have netcat installed (available easily on most of Linux distros…) and use this command:
Open a shell, move to root (su command) and use the following command:
while true; do nc -l -p 80 < thefileyouwanttoshare; done
Now, just provide your IP address to your friend and ask your friend to open a browser to your just provided IP address…and woila’!
I was so surprised by this simple, obvious command that I love it.
Cheers guys.
Maurizio