Skip to content

Instantly share code, notes, and snippets.

@okdistribute
Last active March 27, 2016 03:53
Show Gist options
  • Select an option

  • Save okdistribute/4211e3d81ce2e04fdf95 to your computer and use it in GitHub Desktop.

Select an option

Save okdistribute/4211e3d81ce2e04fdf95 to your computer and use it in GitHub Desktop.
daemon dynamic feed

Create two new dat repository (dynamic) links using init.

$ dat init ~/data/finances
dat://eb32sd9382sd38329s4
$ dat init ~/data/census/2010
dat://736a88b8176c917a9c0

They are served in a daemon.

$ dat status
dat://eb32sd9382sd38329s4   /Users/karissa/data/finances       
dat://736a88b8176c917a9c0   /Users/karissa/data/census/2010     

Stop serving a dat, but doesn't remove file contents

$ dat rm dat://eb32sd9382sd38329s
$ dat status
dat://eb32sd9382sd38329s4   /Users/karissa/data/census/2010     

on a peer

Use dat to download the link.

$ dat dat://736a88b8176c917a9c0
Downloading...
done downloading to '2010'.

It downloads to the directory the same as in the current 1.0, using the relative path:

$ ls
2010/

And hosts it in the daemon:

$ dat status
dat://736a88b8176c917a9c0   /path/to/here/2010 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment