Assuming this tree (top-X & tX-sub-X are folders, and all sub-folder containing a .csv and various other file extensions.)
Base
├── top-1
│ ├── t1_sub-1
│ ├── t1_sub-2
│ └── t1_sub-3
│
└── top-2
├── t2_sub-1
├── t2_sub-2
└── t2_sub-3
and all sub-folder containing a .csv and various other file extensions.
can I symlink all .csv in base to another tree amd have this:
Symlinked_base
├── top-1 #directories aren't symlink
│ ├── t1_sub-1 #contains only .csv symlink
│ ├── t1_sub-2
│ └── t1_sub-3
│
└── top-2
├── t2_sub-1
├── t2_sub-2
└── t2_sub-3
I can't test it now but would:
sudo find . -name "*.csv" -exec cp -Rs '{}' /path/to/Symlinked_base/
if -R is unsupported, would the following work? :
sudo find . -name "*.csv" -exec cp -parents -s '{}' /path/to/Symlinked_base/
t1_sub-1
inBase
andSymlinked_base
? Is that a directory or a file? – Valentin Bajrami Jun 1 '18 at 12:08