|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | Calendar | Search | Today's Posts | Mark Forums Read |
| HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V. |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi All
IN HPUX 11 How to delete an unwanted "core" file with a single command which is being generated in different locations of the system the command should be able to free up the space occupied by all "core" file which is present in different folders and filesytems in a system i tried echo ".">core which frees up the space occupied by core in present folder. When i find for term "core" i get files and folders named "core" Suggest command which should only delete the files with name "core" Thanks in Advance |
| Sponsored Links | ||
|
|
|
#2
|
|||
|
|||
|
find ..... rm
Quote:
find / -name core -exec rm -f {} \; will find all "core's" on the system and delete them. Regards |
|
#3
|
|||
|
|||
|
Be careful. There are files and directories called "core" on most unix systems (including HP-UX) which are not "core files". This is dangerous. Quote:
Code:
find // -type f -name core -exec file {} \;|grep "core file from"|awk -F: '{print $1}'Ps: I've seen a unix System V system destroyed by deleting everything called "core". |
|
#4
|
|||
|
|||
|
Hi Methyl
Thank you for your concern. Sorry for the delayed response I shall try your suggestion and Revert. Thanks Again sidharth |
|
#5
|
|||
|
|||
|
Its good to use ok instead of exec, and confirm before you delete each file.
|
|
#6
|
|||
|
|||
|
Quote:
How he chortled when we hosed his files during the housekeeping run. Still, it was a good test of the backups ![]() Paul. |
| Sponsored Links | ||
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ls > file - Creating file containing the list of all files present in a directory | pranavagarwal | Shell Programming and Scripting | 1 | 09-26-2008 08:37 PM |
| Script to find all the files that contain any of the words present in another file | tsanthosh | Shell Programming and Scripting | 4 | 05-21-2008 02:29 AM |
| Script for Deleting Core files on root filesystem | rgfirefly24 | Shell Programming and Scripting | 7 | 02-11-2008 04:41 PM |
| deleting files based on file name and modified time | ammu | UNIX for Dummies Questions & Answers | 1 | 01-22-2008 10:09 AM |
| Deleting core file?? | alc640 | UNIX for Dummies Questions & Answers | 1 | 04-13-2007 09:52 AM |