Hi There

I am building some SW modules in Linux environment and at the end of a build the artifacts are stored in the env in a particular folder called HW.

This HW folder contains a number of folders underneath for individual targets and those contains one or more folders and files underneath.

Once the build is done I need to copy certain files and folders from the HW folder to a shared drive in another server.

The number of files and folders that need to be copied every time are the same.
At the moment I am doing it manually since I have no idea how to automate this.

Any hints or advise in this regard would be highly appreciated.


Edit ~/HW_files. Put the path to each filename and dirname you want to save in it, one file/dir per line, relative to the HW dir. For example, suppose HW contains files a, b, c and d and directories x, y and z, and z contains files za, zb, zc and dirs zx and zy. Suppose you want to save a, c, za and zx. You would put in the file


Now copy the files:

# '...' is the path to the HW directory
pushdir .../HW
tar cvf - -T ~/HW_files | tar xvf - -C /remote_dir

The directory structure is retained as needed.

Note: do not include the line numbers; those are generated by this forum.

Thanks a lot for the guidance. At least this is a good start for me. I shall try this out and get back...

Many thanks again