S
S
Sergey2018-02-02 13:05:26
linux
Sergey, 2018-02-02 13:05:26

Linux copy files excluding files by list?

You need to copy files using the exclusion file ignor.list
ignor.list file contents
3.mp3
4.mp3
6.mp3
To get it like this

dir1                       dir2 
1.mp3                  1.mp3
2.mp3                  2.mp3
3.mp3                  5.mp3
4.mp3                  7.mp3
5.mp3
6.mp3 
7.mp3

There are also pitfalls in the file names for example (DJ KUBA-NE!TAN - Party On!.mp3, DAVE ARMSTRONG - Make Your Move (Part 2).mp3, LMFAO - Sexy & I Know It.mp3, QUINTINO-CHEAT CODES - Can't Fight It.mp3)
Fortunately, the ignor.list list is small and I edit it manually and enter records like this is not a problem (LMFAO\ -\ Sexy\ \&\ I\ Know\ It.mp3)
ps You can use any means cp, find, rsync, scripts, the main thing is to complete the task

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2018-02-02
@Raschen

works, I forgot to mention that existing files are skipped and not overwritten

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question