 |
n3o |
tanto c'è SPASS...

Registered: Oct 2005
Posts: 134 (0.02 al dì)
Location: Brescia
Corso: Informatica Magistrale
Anno: 1°
Time Online: 1 Day, 19:26:05: [...]
Status: Offline
Edit | Report | IP: Logged |
Altri due esercizi d'esame che mi ha passato un amico- 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!
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...
|