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 (39): « First ... « 11 12 13 14 [15] 16 17 18 19 » ... Last »   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
bog86
.consigliere.

User info:
Registered: Jan 2006
Posts: 117 (0.02 al dì)
Location:
Corso: Informatica
Anno: 3
Time Online: 1 Day, 23:03:56 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
Re: domandina

Originally posted by marcolino78
Ciao gente,
piccola domandina???
Durante un esame di lab è stato chiesto di:

copiare una directory mantenendo la struttura delle sottodirectory e i permessi, evitando però di copiare il contenuto delle cartelle(i file che all'interno che non sono directory)

Aiutoooo?!?!?!?!

Idee???


Ma se volessimo copiare anche i file basterebbe un cpdir -pR dir1 dir2???

27-09-2007 09:14
Click Here to See the Profile for bog86 Click here to Send bog86 a Private Message Find more posts by bog86 Add bog86 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
banjoo
state bboni!!!

User info:
Registered: Oct 2005
Posts: 19 (0.00 al dì)
Location:
Corso: Informatica
Anno: 2
Time Online: 15:20:05: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by bog86
Non mi funziona in nessuno modo! con . /root/nfile si impalla, con ./nfile nomi.txt dice no such file or directory...
come si fa allora?? help!!!!!


Ma il file ha estensione txt???

Allora, se ti sei loggato con root ti trovi di default nella dir /root, quindi tutto il tuo lavoro verràè salvato qui. Esegui:

elvis nomefile, crei lo script, lo salvi ed esci.
Controlla con ls se esiste nella dir.
chmod 755 nomefile
./nomefile

oppure

./nomefile nomesorgente -->se devi usare un file esterno come sorgente dati

nota che tra ./nomefile NON CI SONO SPAZI. ./ ti serve per dirgli di lavorare sulla directory corrente.

27-09-2007 09:38
Click Here to See the Profile for banjoo Click here to Send banjoo a Private Message Find more posts by banjoo Add banjoo to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
alien
.arcimaestro.

User info:
Registered: Dec 2004
Posts: 313 (0.04 al dì)
Location: milano
Corso: Informatica
Anno:
Time Online: 4 Days, 15:54:55 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Scusate l'ignoranza ma non ho seguito lezione di laboratorio,quindi non so dove si trova "aula Palestra di Sistemi Operativi"!
Grazie

27-09-2007 11:23
Click Here to See the Profile for alien Click here to Send alien a Private Message Find more posts by alien Add alien to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
bog86
.consigliere.

User info:
Registered: Jan 2006
Posts: 117 (0.02 al dì)
Location:
Corso: Informatica
Anno: 3
Time Online: 1 Day, 23:03:56 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
Re: X jeremy.1983

Originally posted by marcolino78
sono andato a vedere la pagina che mi hai indicato e in effetti lo script non è complicato

1) #!/bin/bash
2) NUM=$(cat $1 | wc -l)
3) COUNT=0
4) while [ $NUM -ne $COUNT ]; do
5) COUNT=$(expr $COUNT + 1)
6) adduser $(cat $1 | awk "NR == $COUNT")
7) done

l'unica cosa che non ho capito è il $1, mi spiego meglio:
se per esempio chiamo il mio script NuovoUtente e il file FileUtenti.txt, come faccio a lanciarlo per far si che il cat $1 prenda come parametro il mio file???

forse cosi:
./NuovoUtente FileUtenti.txt

oppure manca qualcosa?
Grazie.


Mi riferisco al funzionamento di questo particolare script; le ho provate tutte (anche a sostituire $1 col nome del file) ma in ogni caso ritorna "no such file or directory" Ma scusate, NESSUNO è riuscito a farlo andare???

27-09-2007 12:25
Click Here to See the Profile for bog86 Click here to Send bog86 a Private Message Find more posts by bog86 Add bog86 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Joey72
.novellino.

User info:
Registered: Feb 2007
Posts: 6 (0.00 al dì)
Location:
Corso: Informatica
Anno: 2
Time Online: 13:49:53 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

X Alien

