mktree

command
v0.0.0-...-0f47780 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2014 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Command mktree creates a file tree out of tree output read from standard input. The support format is output from gotree or Unix tree commands.

Usage

NAME:
  mktree - mirrors a file tree when pipped to gotree command

USAGE:
  mktree [OPTION]... [FILE]

OPTIONS:
  -a          Creates also hidden files and directories
  -o <dir=.>  Destination directory - defaults to current directory
  -d          Create directories only
  -h          Print usage information
  FILE        Read tree output from the file instead of standard input

Example

The following example mirrors file tree of tools/fs package under /tmp/mktree directory.

src/github.com/rjeczalik/tools/fs $ gotree
.
├── fs.go
├── fsutil
│   ├── fsutil.go
│   ├── fsutil_test.go
│   ├── tee.go
│   └── tee_test.go
└── memfs
    ├── memfs.go
    ├── memfs_test.go
    ├── tree.go
    ├── tree_test.go
    ├── util.go
    └── util_test.go

2 directories, 11 files
src/github.com/rjeczalik/tools/fs $ gotree | mktree -o /tmp/mktree
src/github.com/rjeczalik/tools/fs $ gotree /tmp/mktree
/tmp/mktree/.
├── fs.go
├── fsutil
│   ├── fsutil.go
│   ├── fsutil_test.go
│   ├── tee.go
│   └── tee_test.go
└── memfs
    ├── memfs.go
    ├── memfs_test.go
    ├── tree.go
    ├── tree_test.go
    ├── util.go
    └── util_test.go

2 directories, 11 files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL