LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices



Reply
 
Search this Thread
Old 08-22-2011, 03:20 AM   #1
shravee
Member
 
Registered: Sep 2009
Posts: 60

Rep: Reputation: 15
Post how to use find command to use effectively.


hi,

I have few core files in my working dir.

the dir has foll type of files

core.3423.232.tmp
core.332.3423.txt
core.42342.342.dmp
core.3432.342234.gz
javacore.3423432.3423
core.43243.3424

out of these type of core files i need to remove only the type which is shown in bold.
i.e. core.43243.3424


the nos are not the same, they vary.

can someone please help on the same. should i use find command or a normal ls and then grep and rm will work ?

so far, I have used the foll cmd to list all core files. I am unaware now to exclude the unwanted core files . Plz help.

find . \( -name core\* -type f \) -exec ls {} \;



rgds

shravee
 
Old 08-22-2011, 03:49 AM   #2
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
some find tips
 
Old 08-22-2011, 03:54 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

Tested on a none AIX system:
Code:
find . -type f -name "core.[0-9]*" ! -name "core.[0-9]*[a-z]*"
The ! -name "core.[0-9]*[a-z]*" part excludes parts.

Hope this helps.
 
  


Reply

Tags
coredump, find


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Find a file in directories without using find command sikanders Linux - Newbie 14 08-06-2010 09:47 PM
How i can use the DVD effectively?? vskram21 Linux - General 2 11-16-2009 09:33 AM
Find/grep/wc command to find matching files, print filename and word count dbasch Linux - Newbie 10 09-14-2009 06:55 PM
Single find command to find multiple files? thok Linux - Newbie 7 01-31-2009 05:45 PM
How to comment effectively? Any tips? pwc101 Programming 13 06-05-2007 03:41 AM


All times are GMT -5. The time now is 01:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration