github.com/keltia/go-ipfs@v0.3.8-0.20150909044612-210793031c63/assets/init-doc/quick-start (about)

     1  # 0.1 - Quick Start
     2  
     3  This is a set of short examples with minimal explanation. It is meant as
     4  a "quick start". Soon, we'll write a longer tour :-)
     5  
     6  
     7  Add a file to ipfs:
     8  
     9    echo "hello world" >hello
    10    ipfs add hello
    11  
    12  
    13  View it:
    14  
    15    ipfs cat <the-hash-you-got-here>
    16  
    17  
    18  Try a directory:
    19  
    20    mkdir foo
    21    mkdir foo/bar
    22    echo "baz" > foo/baz
    23    echo "baz" > foo/bar/baz
    24    ipfs add -r foo
    25  
    26  
    27  View things:
    28  
    29    ipfs ls <the-hash-here>
    30    ipfs ls <the-hash-here>/bar
    31    ipfs cat <the-hash-here>/baz
    32    ipfs cat <the-hash-here>/bar/baz
    33    ipfs cat <the-hash-here>/bar
    34    ipfs ls <the-hash-here>/baz
    35  
    36  
    37  References:
    38  
    39    ipfs refs <the-hash-here>
    40    ipfs refs -r <the-hash-here>
    41    ipfs refs --help
    42  
    43  
    44  Get:
    45  
    46    ipfs get <the-hash-here> foo2
    47    diff foo foo2
    48  
    49  
    50  Objects:
    51  
    52    ipfs object get <the-hash-here>
    53    ipfs object get <the-hash-here>/foo2
    54    ipfs object --help
    55  
    56  
    57  Pin + GC:
    58  
    59    ipfs pin -r <the-hash-here>
    60    ipfs gc
    61    ipfs ls <the-hash-here>
    62    ipfs unpin -r <the-hash-here>
    63    ipfs gc
    64  
    65  
    66  Daemon:
    67  
    68    ipfs daemon  (in another terminal)
    69    ipfs id
    70  
    71  
    72  Network:
    73  
    74    (must be online)
    75    ipfs swarm peers
    76    ipfs id
    77    ipfs cat <hash-of-remote-object>
    78  
    79  
    80  Mount:
    81  
    82    (warning: fuse is finicky!)
    83    ipfs mount
    84    cd /ipfs/<
    85  
    86  
    87  Tool:
    88  
    89    ipfs version
    90    ipfs update
    91    ipfs commands
    92    ipfs config --help
    93    open http://localhost:5001/webui
    94  
    95  
    96  Browse:
    97  
    98    webui:
    99  
   100      http://localhost:5001/webui
   101  
   102    video:
   103  
   104      http://localhost:8080/ipfs/QmVc6zuAneKJzicnJpfrqCH9gSy6bz54JhcypfJYhGUFQu/play#/ipfs/QmTKZgRNwDNZwHtJSjCp6r5FYefzpULfy37JvMt9DwvXse
   105  
   106    images:
   107  
   108      http://localhost:8080/ipfs/QmZpc3HvfjEXvLWGQPWbHk3AjD5j8NEN4gmFN8Jmrd5g83/cs
   109  
   110    markdown renderer app:
   111  
   112      http://localhost:8080/ipfs/QmX7M9CiYXjVeFnkfVGf3y5ixTZ2ACeSGyL1vBJY1HvQPp/mdown