{"id":12631,"date":"2019-03-28T04:38:43","date_gmt":"2019-03-28T04:38:43","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=12631"},"modified":"2019-03-28T04:38:43","modified_gmt":"2019-03-28T04:38:43","slug":"woof-easily-exchange-files-over-a-local-network-in-linux","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/28\/woof-easily-exchange-files-over-a-local-network-in-linux\/","title":{"rendered":"Woof \u2013 Easily Exchange Files Over a Local Network in Linux"},"content":{"rendered":"<p><strong>Woof<\/strong>\u00a0(short for\u00a0<strong>Web Offer One File<\/strong>) is a simple application for sharing files between hosts on a small local network. It consists of a tiny HTTP server that can serve a specified file for a given number of times (default is once) and then terminates.<\/p>\n<p>To use\u00a0<strong>woof<\/strong>, simply invoke it on a single file, and the recipient can access your shared file via a web browser or using a command-line web-client such as\u00a0<a href=\"https:\/\/www.tecmint.com\/linux-curl-command-examples\/\" target=\"_blank\" rel=\"noopener\">cURL<\/a>,\u00a0<a href=\"https:\/\/www.tecmint.com\/httpie-http-client-for-linux\/\" target=\"_blank\" rel=\"noopener\">HTTPie<\/a>,\u00a0<a href=\"https:\/\/www.tecmint.com\/10-wget-command-examples-in-linux\/\" target=\"_blank\" rel=\"noopener\">wget<\/a>\u00a0or\u00a0<a href=\"https:\/\/www.tecmint.com\/kurly-alternative-to-linux-curl-command\/\" target=\"_blank\" rel=\"noopener\">kurly<\/a>\u00a0(a curl alternative) from the terminal.<\/p>\n<p>One advantage of\u00a0<strong>woof<\/strong>\u00a0over other file sharing tools is that it shares files between a different operating system, or different devices (computers, smartphones, tablets etc.), provided the recipient has a web browser installed.<\/p>\n<p>In this article, we will show how to install\u00a0<strong>woof<\/strong>\u00a0in Linux and use it to share files on a local network.<\/p>\n<h3>How to Install and Use Woof in Linux<\/h3>\n<p>On Debian and Ubuntu, you can easily install \u2018<strong>woof<\/strong>\u2018 package from the distribution\u2019s default repositories using\u00a0<a href=\"https:\/\/www.tecmint.com\/apt-advanced-package-command-examples-in-ubuntu\/\" target=\"_blank\" rel=\"noopener\">apt<\/a>or\u00a0<a href=\"https:\/\/www.tecmint.com\/useful-basic-commands-of-apt-get-and-apt-cache-for-package-management\/\" target=\"_blank\" rel=\"noopener\">apt-get<\/a>\u00a0package manager as shown.<\/p>\n<pre>$ sudo apt install woof\r\nOR\r\n$ sudo apt-get install woof\r\n<\/pre>\n<p>On other Linux distributions, you can download the\u00a0<strong>woof<\/strong>\u00a0script using\u00a0<a href=\"https:\/\/www.tecmint.com\/10-wget-command-examples-in-linux\/\" target=\"_blank\" rel=\"noopener\">wget command<\/a>\u00a0and move it to a\u00a0<strong>\/usr\/bin<\/strong>directory as shown.<\/p>\n<pre>$ wget http:\/\/www.home.unix-ag.org\/simon\/woof\r\n$ sudo cp woof \/usr\/bin\/\r\n<\/pre>\n<p>To share a file, provide it as an argument as shown.<\/p>\n<pre>$ woof .\/bin\/bashscripts\/getpubip.sh \r\n<\/pre>\n<p>Then woof will generate a URL (<strong>http:\/\/192.168.43.31:8080\/<\/strong>\u00a0in this case) which your partner can use to access the file.<\/p>\n<div id=\"attachment_31625\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2019\/01\/share-file-with-woof.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-31625\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2019\/01\/share-file-with-woof.png\" alt=\"Share File with Woof\" width=\"682\" height=\"97\" aria-describedby=\"caption-attachment-31625\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-31625\" class=\"wp-caption-text\">Share File with Woof<\/p>\n<\/div>\n<p>Send the URL to the recipient. Once the recipient accesses the file, woof will shutdown (see the following screenshot).<\/p>\n<div id=\"attachment_31626\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2019\/01\/access-file-shared-via-woof.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-31626\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2019\/01\/access-file-shared-via-woof.png\" alt=\"Access File Shared via Woof \" width=\"685\" height=\"464\" aria-describedby=\"caption-attachment-31626\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-31626\" class=\"wp-caption-text\">Access File Shared via Woof<\/p>\n<\/div>\n<p><strong>Note<\/strong>: In the above example, we have used\u00a0<a href=\"https:\/\/www.tecmint.com\/command-line-web-browser-download-file-in-linux\/\" target=\"_blank\" rel=\"noopener\">wget command line downloader<\/a>\u00a0to obtain the shared file, and it automatically assigns the downloaded file a different name (for instance\u00a0<strong>index.html<\/strong>).<\/p>\n<p>To specify a custom name, use the\u00a0<code>-O<\/code>\u00a0option as shown.<\/p>\n<pre>$ wget -O  custom_name http:\/\/192.168.43.31:8080\r\n<\/pre>\n<p>Alternatively, you can also access the shared file from the web browser as shown (click\u00a0<strong>Save File<\/strong>\u00a0to download it).<\/p>\n<div id=\"attachment_31627\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2019\/01\/access-shared-file-from-web-browser.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-31627\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2019\/01\/access-shared-file-from-web-browser.png\" alt=\"Download Shared File from Web Browser\" width=\"638\" height=\"431\" aria-describedby=\"caption-attachment-31627\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-31627\" class=\"wp-caption-text\">Download Shared File from Web Browser<\/p>\n<\/div>\n<p>By default,\u00a0<strong>woof<\/strong>\u00a0shares the file once, and after the recipient downloads it, woof terminates. You can set the number of time woof shares a file before it shuts down, using the\u00a0<code>-c<\/code>\u00a0option.<\/p>\n<p>The following command will terminate woof after three downloads.<\/p>\n<pre>$ woof -c 3 .\/bin\/bashscripts\/getpubip.sh\r\n<\/pre>\n<p>To share a directory, you can create a tarball and compress it by using (<code>-z<\/code>\u00a0for gzip compression, or\u00a0<code>-j<\/code>\u00a0for bzip2 compression, or\u00a0<code>-Z<\/code>\u00a0for ZIP compression). For example:<\/p>\n<pre>$ woof -c 2 -z .\/bin\/\r\n<\/pre>\n<p>Check out the download file name, it should be a Gzip archive as shown in the following screenshot.<\/p>\n<div id=\"attachment_31628\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2019\/01\/download-shared-archive-file-with-compression.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-31628\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2019\/01\/download-shared-archive-file-with-compression.png\" alt=\"Download Compressed Tar Archive File\" width=\"639\" height=\"409\" aria-describedby=\"caption-attachment-31628\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-31628\" class=\"wp-caption-text\">Download Compressed Tar Archive File<\/p>\n<\/div>\n<p>In addition, you can use the\u00a0<code>-U<\/code>\u00a0flag to tell\u00a0<strong>woof<\/strong>\u00a0to provide an upload form, allowing file uploads. The file will be uploaded to the current directory where woof was launched from:<\/p>\n<pre>$ woof -U\r\n<\/pre>\n<p>Then your partner can use the generated URL to access the upload form from a browser as shown.<\/p>\n<div id=\"attachment_31630\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2019\/01\/browse-and-select-file-to-be-uploaded.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-31630\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2019\/01\/browse-and-select-file-to-be-uploaded.png\" alt=\"Woof File Upload Form\" width=\"627\" height=\"294\" aria-describedby=\"caption-attachment-31630\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-31630\" class=\"wp-caption-text\">Woof File Upload Form<\/p>\n<\/div>\n<p>After browsing and selecting the file, click the Upload button to upload files.<\/p>\n<div id=\"attachment_31629\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2019\/01\/woof-upload-complete.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-31629\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2019\/01\/woof-upload-complete.png\" alt=\"Woof File Upload Complete\" width=\"627\" height=\"294\" aria-describedby=\"caption-attachment-31629\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-31629\" class=\"wp-caption-text\">Woof File Upload Complete<\/p>\n<\/div>\n<p>You can verify, that the file should be uploaded to the same directory where woof was invoked.<\/p>\n<div id=\"attachment_31631\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2019\/01\/file-uploaded-successfully.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-31631\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2019\/01\/file-uploaded-successfully.png\" alt=\"Verify File Uploads\" width=\"682\" height=\"249\" aria-describedby=\"caption-attachment-31631\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-31631\" class=\"wp-caption-text\">Verify File Uploads<\/p>\n<\/div>\n<p>You can see more usage options by running:<\/p>\n<pre>$ man woof \r\nOR\r\n$ woof -h\r\n<\/pre>\n<p><strong>Woof<\/strong>\u00a0is a small, simple and easy-to-use HTTP server for sharing files on a local areas network. In this article, we showed how to install and use woof in Linux. Use the feedback form below to share your thoughts about this tool or ask questions.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/share-files-over-a-local-network-in-linux\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Woof\u00a0(short for\u00a0Web Offer One File) is a simple application for sharing files between hosts on a small local network. It consists of a tiny HTTP server that can serve a specified file for a given number of times (default is once) and then terminates. To use\u00a0woof, simply invoke it on a single file, and the &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/28\/woof-easily-exchange-files-over-a-local-network-in-linux\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Woof \u2013 Easily Exchange Files Over a Local Network in Linux&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-12631","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12631","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=12631"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12631\/revisions"}],"predecessor-version":[{"id":12632,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12631\/revisions\/12632"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=12631"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=12631"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=12631"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}