I have a root directory which has a big number of other subdirectories and contains a big number of files. I want to copy all these files and directories to another folder except files with certain extension, say .txt, files - how may I do this?
But cpio is for archived files. I just want to copy all files and folders from source to destination, keeping the oder, without files with extension .exe, say. I do have some tar files in the source directory but I want to copy them as they are.
Thanks for this thread and for this forum. I loved it the first time I browsed it.
I tried Annihilannic reply and it worked like a charm. I tried to do this, but it did not work:
That doesn't work because scp does not accept a list of filenames from standard input.
To copy the files to another system it's better to convert the files into a stream format of some kind, such as a cpio or tar archive, pipe them through an ssh connection, and then extract them from the stream at the other end, e.g.