04-03-2006, 11:43 AM
[code:1]
find . -name core\* -user $USER -type f -size +1000000c -exec file {} \; -exec ls -l {} \; -exec printf "\n\ny to remove this core file\n" \; -exec /bin/rm -i {} \;
[/code:1]
Example
[code:1]
[sparko@lambda ~]$ find . -name core\* -user $USER -type f -size +1000000c -exec file {} \; -exec ls -l {} \; -exec printf "\n\ny to remove this core file\n" \; -exec /bin/rm -i {} \;
./lib/core.11179: ELF 32-bit LSB core file Intel 80386, version 1 (SYSV), SVR4-style, SVR4-style, from 'ssh'
-rw------- 1 sparko sparko 1548288 Nov 16 13:57 ./lib/core.11179
y to remove this core file
/bin/rm: remove regular file `./lib/core.11179'? y
[/code:1]
find . -name core\* -user $USER -type f -size +1000000c -exec file {} \; -exec ls -l {} \; -exec printf "\n\ny to remove this core file\n" \; -exec /bin/rm -i {} \;
[/code:1]
Example
[code:1]
[sparko@lambda ~]$ find . -name core\* -user $USER -type f -size +1000000c -exec file {} \; -exec ls -l {} \; -exec printf "\n\ny to remove this core file\n" \; -exec /bin/rm -i {} \;
./lib/core.11179: ELF 32-bit LSB core file Intel 80386, version 1 (SYSV), SVR4-style, SVR4-style, from 'ssh'
-rw------- 1 sparko sparko 1548288 Nov 16 13:57 ./lib/core.11179
y to remove this core file
/bin/rm: remove regular file `./lib/core.11179'? y
[/code:1]
