Dsy Network www | forum | my | didattica | howto | wiki | el goog | stats | blog | dona | rappresentanti
Homepage
 Register   Calendar   Members  Faq   Search  Logout 
.dsy:it. : Powered by vBulletin version 2.3.1 .dsy:it. > Didattica > Corsi N - Z > Sistemi operativi I > Esame di laboratorio (Giugno 2007) - Domande Thread Rating: 3 votes, 5.00 average.
Pages (571): « First ... « 90 91 92 93 [94] 95 96 97 98 » ... Last »   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
Vid
.interista.

User info:
Registered: Jan 2004
Posts: 8 (0.00 al dì)
Location: Milano
Corso: Informatica
Anno: n(lg n)
Time Online: 8:56:53 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Anch'io stavo sbattendo la testa su cpdir ma non riesc oa farlo funzionare come voglio.

Personalmente ho risolto anch'io tramite il seguente script (tipo di esercizio: copiare file che inziano con un certo pattern da un ramo del FS ad un altro, mantenendo la struttura delle dir):

--------

#!/usr/bin/sh
# uso: <nomescript> origine destinazione pattern

for i in $(find $1 -type d) # dir del ramo passato come arg 1
do
mkdir -p "$2/$i" # ricrea la struttura nel path passato come arg 2
done
for j in $(find $1 -type f -name "$3*") #i files da copiare
do
cp "$j" "$2/$j"
done

----------

La soluzione però non mi piace per più motivi, fra tutti il fatto che ricreo la struttura del ramo scelto partendo comunque da / e che creo anche directory vuote. Se qualcuno riuscisse a usare cpdir...

Poi, tornando al problema dei files eseguibili, credo che la soluzione che prevede ls -F abbia un problema: provate a fare un touch "prova*", il file non sarà eseguibile ma verrà comunque incluso dallo script.

18-07-2007 15:18
Click Here to See the Profile for Vid Click here to Send Vid a Private Message Find more posts by Vid Add Vid to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 14:02.    Post New Thread    Post A Reply
Pages (571): « First ... « 90 91 92 93 [94] 95 96 97 98 » ... Last »   Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread | Add to Bookmarks

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

Powered by: vBulletin v2.3.1 - Copyright ©2000 - 2002, Jelsoft Enterprises Limited
Mantained by dsy crew (email) | Collabora con noi | Segnalaci un bug | Archive | Regolamento | Licenze | Thanks | Syndacate
Pagina generata in 0.106 seconds (36.00% PHP - 64.00% MySQL) con 22 query.