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 ... « 34 35 36 37 [38] 39 »   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
Lion
.fedelissimo.

User info:
Registered: Jul 2009
Posts: 40 (0.01 al dì)
Location:
Corso: info
Anno: 2
Time Online: 10:48:06: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

complimenti!
hai finito tutto l'esame?

14-01-2011 17:31
Click Here to See the Profile for Lion Click here to Send Lion a Private Message Find more posts by Lion Add Lion to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
uLori
.illuminato.

User info:
Registered: Feb 2010
Posts: 159 (0.03 al dì)
Location: Milano
Corso: Informatica
Anno: IV
Time Online: 15:19:53 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

sisi finito tutto :)

comunque a me è stato dato un esercizio relativamente semplice, ho sentito esercizi di altri che non avrei saputo nemmeno da dove iniziare

15-01-2011 08:57
Click Here to See the Profile for uLori Click here to Send uLori a Private Message Find more posts by uLori Add uLori to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Magio
.novellino.

User info:
Registered: Oct 2008
Posts: 4 (0.00 al dì)
Location: Milan
Corso: Info
Anno: 1
Time Online: 6:40:22 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

sommare la dimensione dei file .c contenenti numero di parole dispari

16-01-2011 00:19
Click Here to See the Profile for Magio Click here to Send Magio a Private Message Find more posts by Magio Add Magio to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Magio
.novellino.

User info:
Registered: Oct 2008
Posts: 4 (0.00 al dì)
Location: Milan
Corso: Info
Anno: 1
Time Online: 6:40:22 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

dimenticavo l'intestazione, questo è l'esercizio che mi è capitato, ringrazio tutti per questo thread, grazie a voi l'ho passato!!!

16-01-2011 00:20
Click Here to See the Profile for Magio Click here to Send Magio a Private Message Find more posts by Magio Add Magio to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Joy88
.consigliere.

User info:
Registered: Jan 2008
Posts: 101 (0.02 al dì)
Location: ~Milano
Corso: Informatica
Anno:
Time Online: 1 Day, 10:27:00: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Aggiungo la mia domanda di stamattina:

Contare quanti file di manuale (file cioè con estensione .1, .2, .3 ... .7) ci sono all'interno del File System.

code:
find / -type f -name '*.[1-7]'


:)
Io ho poi ordinato il risultato in base all'estensione, ma era una cosa in più!

Manca solo l'orale e poi ho finito gli esami!! :shock:
:)
In bocca al lupo a tutti!!!
:D:D

__________________
"Amor, ch’a nullo amato amar perdona, mi prese del costui piacer sì forte che, come vedi, ancor non m’abbandona."

*Dante*

11-02-2011 12:38
Click Here to See the Profile for Joy88 Click here to Send Joy88 a Private Message Find more posts by Joy88 Add Joy88 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
AndyB
.amico.

User info:
Registered: Jan 2005
Posts: 33 (0.00 al dì)
Location:
Corso: Informatica
Anno: 3
Time Online: 1 Day, 15:41:05: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Il mio esercizio era:

trovare l'occupazione di memoria totale dei processi con pid dispari.

code:
ps -axl | awk '{if (($4%2) != 0) SUM+=$7} END {print SUM}'


$4 = PID del processo
$7 = SIZE del processo

12-02-2011 12:07
Click Here to See the Profile for AndyB Click here to Send AndyB a Private Message Find more posts by AndyB Add AndyB to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
pintu
.illuminato.

User info:
Registered: Jul 2010
Posts: 248 (0.05 al dì)
Location: Novara
Corso: informatica
Anno:
Time Online: 2 Days, 0:46:30 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Penso che senza questo 3d non avrei ai passato l'esame di laboratorio! Per futura memoria posto l'esercizio che mi è stato dato:

Shell Script
Trovare l'occupazione totale dei file che sono stati modificati l'ultima volta di venerdi.

#!/bin/sh
SOMMA=0
SIZE=0
find / -type f | while read line; do
Day=$(stat -Mtime $line | cut -f 1)
if [ $Day = "Fri" ]; then
SIZE=$(echo $line | xargs du | cut -f 1)
SOMMA=$(expr $SOMMA + $SIZE)
fi
done
echo "Occupazione totale: $SOMMA"

Kernel
Fare in modo che ogni volta che viene creato un link simbolico venga stampato il nome del link.

Non sono riuscito a farlo, comunque la strada giusta è accedere al file system , e all'interno del file open.c andare a modifizare la funzione do_slink. Monga mi ha dato un punto per la buona volontà :D Totale 25!

Grazie ancora a tutti!

10-07-2011 13:32
Click Here to See the Profile for pintu Click here to Send pintu a Private Message Find more posts by pintu Add pintu to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
basslele
.fedelissimo.

User info:
Registered: Feb 2008
Posts: 49 (0.01 al dì)
Location:
Corso:
Anno:
Time Online: 19:08:14 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Anche io posto l'esercizio che mi ha fatto fare.

Trovare il numero dei file che contengono la parola "copyright" e hanno il nome composto da un numero pari di caratteri

io ho fatto così:

#! /bin/sh

sum=0;
for file in $(find / -type f | xargs grep -l "copyright" | rev | cut -d / -f 1 | rev); do
numero=$(echo "$file" | wc -c )
if (expr $(expr $numero % 2) -eq 0); then
sum=expr($sum + 1)
fi
done
echo "numero file: $sum"

11-07-2011 12:47
Click Here to See the Profile for basslele Click here to Send basslele a Private Message Find more posts by basslele Add basslele to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
mauro21
.primate.

