gbook / nidb

NeuroInformatics Database
GNU General Public License v3.0
26 stars 8 forks source link

datarequests.pl: "Argument list too long" #59

Closed andersonwinkler closed 6 years ago

andersonwinkler commented 6 years ago

The following is appearing on the datarequests*.log:

[07/22/2018 17:28:04][pid 21008] cp /nidb/archive/S7991MYW/1/3/dicom/* /home/julia/S7991MYW1/1 (sh: /usr/bin/cp: Argument list too long
)

and the destination directory is then empty.

The series in question have 31008 files. Perhaps xargs could be a solution.

andersonwinkler commented 6 years ago

Maybe simpler than xargs: perhaps drop the asterisk and copy the 'dicom' directory directly into the series, in this case '1' (thus no need to create the directory '1' beforehand).

gbook commented 6 years ago

That's a lot of files! But not a preposterous amount. We'll fix it

andersonwinkler commented 6 years ago

Thanks! These are multi-echo sequences, hence that many files. Also will need a wrapper around dcm2niix to sort the echoes. I should have this one soon...

gbook commented 6 years ago

So this is only happening in the datarequest.pl?

andersonwinkler commented 6 years ago

I think so, it's the only place I've seen it... Maybe other locations that list or do operations on all files may also be affected, not sure... Thanks!

gbook commented 6 years ago

Should be fixed now