Post Reply 
command to find and remove core files
Author Message
sparkomemphis Offline
member of UofM Atl alumni club.
*

Posts: 2,881
Joined: Feb 2004
Reputation: 50
I Root For: Memphis Tigers
Location: Atlanta GA
NCAAbbs LUGSkunkworksDonatorsDonators
Post: #1
command to find and remove core files
[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]
04-03-2006 11:43 AM
Visit this user's website Find all posts by this user Quote this message in a reply
georgia_tech_swagger Offline
Res publica non dominetur
*

Posts: 21,063
Joined: Feb 2002
Reputation: 166
I Root For: Georgia Tech
Location: Upstate, SC
SkunkworksFolding@NCAAbbsNCAAbbs LUGCrappies
Post: #2
 
Wow that command was totally obvious ;-)


You are one with the shell script 04-bow
04-03-2006 01:52 PM
Find all posts by this user Quote this message in a reply
Post Reply 





Geo Visitors Map
Copyright © 2002-2010 NCAA Bulletin Board System (NCAAbbs), All Rights Reserved
NCAAbbs is an independent fan site and is in no way affiliated to the NCAA or any of the schools and conferences it represents.