(Answer) (Category) OSU Physics Faq's : (Category) Linux :
How do I avoid getting large core files?
You can set a maximum coredump file size. The default size is probably quite large. For example, in Redhat Linux 6.x, the default core file size is 1GB.

You can see and change your core file size limit and other limits. The command will depend on the shell you use.

If you use tcsh, then the "limit" command gives the info:

  ==> limit
  cputime       unlimited
  filesize      50000 kbytes
  datasize      unlimited
  stacksize     8192 kbytes
  coredumpsize  1000000 kbytes
  memoryuse     unlimited
  descriptors   1024 
  memorylocked  unlimited
  maxproc       256 
  openfiles     1024 
To eliminate core files, give the command
  ==> limit coredumpsize 0
You can put this command in your .cshrc start-up file so that it takes effect in every shell.

If you use bash, then the corresponding command is "ulimit -a" (the "-a" is for "all").

  [furnstah@ntg4004 furnstah]$ ulimit -a
  core file size (blocks)  1000000
  data seg size (kbytes)   unlimited
  file size (blocks)       50000
  max memory size (kbytes) unlimited
  stack size (kbytes)      8192
  cpu time (seconds)       unlimited
  max user processes       256
  pipe size (512 bytes)    8
  open files               1024
  virtual memory (kbytes)  2105343
To eliminate core files, give the command
  [furnstah@ntg4004 furnstah]$ ulimit -c 0
You can put this command in one of your .bashrc start-up file so that it takes effect in every shell.

2000-Jan-25 11:29am furnstahl.1@osu.edu
[Append to This Answer]
2000-Jan-25 11:29am
Previous: (Answer) How can I ftp a large file without getting a "file too large" error?
Next: (Category) How do I find out the screen resolution?
This document is: http://www.physics.ohio-state.edu/cgi-bin/fom?file=58
[Search] [Appearance] [Show Expert Edit Commands]
This is a Faq-O-Matic 2.721.