Dovrebbe bastare:
In pratica find cerca in /home/portali tutte le directory che hanno mindepth 1 (in pratica esclude il .) e maxdepth 1 (evita di restituire /home/portali/pippo/subdirectory) e passa l'argomento a exec che copierà /home/iltuoutente/iltuofile nella directory.codice:RADICE_DESTINAZIONE = '/home/portali/'; NOME_FILE = '/home/iltuoutente/iltuofile'; find $RADICE_DESTINAZIONE -mindepth 1 -maxdepth 1 -type d -exec cp $NOMEFILE {} \;
Ciao