New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[script] spostare file da molte cartelle a una sola usando regex #175
Comments
@pigreco hai guardato la guida di fd? Devi usarlo in questa modalità https://github.com/sharkdp/fd#parallel-command-execution Fai dei test su una cartella di test con qualche file. E se va, poi applica. |
Ok, visto che mi hai scritto che non è chiaro quanto riportato, aggiungo qualche elemento. Due cose:
Se ad esempio ai una cartella con dei CSV, e in questa hai la sottocartella fd "^.+([A-Z]+[0-9]+|[A-Z])-particelle.csv$" -x cp {/} ./out |
Perché nel tuo caso hai cartelle e sotto cartelle, quindi gli stai dicendo, dalla cartella in cui sei Ma non c'è Se leggi la guida, c'è anche
|
@aborruso quello che mi serve è
Funziona!!! :-) Grazie! |
@aborruso grazie |
In una cartella ho tre sottocartelle e per ognuna ho
n
sottocartelle; per ogni cartelle , a livello più basso, ho molti file con nomi e estensioni diversi (csv, txt, json): tramite l'utility fd ho individuato i file che mi interessano:fd "^.+([A-Z]+[0-9]+|[A-Z])-particelle.csv$"
questi file vorrei spostarli in un'altra cartella e per farlo ho provato a usare il comando
mv
:mv fd "^.+([A-Z]+[0-9]+|[A-Z])-particelle.csv$" miaCartella
ma restituisce un errore:
come potrei risolvere?
The text was updated successfully, but these errors were encountered: