0

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.

Regards
Boshu

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by boshu
0

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

a
c
z/za
z/zx

Now copy the files:

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

The directory structure is retained as needed.

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

0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.