1

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

Robby Cornelissen
  • 91,784
  • 22
  • 134
  • 156
Alex Eftimiades
  • 2,527
  • 3
  • 24
  • 33

1 Answers1

2

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...

Stephen
  • 3,341
  • 1
  • 22
  • 21
  • For the record, my psp directory is in /opt/dacapo. That seemed to work fine. Thank you for answering--that saved me a LOT of time! – Alex Eftimiades Aug 10 '11 at 20:42