README.md 1.9 KB
Newer Older
Bjoern Broetz's avatar
Bjoern Broetz committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
# linkbaum

Create a link tree that mirrors a given base folder with all content.
Directories are real, files are links.

# usage

```
 linkbaum.py [-h] [-s BASEDIR] [-t TARGETDIR] [-c CUTDIR]

Create a link tree that mirrors a given base folder with all content.
Directories are real, files are links.

optional arguments:
  -h, --help            show this help message and exit
  -s BASEDIR, --source BASEDIR
                        base folder
  -t TARGETDIR, --target TARGETDIR
                        target folder
  -c CUTDIR, --cutdir CUTDIR
                        folder in the basetree from which the target tree
                        shall start
```

E.g.: 

```
python linkbaum.py -s ./tests/testfolder/ -t ./tests/target/ -c testfolder
```
creates a linktree copy of the original tree

```
tests/
├── target
│   └── testfolder
│       ├── sub1
Bjoern Broetz's avatar
Bjoern Broetz committed
37 38 39
│       │   ├── file1 -> /home/USER/dev/linkbaum/tests/testfolder/sub1/file1
│       │   ├── file2 -> /home/USER/dev/linkbaum/tests/testfolder/sub1/file2
│       │   └── file3 -> /home/USER/dev/linkbaum/tests/testfolder/sub1/file3
Bjoern Broetz's avatar
Bjoern Broetz committed
40
│       ├── sub2
Bjoern Broetz's avatar
Bjoern Broetz committed
41 42
│       │   ├── file1 -> /home/USER/dev/linkbaum/tests/testfolder/sub2/file1
│       │   └── file2 -> /home/USER/dev/linkbaum/tests/testfolder/sub2/file2
Bjoern Broetz's avatar
Bjoern Broetz committed
43
│       └── sub3
Bjoern Broetz's avatar
Bjoern Broetz committed
44 45 46
│           ├── file1 -> /home/USER/dev/linkbaum/tests/testfolder/sub3/file1
│           ├── file2 -> /home/USER/dev/linkbaum/tests/testfolder/sub3/file2
│           └── file3 -> /home/USER/dev/linkbaum/tests/testfolder/sub3/file3
Bjoern Broetz's avatar
Bjoern Broetz committed
47 48 49 50 51 52 53 54 55 56 57 58 59 60
└── testfolder
    ├── sub1
    │   ├── file1
    │   ├── file2
    │   └── file3
    ├── sub2
    │   ├── file1
    │   └── file2
    └── sub3
        ├── file1
        ├── file2
        └── file3

```