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 > aiuto su alcuni es di lab
Pages (4): « 1 [2] 3 4 »   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
mapenzi81
dsy developer

User info:
Registered: Feb 2005
Posts: 233 (0.03 al dì)
Location: Milano
Corso: Informatica
Anno: 3.....456789....
Time Online: 6 Days, 1:18:40 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by miguel
find /* -type file | xargs ls -l -t | head -10

fate un po di test... ma sembra funzionare per gli ultimi 10 file modificati


il problema è che facendo cosi i file nn vengono ordinati
come fai ad essere certo che i 10 file stampati siano i piu vecchi?

__________________
Sto cercando disperatamente di capire perché i piloti kamikaze si mettessero i caschi in testa.

Dave Edison

15-02-2009 17:16
Click Here to See the Profile for mapenzi81 Click here to Send mapenzi81 a Private Message Find more posts by mapenzi81 Add mapenzi81 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
miguel
.amico.

User info:
Registered: Sep 2008
Posts: 31 (0.00 al dì)
Location: Milano
Corso: Informatica
Anno: fuoricorso
Time Online: 9:19:24 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

vedi in man ... ls -t

sort by time(modified time default), latest first.
cioè.. ordina mettendo in testa il piu recentemente modificato


io ho un altro dubbio.. non so se xargs va bene per l'ordinamento in quanto sappiamo che contiene l'output di find, una lista.. e se l'output è grosso.. xargs lo divide in piu sublists.. e spero ls -t sappia gestire le varie sublist.
dai test sembra funzionare..

15-02-2009 20:13
Click Here to See the Profile for miguel Click here to Send miguel a Private Message Find more posts by miguel Add miguel to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
mapenzi81
dsy developer

User info:
Registered: Feb 2005
Posts: 233 (0.03 al dì)
Location: Milano
Corso: Informatica
Anno: 3.....456789....
Time Online: 6 Days, 1:18:40 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

ok conosco il comando....

ma dal risultato della find, riga per riga (usi xargs) va in pasto a ls -l...che ti stampa il file e lo ordina solo cn se stesso...non con tutti i file

__________________
Sto cercando disperatamente di capire perché i piloti kamikaze si mettessero i caschi in testa.

Dave Edison

15-02-2009 21:19
Click Here to See the Profile for mapenzi81 Click here to Send mapenzi81 a Private Message Find more posts by mapenzi81 Add mapenzi81 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
miguel
.amico.

User info:
Registered: Sep 2008
Posts: 31 (0.00 al dì)
Location: Milano
Corso: Informatica
Anno: fuoricorso
Time Online: 9:19:24 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

capisco..

comunque l'output mi da i file recentemente modificati nell'ordine giusta. A sto punto ls sembra prendere i blocchi xargs e visualizzarli ordinatamente con -t.

16-02-2009 07:25
Click Here to See the Profile for miguel Click here to Send miguel a Private Message Find more posts by miguel Add miguel to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
elex1984
.consigliere.

User info:
Registered: Feb 2006
Posts: 134 (0.02 al dì)
Location:
Corso:
Anno:
Time Online: 2 Days, 13:21:33 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Scusate sempre nel primo esercizio...
faccio tutto quello che devo fare ma poi come faccio a verifiacare se nella nuova directory ci sono i file??? esempio creo elena come faccio a enrare???

Altro esercizio copiare i file che inizinano per f e metterli in un'altra directory senza cambiare i permessi???

16-02-2009 10:37
Click Here to See the Profile for elex1984 Click here to Send elex1984 a Private Message Find more posts by elex1984 Add elex1984 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
nsajuve
.illuminato.

User info:
Registered: May 2006
Posts: 164 (0.02 al dì)
Location: Milano
Corso: Informatica
Anno: 3
Time Online: 1 Day, 5:57:03: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

for i in $(find / -type f -name "f*" ) ; do cp -p "$i" /root/dir2; done

16-02-2009 10:48
Click Here to See the Profile for nsajuve Click here to Send nsajuve a Private Message Find more posts by nsajuve Add nsajuve to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
nsajuve
.illuminato.

User info:
Registered: May 2006
Posts: 164 (0.02 al dì)
Location: Milano
Corso: Informatica
Anno: 3
Time Online: 1 Day, 5:57:03: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

per verificare se ci sono i file :

o fai : ls /dir2 | more

o ti sposti sul dir 2 : cd dir2

e poi fai ls | more

16-02-2009 10:49
Click Here to See the Profile for nsajuve Click here to Send nsajuve a Private Message Find more posts by nsajuve Add nsajuve to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
elex1984
.consigliere.

User info:
Registered: Feb 2006
Posts: 134 (0.02 al dì)
Location:
Corso:
Anno:
Time Online: 2 Days, 13:21:33 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

grazie mille :-)

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

User info:
Registered: Feb 2006
Posts: 134 (0.02 al dì)
Location:
Corso:
Anno:
Time Online: 2 Days, 13:21:33 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Ciao un altro es che ho trovato è: per ogni utente del sistema stampare i gruppi a cui appartiene, senza utilizzare i comandi id e groups

qualcuno l'ha risolto così:
for x in $(cat /etc/passwd |cut -d ':' -f 1); do echo "$x: ""$(for y in $(cat /etc/group|grep -s $(cat /etc/passwd|grep -s "$x"|cut -d ':' -f 3)|cut -d ':' -f 1);do echo -n "$y ";done)";done

me lo potete spiegare? se c'è modo più semplice me lo dite??

16-02-2009 13:36
Click Here to See the Profile for elex1984 Click here to Send elex1984 a Private Message Find more posts by elex1984 Add elex1984 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
elex1984
.consigliere.

User info:
Registered: Feb 2006
Posts: 134 (0.02 al dì)
Location:
Corso:
Anno:
Time Online: 2 Days, 13:21:33 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Altro quesito:
so che se devo archiviare con ar uso
ar cr archivio.ar
Invece se devo usare tar
tar -cvf archivio.tar

SE DEVO ARCHVIARE file .gz? cosa si usa?

16-02-2009 15:18
Click Here to See the Profile for elex1984 Click here to Send elex1984 a Private Message Find more posts by elex1984 Add elex1984 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
nsajuve
.illuminato.

User info:
Registered: May 2006
Posts: 164 (0.02 al dì)
Location: Milano
Corso: Informatica
Anno: 3
Time Online: 1 Day, 5:57:03: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

credo che sia : ---> compress

16-02-2009 20:21
Click Here to See the Profile for nsajuve Click here to Send nsajuve a Private Message Find more posts by nsajuve Add nsajuve to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
miguel
.amico.

User info:
Registered: Sep 2008
Posts: 31 (0.00 al dì)
Location: Milano
Corso: Informatica
Anno: fuoricorso
Time Online: 9:19:24 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

scusate.. avrei bisogno di un aiutino. Per il partizionamento.. i cilindri possono essere del tipo:

inizio - fine
0 124
124 248
248 ....

o cosi?
0 124
125 248
249 ....


grazie mille

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

User info:
Registered: Sep 2008
Posts: 31 (0.00 al dì)
Location: Milano
Corso: Informatica
Anno: fuoricorso
Time Online: 9:19:24 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

poi se qualcuno sa come rendo bootable una partizione...
grazie ancora

17-02-2009 11:30
Click Here to See the Profile for miguel Click here to Send miguel a Private Message Find more posts by miguel Add miguel to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
elex1984
.consigliere.

User info:
Registered: Feb 2006
Posts: 134 (0.02 al dì)
Location:
Corso:
Anno:
Time Online: 2 Days, 13:21:33 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

x miguel
ma per il partizionamento è più semplice segliere la partizione (minix, fat ecc) poi andare su base e premere m poi andare sulla dimensione e mettere il numero di kb che ti da il prof...

17-02-2009 11:47
Click Here to See the Profile for elex1984 Click here to Send elex1984 a Private Message Find more posts by elex1984 Add elex1984 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
elex1984
.consigliere.

User info:
Registered: Feb 2006
Posts: 134 (0.02 al dì)
Location:
Corso:
Anno:
Time Online: 2 Days, 13:21:33 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

NON SAPETER RISP A QUESTO???
per ogni utente del sistema stampare i gruppi a cui appartiene, senza utilizzare i comandi id e groups

qualcuno l'ha risolto così:
for x in $(cat /etc/passwd |cut -d ':' -f 1); do echo "$x: ""$(for y in $(cat /etc/group|grep -s $(cat /etc/passwd|grep -s "$x"|cut -d ':' -f 3)|cut -d ':' -f 1);do echo -n "$y ";done)";done

me lo potete spiegare? se c'è modo più semplice me lo dite??

17-02-2009 11:50
Click Here to See the Profile for elex1984 Click here to Send elex1984 a Private Message Find more posts by elex1984 Add elex1984 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 22:13.    Post New Thread    Post A Reply
Pages (4): « 1 [2] 3 4 »   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.072 seconds (69.36% PHP - 30.64% MySQL) con 23 query.