Sponsored Content
Homework and Emergencies Homework & Coursework Questions how to delete core file (file created due to apps crashed) Post 302511657 by s3270226 on Thursday 7th of April 2011 09:35:50 AM
Old 04-07-2011
thanks to all of you.
so far I have understood the following point.
the line file in `find $dval -name core | xargs file | grep "core file" | sed -e 's/^.*from\//' -e s/\'//g` will return the name of the binary that generated the core file.
I have run the command and what it returned is a name of a binary eg. file1 without any path.
I reckon that I have to compare this name with all the names of the binary in all the paths presents in variable PATH of the environment.
If the 2 names match, then the core file should be deleted.
basically that's what I should do, but I don't know how to do the comparision, could you guys give me an example. the difficulty is that the PATH variable will return a whole bunch of paths separated by colon. does this have something to do with IFS? could u give me example? please!
then after the comparison, how do I delete the core file instead of the binary that generated the core files? what scheme should I use?
I'm completely new to this stuff, please help me
thank u
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Delete Core file in root directory

HP UX 11i Ok my server is about to run out of space, and i would like to know if there is something that i should be doing on a regular basis to maintain the machine like logs that i should clear or dmp file that i should delete... Thanks in Advance (2 Replies)
Discussion started by: bbutler3295
2 Replies

2. AIX

Why a core file is created whenever I send a mail in AIX

Whenever i send a mail like: mail <mail id>, a core file is created under /var/spool/mqueue/ path. This is increasing the space of the file system. Why is that core file get created. Does it happens normally. I am getting an errpt error as: LABEL: CORE_DUMP IDENTIFIER: B6048838 ... (0 Replies)
Discussion started by: sreereddy
0 Replies

3. AIX

I created a phantom file now i can't delete it?

Ok, somehow i've managed to create two .ksh files with the same name. Impossible i know but somehow i did it by mistake... I was actually copying a file and renaming it as something else but as i was typing the copy name i hit the delete key by mistake and got the ^? characters in the file name... (9 Replies)
Discussion started by: Jazmania
9 Replies

4. Programming

Not able to compile Pro*c file due - give errors and points to /usr/include/.. file

I am trying to compile the pro*C file but gives errors. It says it encountered "std" while it was expecting ; , = ( $ $ORACLE_HOME/bin/proc tradewind/dataaccess/Blob.pcc Pro*C/C++: Release 10.2.0.3.0 - Production on Fri May 9 11:10:54 2008 Copyright (c) 1982, 2005, Oracle. All rights... (0 Replies)
Discussion started by: shafi2all
0 Replies

5. UNIX for Dummies Questions & Answers

crashed HD file transfer

I created a bootable CD from Slax and can now access my crashed HD files. Problem is I can't move them to my USB HD even though the device is recognized. From what I have learned, I must "mount" the old HD and the good USB drive and then enter a copy command to permit the transfer (many GB's). ... (3 Replies)
Discussion started by: craigt
3 Replies

6. Red Hat

Process does not dump any core files when crashed even if coredumpsize is unlimited

Hello Im using redhat and try to debug my application , its crashes and in strace I also see it has problems , but I can't see any core dump I configured all the limit ( im using .cshrc ) and it looks like this : cputime unlimited filesize unlimited datasize unlimited... (8 Replies)
Discussion started by: umen
8 Replies

7. Shell Programming and Scripting

Script needed to delete to the list of files in a directory based on last created & delete them

Hi My directory structure is as below. dir1, dir2, dir3 I have the list of files to be deleted in the below path as below. /staging/retain_for_2years/Cleanup/log $ ls -lrt total 0 drwxr-xr-x 2 nobody nobody 256 Mar 01 16:15 01-MAR-2015_SPDBS2 drwxr-xr-x 2 root ... (2 Replies)
Discussion started by: prasadn
2 Replies

8. AIX

Advice on why Core file is not being created

We have a user where a process is behaving abnormally and crashing. It would be great if a core file was generated, but I don't see one. user101671:/apps/ -$lscore -d compression: on path specification: on corefile location: /opt/core naming specification: off There is no core file being... (3 Replies)
Discussion started by: netmaster
3 Replies

9. UNIX for Beginners Questions & Answers

Move the file from one path to another using .sh file in EBS Oracle apps.

Hi All, I just want to move the file from one path to another using .sh file in EBS oracle apps. I have written in .prog but i need in .sh (file.sh) XXC_SAMPLE_FILE.prog #!/bin/bash # XXC_SAMPLE_FILE.prog DATE_TIME=`date | awk {' print $1"_"$2"_"$3"_"$4 '}` echo "parse_parms" ... (4 Replies)
Discussion started by: Mist123
4 Replies

10. UNIX for Beginners Questions & Answers

Can you do remove core file based on what created them :(

Hi, Currently, we have a Perl script from a third-party vendor that is generating core dumps. It has been reported. We can't turn off the script as it does generate some diagnostic file that's required. So at the moment, we have to let it continue to do its run. I wish I can say the vendor is... (8 Replies)
Discussion started by: newbie_01
8 Replies
CORE(5) 							File Formats Manual							   CORE(5)

NAME
core - format of memory image file SYNOPSIS
#include <sys/param.h> DESCRIPTION
The UNIX System writes out a memory image of a terminated process when any of various errors occur. See sigvec(2) for the list of reasons; the most common are memory violations, illegal instructions, bus errors, and user-generated quit signals. The memory image is called `core' and is written in the process's working directory (provided it can be; normal access controls apply). The core file consists of the u. area, whose size (in 64 byte `clicks') is defined by the USIZE manifest in the <sys/param.h> file. The u. area starts with a user structure as given in <sys/user.h>. The rest of the u. area consists of the kernel stack for the terminated process which includes (among other things) the processor registers at the time of the fault; see the system listings for the format of this area. The remainder of the core file consists first of the data pages and then the stack pages of the process image. The amount of data space image in the core file is given (in clicks) by the variable u_dsize in the u. area. If the text segment was not write-only and and shared it is included as the first etext bytes of the data image where etext is taken from the symbol table of the object file which generated the memory image. The amount of stack image in the core file is given (in clicks) by the variable u_ssize in the u. area. In general the debugger adb(1) is sufficient to deal with core images. SEE ALSO
adb(1), sigvec(2), stack(5) 3rd Berkeley Distribution January 26, 1987 CORE(5)
All times are GMT -4. The time now is 01:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy