Skip to content

Latest commit

 

History

History

01

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

1 - Dat Cli

A distributed data community

Playing with the CLI

$ npm install -g dat

Sharing files

Warming up. Let's do a quick tour through dat CLI features. To do this, we are going to share some content, change it and then syncronize it. Also, we will see how can we get specific content.

dat share

Dat comes with a share command which can be used to share entire directories.

dat sync

The ogher side of the story is download. To do this we are going to use the clone feature. To know what data we are going to download we need an address, or dat link.

Exercise

We will make groups of 2 people (at least) 😺 😸.

Along with this readme you will find a directory called /cool_cats with some high value content to share 😆.

1- Sharing

One of you (let's say A member) in the group will be in charge of sharing our directory called /cool_cats.

2 - Cloning

The other buddy (the B member) will be cloning the dat using the dat link.

3 - Creating new content

Now A, will create a new file inside our shared directory called top_secret.md.

Some sample content:

# TOP SECRET

> This file will be destroyed in 5 seconds.

Also it is being distributed. :cool:

4 - Getting updates

To get new updates we can run the pull command.

5 - What happens if the A member updates the file?

😉 sync

Extra

  1. What if we share our dat link with a new computer and they only want to get the top_secret.md file?

Tip

  1. We can combine the sparse option with the special file .datdownload.