Determine whether given file is a core file. Works on CentOS and Ubuntu. Args: file_path: full path to a possible core file
(file_path)
| 68 | |
| 69 | |
| 70 | def is_core_dump(file_path): |
| 71 | """ |
| 72 | Determine whether given file is a core file. Works on CentOS and Ubuntu. |
| 73 | |
| 74 | Args: |
| 75 | file_path: full path to a possible core file |
| 76 | """ |
| 77 | file_std_out = exec_local_command("file %s" % file_path) |
| 78 | return "core file" in file_std_out and 'ELF' in file_std_out |