I'm not allowed to use rsync on the cluster I'm working on so I need to use things like
find etc. I want to copy a large directory including all files and subfolders etc. while ignoring, i.e. not copying any files that for example have the names "file1", "file2" or "file3".
I saw this post on SO which allows me to include only certain files. I want basically that but I want to exclude certain files.
I also tried this solution
but when I tried a command using
tar which was suggested there I get the error
tar: This does not look like a tar archive and
tar: Cowardly refusing to create an empty archive
I also tried
cp !(filename-to-ignore) new_dir/ from this post but this doesn't copy the subfolders.
I'm a beginner with bash so if you could explain your answer and what the flags etc. do that would really be helpfull, I've been trying forever now, on what I think shouldn't be that hard to do.