è un'aula di via Comelico...[B]

Last edited by Joey72 on 27-09-2007 at 12:50

27-09-2007 12:48
Click Here to See the Profile for Joey72 Click here to Send Joey72 a Private Message Find more posts by Joey72 Add Joey72 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
alien
.arcimaestro.

User info:
Registered: Dec 2004
Posts: 313 (0.04 al dì)
Location: milano
Corso: Informatica
Anno:
Time Online: 4 Days, 15:54:55 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

che aula è?????

27-09-2007 13:28
Click Here to See the Profile for alien Click here to Send alien a Private Message Find more posts by alien Add alien to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
=kimi=
.primate.

User info:
Registered: Jan 2006
Posts: 69 (0.01 al dì)
Location: milano
Corso: Informatica
Anno: 1
Time Online: 3:26:04: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

dunque l'ingresso sono quelle scale davanti le scale per entrare in silab, insomma quelle per salire nelle stanze dei prof....
proprio ma proprio appena entri ce una porta che può sembrare quella di uno sgabuzzino.... appena apri c sono delle scale che t portano giu... sei arrivato :-):D

27-09-2007 16:29
Click Here to See the Profile for =kimi= Click here to Send =kimi= a Private Message Find more posts by =kimi= Add =kimi= to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
alien
.arcimaestro.

User info:
Registered: Dec 2004
Posts: 313 (0.04 al dì)
Location: milano
Corso: Informatica
Anno:
Time Online: 4 Days, 15:54:55 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Grazie

27-09-2007 16:42
Click Here to See the Profile for alien Click here to Send alien a Private Message Find more posts by alien Add alien to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
jeremy.1983
allinuxato

User info:
Registered: Sep 2006
Posts: 42 (0.01 al dì)
Location: Saronno
Corso: Informatica
Anno: no comment
Time Online: 19:30:58 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
Re: Re: Dimensione totale dei file per utente

Originally posted by Bennyk

Inoltre consiglio vivamente di usare il while, invece del for, per evitare errori di "Out of space" nella command substitution, specialmente in casi tipo: $(find / ...).


Scusa, cosa dovrebbe cambiare tra usare un for e un while?? In teoria fanno la stessa cosa.

Poi ho notato grosse differenze tra le varie immagini minix di qemu che si trovano sul sito del corso: per esempio minix3.qcow di 27MB ha un comportamento diverso rispetto a perEsame.qcow. Qual è quello giusto e soprattutto quale si usa all'esame. (che fra l'altro è domani e colgo l'occasione per un bocca al lupo e culo alla balena generale :-D)

27-09-2007 19:41
Click Here to See the Profile for jeremy.1983 Click here to Send jeremy.1983 a Private Message Find more posts by jeremy.1983 Add jeremy.1983 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Bennyk
.amico.

User info:
Registered: Oct 2003
Posts: 38 (0.00 al dì)
Location: Milano
Corso: Informatica
Anno: ...
Time Online: 1 Day, 1:36:08: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
Re: Re: Re: Dimensione totale dei file per utente

Originally posted by jeremy.1983
Scusa, cosa dovrebbe cambiare tra usare un for e un while?? In teoria fanno la stessa cosa.

Poi ho notato grosse differenze tra le varie immagini minix di qemu che si trovano sul sito del corso: per esempio minix3.qcow di 27MB ha un comportamento diverso rispetto a perEsame.qcow. Qual è quello giusto e soprattutto quale si usa all'esame. (che fra l'altro è domani e colgo l'occasione per un bocca al lupo e culo alla balena generale :-D)


Si, fanno la stessa cosa appunto, il for di per sè non è un male, ma usato con la command substitution, es: for $(find / ... | command... ) può dare errori di "Out of space", in particolare su lunghi elenchi di files.

L'immagine Minix, usata all'esame, è più completa di quella che si usava in laboratorio ed ha molti più files, comandi, processi etc... di conseguenza anche esercizi che con il for che funzionavano su minix3.qcow danno errori all'esame. Il while non soffre di questo problema.
Provare perEsame.qcow per credere!

