Grazie mille,
credo che questa soluzione potrebbe funzionare
Pero' ho ancora un problema provando a fare:
Codice:
find ./ -type f -name psql -mtime +1;
In questa cartella
Codice:
[root@probe3 tmp]# ls -la
totale 34372
drwxrwxrwt 10 root root 4096 23 ago 10:07 .
drwxr-xr-x 23 root root 4096 22 ago 15:27 ..
-rw-r--r-- 1 postgres postgres 208110 19 ago 09:15 a.a
-rw-r--r-- 1 root root 2753088 18 ago 00:59 ala
srwxrwxrwx 1 root root 0 3 ago 18:18 collect.pipe
-rw------- 1 root root 28 18 ago 09:35 crontab.XXXXCglLR7
-rw-r--r-- 1 root root 23327394 19 ago 10:41 det.det
drwxrwxrwt 2 root root 4096 19 ago 10:52 .esd
drwxrwxrwt 2 root root 4096 2 ago 15:45 .font-unix
drwx------ 2 root root 4096 19 ago 10:52 gconfd-root
srw-rw-rw- 1 root root 0 2 ago 15:46 .gdm_socket
drwxrwxrwt 2 root root 4096 19 ago 10:52 .ICE-unix
srwxr-xr-x 1 root root 0 2 ago 15:53 mapping-root
drwx------ 2 501 501 4096 10 ago 11:28 mc-gstefanoni
drwx------ 2 root root 4096 18 ago 17:54 mc-root
drwx------ 2 root root 4096 19 ago 10:52 orbit-root
-rw-r--r-- 1 root root 2753088 19 ago 02:08 prova
-rw-r--r-- 1 root root 2753088 19 ago 02:22 prova;
-rw-r--r-- 1 root root 421298 19 ago 09:52 prova.ciao
-rw-r--r-- 1 root root 0 22 ago 17:07 psql
-rw-r--r-- 1 root root 2753088 19 ago 02:17 script.out
srwxrwxrwx 1 postgres postgres 0 23 ago 10:03 .s.PGSQL.5432
-rw------- 1 postgres postgres 26 23 ago 10:03 .s.PGSQL.5432.lock
-r--r--r-- 1 root root 11 2 ago 15:46 .X0-lock
drwxrwxrwt 2 root root 4096 2 ago 15:46 .X11-unix
Non mi trova niente, ho provato anche cambiando il valore + n ma niente...
Quote:
#!/bin/bash
(find [parametri...]) | while read fname
do
# fai quello che vuoi con "$fname"
done
|
Scusami ma fname e' inteso per il file name vero?
Ciao e grazie ancora