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): « 1 [2] 3 4 5 6 » ... Last »   Last Thread   Next Thread
Author
Thread    Post New Thread    Post A Reply
n3o
tanto c'è SPASS...

User info:
Registered: Oct 2005
Posts: 134 (0.02 al dì)
Location: Brescia
Corso: Informatica Magistrale
Anno:
Time Online: 1 Day, 19:26:05: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

mmm...
A me funziona...prova a vedere su shell cosa fanno i singoli comandi dello script e poi vedi dove sta la differenza anche se mi sembra strano...
Allego una bella immagine...

Attachment: script.jpg
This has been downloaded 343 time(s).

__________________
The answer is blowing in the wind...

21-06-2007 18:34
Click Here to See the Profile for n3o Click here to Send n3o a Private Message Find more posts by n3o Add n3o to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
n3o
tanto c'è SPASS...

User info:
Registered: Oct 2005
Posts: 134 (0.02 al dì)
Location: Brescia
Corso: Informatica Magistrale
Anno:
Time Online: 1 Day, 19:26:05: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged


  • Copiare i file da una directory all'altra senza cambiare i permessi:
    cp /directory/albero1/* /directory/albero2

  • Spostare tutti i files che iniziano per m da una directory (e sottodirectory) ad un'altra
    mv /directory/albero1/m* /directory/albero2

  • Trovare tutti i files eseguibili > 5k e evidenziando i 5 più grandi
    Questo mi ha fatto davvero dannare l'anima...per me un file è eseguibile se lo è per tutti gli utenti (altrimenti le combinazioni possibili sono troppe!)
    find / -type f | xargs ls -l | grep "^...x..x..x" | tr -s ' ' ' ' | cut -d ' ' -f 5,9 | sort -nr | head -5
    Messo in uno script è possibile formattare meglio l'output ma ora non sono in vena...

  • Archiviare i files modificati nell'ultima settimana
    find / -type f -mtime -7 | xargs tar cvf archivio.tar

  • Trovare il processo che occcupa più memoria ram
    ps -axl | sort +7 -nr | head -1 | tr -s ' ' ' ' | cut -d ' ' -f 8,12

__________________
The answer is blowing in the wind...

22-06-2007 01:06
Click Here to See the Profile for n3o Click here to Send n3o a Private Message Find more posts by n3o Add n3o to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Paul03
.arcimaestro.

User info:
Registered: Feb 2005
Posts: 290 (0.04 al dì)
Location: Oleggio
Corso: Informatica
Anno: 3
Time Online: 1 Day, 19:39:12 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Raga mi spiegato cosa servono e come funzionano argx, argv? Ciao e grazie

22-06-2007 09:19
Click Here to See the Profile for Paul03 Click here to Send Paul03 a Private Message Find more posts by Paul03 Add Paul03 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
n3o
tanto c'è SPASS...

User info:
Registered: Oct 2005
Posts: 134 (0.02 al dì)
Location: Brescia
Corso: Informatica Magistrale
Anno:
Time Online: 1 Day, 19:26:05: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Se intendi i parametri del main() del C:
int main (int argc, char **argv)
Nel primo c'è il numero degli argomenti passati in linea di comando + il nome del file stesso, argc = (#{argomenti} + 1) , argv è un array di stringhe che contiene gli argomenti veri e propri.
argv[0] è il nome del file
argv[1] è il 1° argomento, e cos' via...

argx non so cosa sia...

__________________
The answer is blowing in the wind...

22-06-2007 11:34
Click Here to See the Profile for n3o Click here to Send n3o a Private Message Find more posts by n3o Add n3o to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
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

# Copiare i file da una directory all'altra senza cambiare i permessi:
cp /directory/albero1/* /directory/albero2
bisogna aggiungere anche -p altrimenti i permessi cambiano...
n30 riusciresti a darmi una mano x far funzionare il tuo script (il primo) xchè sto diventando matto...
è la riga "ID="$(grep "^$1" /etc/passwd | cut -f 3 -d :)"" che sembra nn andare; è come se nn potessi accedere alla cartella passwd.
e cosa è "^$1"?
thx.....

Last edited by bog86 on 26-06-2007 at 14:54

26-06-2007 14:38
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
Viry
dsy moderator

User info:
Registered: Oct 2002
Posts: 2429 (0.31 al dì)
Location: Milano
Corso: Ticom
Anno: primo
Time Online: 43 Days, 3:27:12 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by bog86
#
e cosa è "^$1"?

$1 e' il parametro che passi allo script quando lo esegui, cioe' il nome dell'utente di cui stai cercando lo spazio utilizzato.
^$1 significa che grep cerca la stringa che inizia (^) con il nome specificate nel parametro $1

__________________
When once you have tasted flight, you will walk the earth, forever more, with your eyes turned skyward. For there you have been, and there you long to return.

“Dovere, tempo, destino, tutto tende a separarci e, di fatto, ci separa. Ma il sentimento non conosce frontiere e mi unisce a te come se avessi sempre la mia mano sulla tua"

26-06-2007 15:04
Click Here to See the Profile for Viry Click here to Send Viry a Private Message Find more posts by Viry Add Viry to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
n3o
tanto c'è SPASS...

User info:
Registered: Oct 2005
Posts: 134 (0.02 al dì)
Location: Brescia
Corso: Informatica Magistrale
Anno:
Time Online: 1 Day, 19:26:05: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by bog86
ID="$(grep "^$1" /etc/passwd | cut -f 3 -d :)" che sembra nn andare; è come se nn potessi accedere alla cartella passwd.


mmm... passwd non è una cartella ma un file, ora non ricordo i permessi legati a quel file ma per sicurezza come nell'esame esegui lo scipt come root.

Il significato di quella riga è:

Metti nella variabile ID il risultato del comando grep che cerca per ogni riga del file /etc/passwd una stringa passata come parametro (il nome dell'utente desiderato) a partire dall'inizio della riga; se viene trovata una corrispondenza (unica ovviamente) estrae dalla riga il terzo campo separato da ':' che è l' UID dell'utente.

Questo UID sarà da usare con find per restringerne il campo ad uno specifico utente...

__________________
The answer is blowing in the wind...

26-06-2007 17:30
Click Here to See the Profile for n3o Click here to Send n3o a Private Message Find more posts by n3o Add n3o to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
antares85
.illuminato.

User info:
Registered: Oct 2005
Posts: 197 (0.03 al dì)
Location: milano
Corso: informatica
Anno: 2
Time Online: 1 Day, 6:16:58 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Scusate, ma sono in alto mare, non con gli esercizi, ma con l'installazione di Qemu/Minix!!!
Ho scaricato l'immagine dal wiki del prof, apro il file zip e mi trovo qemu.debian...con cosa lo apro? o lo devo mettere da qualche parte? non c'è il file qemu.bat e gli altri come scritto qui e come c'era in laboratorio...aiuto sigh sigh :'(

(un'anima pia mi può spiegare passo passo come a un bambino analfabeta come fare per installare il tutto..?)

GRAZIE!!! ps lavoro in Win

29-06-2007 17:42
Click Here to See the Profile for antares85 Click here to Send antares85 a Private Message Find more posts by antares85 Add antares85 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
n3o
tanto c'è SPASS...

User info:
Registered: Oct 2005
Posts: 134 (0.02 al dì)
Location: Brescia
Corso: Informatica Magistrale
Anno:
Time Online: 1 Day, 19:26:05: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Allora, vediamo di fare le cose passo per passo

  1. Scarica QEMU >QUI<
  2. Estrai la cartella è qemu-0.9.0-windows e il suo contenuto
  3. Scarica l'immagine pronta di Minix 3 >QUI<
  4. Sposta l'immagine di minix all'interno della cartella qemu-0.9.0-windows
  5. Sempre nella cartella qemu-0.9.0-windows è presente un file qemu-win.bat
  6. Tasto destro -> Modifica (o aprilo con Blocco Note)
  7. Localizza la riga:
    qemu.exe -L . -m 128 -hda linux.img -soundhw all -localtime -M isapc
    e modificala con
    qemu.exe -L . -m 128 -hda minix3.qcow -soundhw all -localtime -M isapc
  8. Salva e cliccaci sopra per avviare Minix 3 (ignora eventuali warning)
  9. Autenticati come root senza password
  10. Per arrestare il sistema scrivi shutdown e poi al boot loader digita off
That's all folks !

__________________
The answer is blowing in the wind...

29-06-2007 21:18
Click Here to See the Profile for n3o Click here to Send n3o a Private Message Find more posts by n3o Add n3o to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
antares85
.illuminato.

User info:
Registered: Oct 2005
Posts: 197 (0.03 al dì)
Location: milano
Corso: informatica
Anno: 2
Time Online: 1 Day, 6:16:58 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

n3o, grazie di tutto cuore, probabilmente sbagliavo a scaricare le varie cose :p
GRAAAZIEEE

30-06-2007 12:22
Click Here to See the Profile for antares85 Click here to Send antares85 a Private Message Find more posts by antares85 Add antares85 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
darkman13
.arcimaestro.

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

Post actions:

Edit | Report | IP: Logged

Ciao, avevo letto in qualche thread di un manuale consigliato per le eserictazioni su shell Unix. Qualcuno mi sa dire qualcosa approposito???

04-07-2007 11:28
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
n3o
tanto c'è SPASS...

User info:
Registered: Oct 2005
Posts: 134 (0.02 al dì)
Location: Brescia
Corso: Informatica Magistrale
Anno:
Time Online: 1 Day, 19:26:05: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Advanced Bash Scripting (su google lo trovi subito), molto completo (trovi tutto ciò che ti serve) ma estremamente ridondante riguardo alle poche cose che devi sapere per passare l'esame. (in più è per bash e non per ash, quindi controlla sempre l'effettivo funzionamento degli script, anche se quelli base dovrebbero girare tranquillamente).

Io ti consiglio di leggerti i 3 o 4 thread sull'esame in questo forum che sono bei pieni di esempi fatti sia su partizionamento, sia su shell che su kernel.
Poi guardati il sito del prof in cui ci sono vari script di esempio e descrizioni di comandi nonchè lo scarno materiale delle lezioni...

Se ti rimangono dei dubbi posta a volontà...

__________________
The answer is blowing in the wind...

04-07-2007 12:16
Click Here to See the Profile for n3o Click here to Send n3o a Private Message Find more posts by n3o Add n3o to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
darkman13
.arcimaestro.

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

Post actions:

Edit | Report | IP: Logged

Grazie mille n3o

04-07-2007 23:04
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
n3o
tanto c'è SPASS...

User info:
Registered: Oct 2005
Posts: 134 (0.02 al dì)
Location: Brescia
Corso: Informatica Magistrale
Anno:
Time Online: 1 Day, 19:26:05: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Altri due esercizi d'esame che mi ha passato un amico

  1. Trovare i tre files più grossi per ogni utente
    code:
    #!/bin/sh for UID in $(cut /etc/passwd -d : -f 3 | sort -n | uniq); do echo "Utente $UID:" find / -type f -user $UID | xargs du | sort -nr | head -3 done
    Ricordate il chmod +x <script_name> per renderlo eseguibile!

  2. Archiviare tutti i files che contengono la parola "login"
    find / -type f | xargs grep -l "login" | xargs tar -cvf archivio.tar

__________________
The answer is blowing in the wind...

06-07-2007 20:19
Click Here to See the Profile for n3o Click here to Send n3o a Private Message Find more posts by n3o Add n3o to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
poi_1969
.grande:maestro.

User info:
Registered: Aug 2005
Posts: 507 (0.07 al dì)
Location: milano
Corso: informatica
Anno:
Time Online: 10 Days, 22:40:57 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

ho problemi nel modificare il kernel

ho semplicemente aggiunto kprintf("muoio"); in do_exit e do_Kill.
Ricompilato , ma non funziona.

Sapete indicarmi qual'è l'esatta procedura di ricompilazione del kernel, peche trentini ne ha indicato una che è diversa da quella di monga.

Grazie

09-07-2007 13:59
Click Here to See the Profile for poi_1969 Click here to Send poi_1969 a Private Message Find more posts by poi_1969 Add poi_1969 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 01:36.    Post New Thread    Post A Reply
Pages (39): « 1 [2] 3 4 5 6 » ... 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.057 seconds (64.06% PHP - 35.94% MySQL) con 23 query.