[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: removing the core file...



You can make the script shorter (and more accurate) with:

	find . -type f -name core | xargs rm -f

The -type f ensures that you don't remove any devices and/or
directories named core by mistake (yes, some Unix's do have devices
named core, and the Linux kernel has a subdirectory called core).

- -- Raju

>>>>> "Rajasankar" == Rajasankar K <kraja@xxxxxxxxxxxx> writes:

    Rajasankar> Hi Gaurav, Try this script.

    Rajasankar> #!/usr/bin/sh cd corefiles=`find . -name core` if [
    Rajasankar> $corefiles ] then rm $corefiles fi

    Rajasankar> If your machine is ON for always(server) then you can
    Rajasankar> call this script from cron. You can schedule for
    Rajasankar> midnight. To know more about cron see man crontab.

    Rajasankar> Regards, Rajasankar.


    Rajasankar> Gaurav Bhatnagar wrote:

    >> Hi all I would like to make some additons to my .bashrc file to
    >> ensure that everytime i login if any core file exists in my
    >> home directory then it gets deleted by itself. I cud have
    >> simply added "rm core" but then when a core doesnt exist it
    >> will give an unnecssary error!  One more question, if i am
    >> working in Xwindows and i have no xterm , rxvt etc opened then
    >> if somebody sends me a talk request what happens to it..i mean
    >> do I come to know of the request?  TIA Gaurav

- --------------------------------------------------------------------
For more information on Linux in India visit http://www.linux-india.org/
The Linux India mailing list does not accept postings in HTML format.

------------------------------