User info:
Registered: Mar 2009
Posts: 73 (0.01 al dì)
Location: Buccinasco
Corso: Informatica
Anno: Laureato
Time Online: 3 Days, 14:23:39 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by basslele
Anche io posto l'esercizio che mi ha fatto fare.

Trovare il numero dei file che contengono la parola "copyright" e hanno il nome composto da un numero pari di caratteri

io ho fatto così:

#! /bin/sh

sum=0;
for file in $(find / -type f | xargs grep -l "copyright" | rev | cut -d / -f 1 | rev); do
numero=$(echo "$file" | wc -c )
if (expr $(expr $numero % 2) -eq 0); then
sum=expr($sum + 1)
fi
done
echo "numero file: $sum"


provandolo a fare mi viene una cosa molto simile (praticamente =), solo che prima di stampare l'ultima stringa con il risultato, mi stampa molte linee con scritto grep: line too long - truncated

io qui metto 2>/dev/null dopo la grep x "ovviare" al problema

come viene visto in sede d'esame???

questo errore mi esce anche con altri esercizi.

05-09-2011 17:39
Click Here to See the Profile for mauro21 Click here to Send mauro21 a Private Message Visit mauro21's homepage! Find more posts by mauro21 Add mauro21 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
basslele
.fedelissimo.

User info:
Registered: Feb 2008
Posts: 49 (0.01 al dì)
Location:
Corso:
Anno:
Time Online: 19:08:14 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Anche a me aveva dato questo tipo di problema prima dell'esame ma durante l'esame avevo ridotto la ricerca e Monga non mi ha detto nulla...

Cmq è molto disponibile e ti aiuta.

06-09-2011 11:19
Click Here to See the Profile for basslele Click here to Send basslele a Private Message Find more posts by basslele Add basslele to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
aPiso
.illuminato.

User info:
Registered: Sep 2010
Posts: 158 (0.03 al dì)
Location: Milano
Corso: Informatica
Anno: 3
Time Online: 1 Day, 21:54:30 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by spriggan

kernerl -> stampare, quando viene lanciato un processo che necessita privilegi superiori, un messaggio a video con pi, uid, nome processo.


Questo qualcuno saprebbe farlo??

04-07-2012 12:06
Click Here to See the Profile for aPiso Click Here to See the Blog of aPiso Click here to Send aPiso a Private Message Find more posts by aPiso Add aPiso to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
marcy88
.simpatizzante.

User info:
Registered: Nov 2007
Posts: 13 (0.00 al dì)
Location: Cerano
Corso: informatica
Anno: fuori corso
Time Online: 1 Day, 9:50:48 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Ringrazio tutti, senza questo post non sarei riuscito ad accendere manco minix.
Posto l'esercizio che mi è capitato.
-trovare la dimensione totale dei file .c e .h che contengono contemporaneamente le parole "include" e "define".

Grazie davvero a tutti :-))))

14-01-2013 10:08
Click Here to See the Profile for marcy88 Click here to Send marcy88 a Private Message Visit marcy88's homepage! Find more posts by marcy88 Add marcy88 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
giuscri
.novellino.

User info:
Registered: Mar 2015
Posts: 5 (0.00 al dì)
Location:
Corso:
Anno:
Time Online: 2:07:49 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Necroposting in un necroforum.

Trovare la dimensione totale dei file .c e .h che contengono contemporaneamente le parole "include" e "define".

code:
COUNTER=0; for SIZE in $(find lab/ -type f 2> /dev/null |egrep "(\.c)|(\.h)$"|xargs egrep -l "include"|xargs egrep -l "define"|xargs du -b|sed -r "s/\s+/ /g"|cut -d " " -f 1); do COUNTER=$(( $COUNTER + $SIZE )); done; echo $COUNTER

22-07-2015 13:31
Click Here to See the Profile for giuscri Click here to Send giuscri a Private Message Find more posts by giuscri Add giuscri to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
giuscri
.novellino.

User info:
Registered: Mar 2015
Posts: 5 (0.00 al dì)
Location:
Corso:
Anno:
Time Online: 2:07:49 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Trovare il file piu' grande appartenente ad un certo utente.
code:
#!/usr/bin/sh # No user name provided ... _f(){ >&2 echo "[largestfilefor] No user provided."; exit 1; }; [[ -z $1 ]] && _f; # Else, ... USER=$1; FILES=$(find / -type f -user $USER 2> /dev/null); if [[ -z $FILES ]]; then >&2 echo "[largestfilefor] Found no file for the user $USER."; exit 1; fi; echo $(echo $FILES|xargs stat --format="%s %n" 2> /dev/null|sort -nr|head -n 1|cut -d " " -f 2);

22-07-2015 17:39
Click Here to See the Profile for giuscri Click here to Send giuscri a Private Message Find more posts by giuscri Add giuscri to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
giuscri
.novellino.

User info:
Registered: Mar 2015
Posts: 5 (0.00 al dì)
Location:
Corso:
Anno:
Time Online: 2:07:49 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Trovare il numero di link simbolici nel sistema.
code:
find / -type l 2> /dev/null|wc- l

22-07-2015 17:48
Click Here to See the Profile for giuscri Click here to Send giuscri a Private Message Find more posts by giuscri Add giuscri to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 05:13.    Post New Thread    Post A Reply
Pages (39): « First ... « 34 35 36 37 [38] 39 »   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.044 seconds (87.47% PHP - 12.53% MySQL) con 31 query.