27-09-2007 20:11
Click Here to See the Profile for Bennyk Click here to Send Bennyk a Private Message Find more posts by Bennyk Add Bennyk to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
jeremy.1983
allinuxato

User info:
Registered: Sep 2006
Posts: 42 (0.01 al dì)
Location: Saronno
Corso: Informatica
Anno: no comment
Time Online: 19:30:58 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

ma perEsame.qcow è quello che si usa fisicamente all'esame, giusto?

Per me è meglio, io ho praticamente sempre usato solo quello. Però è vero ho notato parecchi errori col for. Adesso provo a riscrivere i miei script col while

Dengh'iu

27-09-2007 20:38
Click Here to See the Profile for jeremy.1983 Click here to Send jeremy.1983 a Private Message Find more posts by jeremy.1983 Add jeremy.1983 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Deky
.fedelissimo.

User info:
Registered: Feb 2007
Posts: 53 (0.01 al dì)
Location:
Corso: informatica
Anno:
Time Online: 20:50:18 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Sapreste fare questo script:

per ogni utente calcolare il numero dei processi attivi, e dire quello ke ne ha di +, tra tutti gli utenti... e' stato chiesto all'esame mezzoretta fa...

28-09-2007 10:26
Click Here to See the Profile for Deky Click here to Send Deky a Private Message Find more posts by Deky Add Deky to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
jeremy.1983
allinuxato

User info:
Registered: Sep 2006
Posts: 42 (0.01 al dì)
Location: Saronno
Corso: Informatica
Anno: no comment
Time Online: 19:30:58 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

E' più o meno quello che han chiesto a me:

Classificare gli utenti in base alla somma delle dimensioni dei loro processi.

Ovviamente mi ha stampato, dire che è un puttanaio è un complimento.
Se poi penso allo script di merda che gli ha chiesto al tipo fianco a me mi sale un nervoso...:evil::evil::evil::evil::evil::evil::evil::evil:

Però è una vergogna, elle e vim impazzano c'è la bash al posto della shell... VERGOGNOSO

Già per i non frequentati ci sono solo praticamente questi tre o quattro thread, che sono già dispersivi, in più ci fanno confondere così...

Non vi dico le bestemmie che son partite dal mio terminale... ma anche del tipo a fianco.

Adesso provo un po' a farlo quell'esercizio. Sto giro si sono imputati parecchio con xargs e grep, se mi viene vi posto la soluzione.

A gennaio... e l'incubo continua

28-09-2007 13:52
Click Here to See the Profile for jeremy.1983 Click here to Send jeremy.1983 a Private Message Find more posts by jeremy.1983 Add jeremy.1983 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
darkman13
.arcimaestro.

User info:
Registered: Feb 2004
Posts: 272 (0.03 al dì)
Location:
Corso:
Anno:
Time Online: 3 Days, 14:00:17 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Io non so, ma questo esame deve andare veramente di fortuna... Trenttini ti chiede delle cosse allucinanti. mentre Monga meno male ti chiede cosa molto fattibile al max in 2 righe di comandi...
Basta trenttini, sono già 2 volte che mi stampa lui..... grrrrrrrrrrrr

28-09-2007 14:19
Click Here to See the Profile for darkman13 Click here to Send darkman13 a Private Message Find more posts by darkman13 Add darkman13 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
=kimi=
.primate.

User info:
Registered: Jan 2006
Posts: 69 (0.01 al dì)
Location: milano
Corso: Informatica
Anno: 1
Time Online: 3:26:04: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

dark la prox volta chiedi l'esercizio a monga :D
dai scherzo,però davvero io lo passato a luglio ma solo xkè monga mi ha dato l'esercizio....

28-09-2007 14:53
Click Here to See the Profile for =kimi= Click here to Send =kimi= a Private Message Find more posts by =kimi= Add =kimi= 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:01.    Post New Thread    Post A Reply
Pages (39): « First ... « 11 12 13 14 [15] 16 17 18 19 » ... 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.125 seconds (31.55% PHP - 68.45% MySQL) con 23 query.