Monday, June 25, 2007

Transfering multiple files with netcat

Today I needed to backup some files from one server to another. The servers sit next to one another on the network. Usually I use scp or rsync to move files around, but today I felt like trying something different.

First I considered using FTP. However, I do not like running FTP servers and didn't feel like configuring the daemon.

Then I thought of netcat. A quick Google search got me this page: http://www.oreillynet.com/pub/h/1058

However I want to transfer multiple files (all in the same directory). So I decided to use tar, and instead of creating a file, I would pipe it's output through netcat.

On the Receiving Computer (Server):
nc -v -w 30 -p 5600 -l | tar -x


And on the Sending Computer (Client):
tar -c * | netcat -v -w 2 10.0.0.2 5600;


The files transfered fast (2 min 20 seconds for 1.6 Gigs). I ran a md5sum on the client and server to confirm, and everything was perfect.

4 comments:

Unknown said...


Ba người hắc ám tử sĩ trong nháy mắt đã xuất hiện ở ba địa phương khác nhau, trong tay một hắc mang ngưng tụ đánh về phía Nhạc Thành.

Tốc độ nhanh như vậy khiến cho Nhạc Cốc trưởng lão, Nhạc Liệt trưởng lão cùng chúng nhân của Tứ Đại Nhân Tộc cũng lo lắng không thôi, một cái màn màu đen đã che lên trên người của Nhạc Thành.

Chẳng qua ldongtam
game mu
cho thue phong tro
http://nhatroso.com/
nhac san cuc manh
tổng đài tư vấn luật
http://dichvu.tuvanphapluattructuyen.com/
văn phòng luật
tổng đài tư vấn pháp luật
thành lập công ty
http://we-cooking.com/
chém gió
trung tâm ngoại ngữúc này chúng nữ cùng với Nhạc Tử Phong, Nhạc Tử Sơn, Nhạc Long, Nhạc Kiều bọn họ không hề lo lắng, vì bọn họ đã biết Nhạc Thành đã đột phá tới Đâu Đế, ba người này không thể chống lại.

Cái võng màu đen trùm lên trên người của Nhạc Thành, thân ảnh của hắn từ từ biến mất trên bầu trời, dĩ nhiên là một đạo ảo ảnh, Nhạc Thành đã biến mất ngay tại chỗ ,tốc độ so với ba người hắc ám tử sĩ còn nhanh hơn.

Lúc này ba người hắc ám tử sĩ mới phát hiện ra thứ mà bọn chúng vây khốn chỉ là ảo ảnh mà thôi, còn Nhạc Thành đã xuất hiện ở bên ngoài vài trăm thước.

- U Minh Quỷ trảo.

Ở bên trái Nhạc Thành, một hắc ám tử sĩ xuất hiện, hai tay

Unknown said...

What are the best casinos to play in 2021?
Which casinos offer slots? — Casino Sites. Best casino sites are หาเงินออนไลน์ those that allow players to try a game casinosites.one from anywhere. The most common online 토토 slots kadangpintar

Unknown said...

No Deposit Bonus Casinos 2021 - Win Real Money at US
We list 10 best online งานออนไลน์ casinos with no deposit bonuses wooricasinos.info in the US. 토토사이트 Find the nba매니아 best USA no deposit bonus codes and get your free spins https://septcasino.com/review/merit-casino/

kalolowadlow said...

Everything you're keen on|you like} about a on line casino is here, from poker to fit video games. That stated, it’s a web-based on line casino that positively knows of} what gamers are on the lookout for – and by that, we mean the most effective on line casino bonuses you’ll discover out of all free slots sites. Playing on-line slots at no cost merely requires you to go to any site from our listing and 카지노 open the game. However, for the sake of gamers who wish to create an account first, we’ve created a quick information below that’ll assist you to get started at Ignition.