0

Let's say I have 7000+ directories somewhere, each of which contains subdirectories and some files. I am only interested in a small proportion (maybe 700+) of the 7k+ directories, and I have the names of these directories. I want to copy only the 700+ directories together with their contents to a new location. How can I do that? Thanks a lot in advance!

1 Answer 1

0

The answer to this depends entirely upon how you have formatted your your list of directories, mostly depending upon the delimiter. Assuming it is a file seperated by newlines: cat directories.txt | while read line; do mv $line /path/to/destination; done

`

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .