[{"data":1,"prerenderedAt":496},["ShallowReactive",2],{"project-5231487":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":35,"aspects":36,"strip":45,"post_text":47,"what":48,"said":78,"maker_in_thread":215,"shape":225,"grid":229,"attempts":457,"same_week":458,"maker_shows":46,"maker_hidden":488,"reader_version":489,"card":490},"5231487","bcp","Quickly copy a file between computers","title","Show HN: Quickly copy a file between computers","https:\u002F\u002Fgithub.com\u002Fjwilberding\u002Fbcp","github.com","diginux",1361023494,2013,110,92,204,1739,12,"notable","dev_tools","command line file transfer","cli",[24,25,26,27],"copy file over network","lan file transfer","netcat alternative","command line file copy","mixed",-0.194,{"positive":31,"neutral":32,"mixed":33,"critical":34},4,16,3,11,34,{"idea":37,"execution":39,"privacy":42,"docs":43,"performance":44},{"positive":31,"critical":38},6,{"positive":40,"critical":41},0,5,{"positive":40,"critical":40},{"positive":40,"critical":40},{"positive":40,"critical":40},[46,40,40,33,41,40,40,46,40,46,40,40,46,46,40,46,33,33,33,33,41,46,33,40,40,40,33,33,40,33,40,33,33,33,46,33,40,40,46,41],1,"Hey everyone, just wanted to share a quick project I built a bit ago and finally cleaned up enough to post.\n\nThe premise is simple, you have a file on one computer that you want on a different computer on the same network and don't want a lot of fuss.\n\nFor the file you want to copy, on the machine where the file is located, run:\n\n.\u002Fbcp filename\n\nNow go to the computer (on the same network) where you want the file to be at, and run:\n\n.\u002Fbcp\n\nThe file will be copied over the network and you're done.\n\nI created it as a nice way of not having to worry about ssh or anything else really. In fact, it ",{"problem":49,"audience":58,"pricing":58,"motivation":59,"time_to_build":58,"stack":66,"openness":75,"stage":76,"team_size":77},{"value":50,"source":51,"evidence":52},"Copying a file between two machines on a LAN without knowing hostnames or IPs or setting up ssh.","maker",[53,55],{"id":54},"post",{"id":56,"by":11,"text":57},"5232466","This requires you know the IP\u002Fdomain of the host. With DHCP on my laptop, this is not always the case. Yes, I know how to lookup my ip, but doing it every time becomes a pain.",null,{"value":60,"source":51,"evidence":61},"Scratching a personal itch; avoids needing ssh or remembering hostnames and paths.",[62,63],{"id":54},{"id":64,"by":11,"text":65},"5232478","It wasn't many hours and I know nc and have used it this exactly way. However, nc requires you know the hostname, an assumption I didn't want to make. I appreciate the criticism…",[67],{"value":68,"source":69,"evidence":70},"C","commenter",[71],{"id":72,"by":73,"text":74},"5232416","srl","This solution is worse than the shell hack, by a lot. From the source: ``` char filename[MAXNAMELEN]; ``` and then a few lines down... ``` filename_size = 0;…","open_source","prototype","unknown",{"praise":79,"objections":99,"requests":135,"questions":161,"alternatives":176},[80,91],{"value":81,"source":69,"evidence":82},"Solves a real pain point of finding hosts and IPs on DHCP networks.",[83,87],{"id":84,"by":85,"text":86},"5232745","entropy_","You still need to know the IP. I use nc this exact same way, and it's definitely a hassle -- not a big one, but still -- to have to check ifconfig on one of the machines and then…",{"id":88,"by":89,"text":90},"5233424","dclowd9901","Rad, especially the persistent mode.",{"value":92,"source":69,"evidence":93},"Good to see people building small things for fun and sharing them.",[94,98],{"id":95,"by":96,"text":97},"5231975","Udo","There are a million ways to copy files, a lot of them are simpler to use than your example. But that's not the point here. Sometimes you just got to make something because you…",{"id":84,"by":85,"text":86},[100,111,119,128],{"value":101,"source":69,"evidence":102},"Netcat or a one-line shell pipe already does this.",[103,107],{"id":104,"by":105,"text":106},"5231887","midnightsine","$ nc -l 8888 > file $ cat file | nc host.example.com 8888 I don't think a dedicated utility is required. Edit: Sorry about my comment coming off as a bit hostile, I did not…",{"id":108,"by":109,"text":110},"5232130","niggler","those hours of time spent writing the code could have been saved by spending minutes learning the standard way of doing it (and given the ubiquity of nc, its utility would…",{"value":112,"source":69,"evidence":113},"Security flaws: buffer overflow risk and no authentication; only safe on trusted networks.",[114,115],{"id":72,"by":73,"text":74},{"id":116,"by":117,"text":118},"5232202","jbester","It's neat. I noticed a couple of subtle bugs. 1) The code assumes both the client and the server have the same endian. This can be issue since a uint32 is used for both the…",{"value":120,"source":69,"evidence":121},"Slow compared with scp or tar over nc; no compression.",[122,125],{"id":123,"by":109,"text":124},"5232160","SCP is significantly slower than FTP (and performance was an explicit goal of the project)",{"id":126,"by":11,"text":127},"5232591","For big files it would make a very noticeable difference actually, try scp with different encryption algorithms even and you will see how much it matters. With that said, by…",{"value":129,"source":69,"evidence":130},"Title overstates it: it is one more way to copy, not a quicker one.",[131],{"id":132,"by":133,"text":134},"5232213","azov","When the title says \"Quickly copy a file...\" it is reasonable to assume that we're talking about something quicker\u002Feasier then at least the most obvious ways to copy. But if…",[136,143,150,154],{"value":137,"source":69,"evidence":138},"Support multiple receivers or a persistent listener mode.",[139,142],{"id":140,"by":89,"text":141},"5231773","I like how clever this is, but is there an option to name a bcp (or a planned option), so that I can send files among a big network with lots of people using this command…",{"id":88,"by":89,"text":90},{"value":144,"source":69,"evidence":145},"Support piped input and output for use with other tools.",[146],{"id":147,"by":148,"text":149},"5232642","latitude","Try and add support for detecting piped input on the server side: ``` bcp \u003C filename ``` because this would allow for things like ``` cat filename | gzip | bcp ``` with the…",{"value":151,"source":69,"evidence":152},"Fix endianness and int size portability issues.",[153],{"id":116,"by":117,"text":118},{"value":155,"source":69,"evidence":156},"Use multicast for discovery and reverse the client-server roles.",[157],{"id":158,"by":159,"text":160},"5231890","abcd_f","Nice. Very Unix-ish in its spirit. The client-server arrangement is backwards though :) Typical arrangement is for the clients to do the \"anyone there?\" broadcast, for the…",[162,166],{"value":163,"source":69,"evidence":164},"Why is the server the one connecting to the client?",[165],{"id":158,"by":159,"text":160},{"value":167,"source":69,"evidence":168},"Does it work on OSX, and how does it compare with ncp?",[169,173],{"id":170,"by":171,"text":172},"5234657","RookToH7","I couldn't seem to get this compiled on OSX :( Do you (or anyone) know if there's a OSX version available? What I like about ncp is that it first requires an action at the sender…",{"id":174,"by":11,"text":175},"5232515","I made it because with the nc solution, it still required knowing the hostname. I now see though that ncp (http:\u002F\u002Fwww.fefe.de\u002Fncp\u002F) would have probably sufficed, though it is a…",[177,181,188,195,202,209],{"value":178,"source":69,"evidence":179},"netcat (nc) with a pipe",[180],{"id":104,"by":105,"text":106},{"value":182,"source":69,"evidence":183},"ncp",[184],{"id":185,"by":186,"text":187},"5231877","froseph","It reminds me of http:\u002F\u002Fwww.fefe.de\u002Fncp\u002F It's always interesting when people come up with the same thing independently.",{"value":189,"source":69,"evidence":190},"scp",[191],{"id":192,"by":193,"text":194},"5232134","huhsamovar","$ scp file host.example.com:",{"value":196,"source":69,"evidence":197},"udpcast",[198],{"id":199,"by":200,"text":201},"5232661","kylecordes","Udpcast: http:\u002F\u002Fwww.udpcast.linux.lu\u002F Can do this and other related useful things, including multicast of a file to N machines in parallel. Don't let the UDP bother you: it…",{"value":203,"source":69,"evidence":204},"UFTP",[205],{"id":206,"by":207,"text":208},"5233312","julian37","There's also UFTP, it doesn't require the receiver to know the file name. (But it is different from your implementation in a number of ways, most importantly it transfers all…",{"value":210,"source":69,"evidence":211},"Synergy drag-and-drop",[212],{"id":213,"by":11,"text":214},"5232413","If that doesn't already exist for synergy (http:\u002F\u002Fsynergy-foss.org\u002F), that would be an awesome addition.",{"comments":216,"answered":38,"key":217},24,[218,219,222],{"id":64,"text":65},{"id":220,"text":221},"5232808","1. In general, I am on the computer I want to send from, then I go to the computer I want to receive on. This script seems to require I be at the receiving computer first. Is…",{"id":223,"text":224},"5233198","Doesn't seem to work for me sender$ tar -c awesome.jpg | nc -l 0.0.0.0 12345 (waiting forever) recipient$ nc 255.255.255.255 12345 | tar -x tar: This does not look like a tar…",{"commenters":226,"max_depth":34,"maker_replies":216,"first_comment_mins":227,"lifespan_hours":228},53,101,90,[230,232,235,238,240,244,247,249,250,252,254,256,258,259,261,262,265,266,270,273,274,276,278,280,283,286,290,293,296,299,302,303,306,309,312,313,315,318,320,322,324,325,328,330,333,334,336,337,338,340,341,342,345,347,349,353,356,359,362,366,370,374,377,380,382,385,388,390,394,396,399,401,405,407,411,413,418,421,425,427,429,432,435,436,439,441,443,445,447,450,453,455],[104,40,46,231,105,40],"project\u002Fcritical\u002Fidea",[233,40,40,234,109,40],"5231965","commenter\u002Fneutral\u002Fnone",[236,40,40,234,237,40],"5232069","HorizonXP",[239,40,40,234,109,40],"5232120",[241,40,40,242,243,40],"5232265","commenter\u002Fneutral\u002Fperformance","blibble",[245,40,40,242,246,40],"5232408","1337p337",[95,40,41,248,96,40],"maker\u002Fpositive\u002Fidea",[108,40,46,231,109,40],[64,40,40,251,11,46],"project\u002Fneutral\u002Fidea",[253,40,40,234,109,40],"5232586",[84,40,41,255,85,40],"project\u002Fpositive\u002Fidea",[257,40,40,234,109,40],"5232784",[220,40,40,234,11,46],[260,40,40,234,109,40],"5232920",[223,40,40,234,11,46],[263,40,40,234,264,40],"5235349","bluehex",[132,40,46,231,133,40],[267,40,46,268,269,40],"5232504","maker\u002Fcritical\u002Fidea","larrys",[271,40,40,272,11,46],"5232533","maker\u002Fneutral\u002Fnone",[174,40,40,251,11,46],[275,40,40,234,109,40],"5232613",[72,40,46,277,73,40],"project\u002Fcritical\u002Fexecution",[279,40,40,272,11,46],"5232452",[281,40,40,234,282,40],"5232519","zomgbbq",[284,40,40,234,285,40],"5233318","tedunangst",[287,40,40,288,289,40],"5233820","other\u002Fneutral\u002Fnone","timothybone",[291,40,40,234,292,40],"5234377","vacri",[294,40,40,288,295,40],"5231984","sigjuice",[297,40,46,277,298,40],"5232164","huhtenberg",[300,40,46,231,301,40],"5232277","Dylan16807",[56,40,40,251,11,46],[304,40,40,234,305,40],"5232604","lucb1e",[307,40,40,288,308,40],"5232938","meaty",[310,40,40,234,311,40],"5233842","randomracker",[116,46,46,277,117,40],[314,46,40,272,11,46],"5232405",[316,46,33,317,73,40],"5232431","project\u002Fmixed\u002Fprivacy",[319,46,40,272,11,46],"5232453",[199,321,33,251,200,40],2,[323,321,40,251,11,46],"5232793",[206,321,33,251,207,40],[326,321,40,234,327,40],"5233819","songgao",[158,33,33,329,159,40],"project\u002Fmixed\u002Fexecution",[331,33,40,332,11,46],"5232397","project\u002Fneutral\u002Fexecution",[140,31,33,251,89,40],[335,31,40,251,11,46],"5232400",[88,31,41,255,89,40],[185,41,33,251,186,40],[339,41,40,251,11,46],"5232446",[170,41,46,277,171,40],[147,38,33,251,148,40],[343,38,40,234,344,40],"5232678","lutusp",[346,38,40,234,298,40],"5232713",[348,38,40,255,11,46],"5232816",[350,351,40,288,352,40],"5232151",7,"cowmix",[354,351,40,234,355,40],"5232217","ajross",[357,351,40,234,358,40],"5233409","jbert",[360,351,40,288,361,40],"5232592","nbkolchin",[363,364,40,288,365,40],"5232258",8,"xal",[367,368,40,288,369,40],"5233993",9,"f1codz",[371,372,33,329,373,40],"5231858",10,"jamescun",[375,372,40,376,117,40],"5232216","commenter\u002Fneutral\u002Fexecution",[378,34,33,251,379,40],"5232402","dudurocha",[213,34,40,381,11,46],"other\u002Fneutral\u002Fidea",[383,34,40,288,384,40],"5232639","readme",[386,34,40,387,159,40],"5233133","other\u002Fcritical\u002Fidea",[389,34,40,381,11,46],"5233219",[391,18,33,392,393,40],"5232060","project\u002Fneutral\u002Fdocs","pyre",[395,18,33,392,89,40],"5232139",[397,18,40,398,393,40],"5232728","commenter\u002Fneutral\u002Fdocs",[400,18,40,392,11,46],"5232414",[402,403,33,251,404,40],"5232445",13,"dredmorbius",[406,403,40,392,11,46],"5232500",[408,409,33,251,410,40],"5232428",14,"blt",[412,409,40,251,11,46],"5232441",[414,415,33,416,417,40],"5232301",15,"project\u002Fneutral\u002Fnone","donflamenco",[419,32,33,392,420,40],"5232600","sebkomianos",[422,423,33,251,424,40],"5232275",17,"dschiptsov",[192,426,46,231,193,40],18,[123,426,33,428,109,40],"project\u002Fneutral\u002Fperformance",[430,426,33,428,431,40],"5232393","misframer",[433,426,40,242,434,40],"5232497","halayli",[126,426,40,242,11,46],[437,426,40,242,438,40],"5232783","andrewcooke",[440,426,40,242,11,46],"5232850",[442,426,40,242,438,40],"5232945",[444,426,40,242,11,46],"5233216",[446,426,40,251,11,46],"5232434",[448,426,46,277,449,40],"5233686","mjschultz",[451,426,33,251,452,40],"5234327","bdunbar",[454,426,40,251,11,46],"5235226",[456,426,41,255,452,40],"5249403",[],[459,464,469,474,479,484],{"id":460,"name":461,"points":462,"category":463},"5238537","What colour is your IP address?",208,"other",{"id":465,"name":466,"points":467,"category":468},"5244456","TextRazor",118,"ai",{"id":470,"name":471,"points":472,"category":473},"5251361","importd",116,"languages",{"id":475,"name":476,"points":477,"category":478},"5216992","Semantics3",108,"data",{"id":480,"name":481,"points":482,"category":483},"5231435","Docracy Mobile Privacy Policy",106,"learning_science",{"id":485,"name":486,"points":487,"category":20},"5237979","browser-details",93,false,"v2",{"id":491,"name":5,"line":6,"ai":488,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":492,"top":18,"kw":493,"maker":11,"domain":10,"tier":19,"attempts":40,"strip":494,"url":9,"mix":495,"praise":81,"objection":101,"sub":21},5231487,-0.19,[24,25,26,27],"1003500101001101333351300033030333130015",[31,32,33,34],1793990890969]