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 ... « 9 10 11 12 [13] 14 15 16 17 » ... Last »   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
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

Ciao a tutti,
aggiungo un'altra domanda fatta all'esame:

- Quali e quante estensioni ci sono nel sistema?
(per estensioni si intende qualsiasi cosa ci sia dopo il carattere “.”, es: archivio.gz)

La soluzione è questa:

find / | rev | cut -f 1 -d '.' | grep -v / | rev | sort | uniq -c | sort -n

Spiegazione:

find / trova tutto (files e directories) a partire dalla root dir
rev inverte ogni riga dell'output
cut -f 1 -d '.' estrae il primo campo di ogni riga usando il . come separatore
grep -v / eliminazione delle sole directories
rev inverte di nuovo ogni riga dell'output
sort ordina l'output
uniq -c elimina righe duplicate contandole, ora l'output è del tipo 123 gz
sort -n (non necessario) ordina i risultati numericamente

Nota:
Si può evitare il grep -v / usando cut -f 1 -d '.' -s.

20-09-2007 11:03
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
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

Originally posted by darkman13
[...] Trovare il processo con pid dispari che occupa più spazio in memoria?


Io ho provato così, è un pò più brutale ma funziona:

code:
ps -axl|tr -s ' ' :|cut -d : -f 8,5|tr -d \)|tr -d \(|tr : ' '|grep -v "[0|2|4|6|8]$"|sort -nr| head -1

20-09-2007 14:03
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
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
Informazione pratica...

Scusate l'ignoranza, ma...come si svolge fisicamente la prova di laboratorio??? Ok, partizioni, script e kernel, ma quando ci si siede ti fanno creare un utente? e poi? alla fine devi salvare in qualche modo? so che la domanda è banale ma non ho capito come si svolge la prova dal punto di vista pratico....grazie e scusate ancora per la banalità!!!

20-09-2007 14:29
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
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

L'esame consta di tre prove a tempo davanti al PC:

1 partizionamento (10 min)
2 scripting (30 min)
3 modica kernel (30 min)

La prova si svolge seduti al computer, già pronto con MINIX che gira su qemu, il prof scrive sul foglio l'esercizio indicando con quale utente e password loggarsi. Scaduto il tempo MINIX esce dalla shell, il prof dà la valutazione e si passa alla prova successiva.

Attenzione che le prove vengono effettuate nell'ordine sopra riportato ed è necessario passare la prima per accedere alla seconda e la seconda per accedere alla terza.

Per voti fino dal 18 al 24 bisogna passare le prime due, per voti fino al 30 anche la terza.

20-09-2007 16:09
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
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
!!!!!

grande!!!!!! GRAZIE MILLE!!!!!

20-09-2007 16:15
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
collo
.precettore.

User info:
Registered: Oct 2006
Posts: 82 (0.01 al dì)
Location: domodossola
Corso: informatica
Anno: 3fc
Time Online: 1 Day, 0:38:42 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

ciao nn riesco ad eseguire l'erercizio che chiedeva di creare un archivio gzip che contenga tutti i file che iniziano per c e la cui dimensione sia inferiore di 10 kb...nn riesco a capire come si usa ar


ho provato cosi ma nn va:
find / -type f -name c\* -size -20 | ar r archivio.ar

mi da errore con il comando ar!!
suggerimenti:?:?:?:?
thanks

20-09-2007 16:32
Click Here to See the Profile for collo Click here to Send collo a Private Message Find more posts by collo Add collo 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

hai dimenticato xargs

20-09-2007 17: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
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: domandina

Originally posted by marcolino78

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)


Sei sicuro di questa domanda? Su Linux non sarebbe un problema ma i comandi di MINIX sono molto limitati, io non ne sono ancora venuto a capo.
Qualcuno ha idee?

20-09-2007 17:56
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
=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
PER COLLO

non mi ricordo bene, ma all'esame mi ha fatto una domanda simile alla tua... con ar prova a mettere ar rc ....
in pratica dovresti aver dimenticato la c....
guarda sul man di ar e vedi... dovresti usare l'opzione che t crea larchivio e laltra che aggiunge i file nell'archivio

20-09-2007 20:00
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
umibozu
.novellino.

User info:
Registered: Jun 2003
Posts: 8 (0.00 al dì)
Location:
Corso:
Anno:
Time Online: 1 Day, 12:45:17 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

scusa marco!! il paper non centra niente è una cartella ke ho usato per provare la mia soluzione quindi al posto di
$(find /root/paper -type f) ci va $(find /directoryB -type f)

21-09-2007 14:22
Click Here to See the Profile for umibozu Click here to Send umibozu a Private Message Find more posts by umibozu Add umibozu to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
marcolino78
.simpatizzante.

User info:
Registered: Jun 2004
Posts: 11 (0.00 al dì)
Location:
Corso:
Anno:
Time Online: 14:02:10 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
Thumbs up

mille grazie...speriamo bene :-D

21-09-2007 14:48
Click Here to See the Profile for marcolino78 Click here to Send marcolino78 a Private Message Find more posts by marcolino78 Add marcolino78 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

era una domanda dell'appello di luglio, in minix qualcuno sa cosa significa fare la statistica dei file < 10k 100k 1000k ??????????

22-09-2007 20:34
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
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

Originally posted by =kimi=
era una domanda dell'appello di luglio, in minix qualcuno sa cosa significa fare la statistica dei file < 10k 100k 1000k ??????????


Secondo me dovevi dare una percentuale dei file

Io l'ho risolto facendo così
code:
#! /bin/sh TOT=$(find / -type f | wc -l | tr -s ' ' : | cut -f 2 -d :) DIECIK=$(find / -type f -size -20 | wc -l | tr -s ' ' : | cut -f 2 -d :) CENTOK=$(find / -type f -size -200 | wc -l | tr -s ' ' : | cut -f 2 -d :) MILLEK=$(find / -type f -size -2000 | wc -l | tr -s ' ' : | cut -f 2 -d :) CENTO=100 STAT=$(expr $DIECIK \* $CENTO) STAT1=$(expr $STAT / $TOT) STAT=$(expr $CENTOK \* $CENTO) STAT2=$(expr $STAT / $TOT) STAT=$(expr $MILLEK \* $CENTO) STAT3=$(expr $STAT / $TOT) echo "I file inferiori a 10k sono il ${STAT1}%" echo "I file inferiori a 100k sono il ${STAT2}%" echo "I file inferiori a 1000k sono il ${STAT3}%"

23-09-2007 14:36
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
=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

ah sei riuscito a risolverlo????
cavoli io non ci avevo capito niente....

23-09-2007 14:54
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
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

Ciao,

ma quando mi dà l'errore Out of space, che vuol dire che sto sbarellando di memoria o di hard disk???

Stavo provando a modificare questo esercizio:

-Determinare l'occupazione totale di un utente(somma dei suoi file)

in

-Determinare l'occupazione totale per ogni utente

Ho fatto lo script, lo lancio.... Out of space :wall::wall:

23-09-2007 21:00
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
All times are GMT. The time now is 08:00.    Post New Thread    Post A Reply
Pages (39): « First ... « 9 10 11 12 [13] 14 15 16 17 » ... 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.114 seconds (45.95% PHP - 54.05% MySQL) con 23 query.