Pregunta

I have a problem in which I have a directory called psp (level 0) full of a bunch of folders (level 1) each containing two or three folders (level 4) Containing a couple of .pseudo files (they are just text files) and a .tar.gz file.

The program I want to run (dacapo) needs to have all of those .pseudo files in the psp directory.

Hence, I need somehow get all the .pseudo files into that directory.

I should note that the whole file structure started out as a .tar.gz file. You can find it here: http://wiki.fysik.dtu.dk/dacapo-files/campos-dacapo-pseudopotentials-1.tar.gz

¿Fue útil?

Solución

Assuming your in a unix environment, you could try something like

for m in `find . -name '*.pseudo'`;do cp $m ./psp;done

For further debugging purposes, you can put echo in front of "cp" and you'd see what commands would get run - in a sort of dry run...

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top