0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

MacOS X 10.4でファイル転送

Last updated at Posted at 2023-09-17

我が家では10.4のiBook Dual-USBがありCDのリッピングなどでまだまだ現役です。

リッピングしたファイルを他のホストにコピーするには以下のような方法があります。

  • scp
  • ftp
  • tftp
  • nc

USBメディアを使う方法もありますが、USB 1なので激遅です。

scpはNetBSD 10とは鍵交換が失敗して通信できません。

ftpやtftpは設定が面倒です。

ここはncの出番です。

受け取るホストで

nc -l 8000 > hoge.tar

したあと10.4で

nc 10.0.1.41 8000 < hoge.tar

します。EOFの処理が出来ないようなのでファイルサイズを確認して終ったら^Cします。

mp3のようなファイルは圧縮されているので、gzipなどで圧縮しないほうが良いです。

ファイルが正しいか心配だったらmd5してみるのも良いかもしれません。

WiFi経由で40Mのファイルの転送が10分くらいでした。

EOFでcloseしなくて不便なのでOpenBSD版のncを使うことにしました。

tarを標準入出力で使ってncする方法もあります。

受け側

$ nc -l 8000 | tar xf -

送り側

$ COPY_EXTENDED_ATTRIBUTES_DISABLE=1 tar cf - --exclude ".DS_Store" * | ~/netcat-openbsd-mac-master/nc 10.0.1.41 8000

10.5以降ではCOPY_EXTENDED_ATTRIBUTES_DISABLEではなくCOPYFILE_DISABLEのようです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?