NCAAbbs

Full Version: command to find and remove core files
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
[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]
Wow that command was totally obvious ;-)


You are one with the shell script 04-bow
Reference URL's