- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to find no. of core files in /home?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2003 08:20 AM
05-20-2003 08:20 AM
I need to find out the number of core files in /home (Note only files and not directories) and also would like to know the space they occupy together. Please let me know how to do it. We have in /home lot of core directories too(for Appln. purposes and i do not need them). I just need the core files sizes and i need to know if i clear them how much space i would get.
Thanks
David.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2003 08:23 AM
05-20-2003 08:23 AM
			
				
					
						
							Re: How to find no. of core files in /home?
						
					
					
				
			
		
	
			
	
	
	
	
	
find . -name core
Regards,
RZ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2003 08:24 AM
05-20-2003 08:24 AM
			
				
					
						
							Re: How to find no. of core files in /home?
						
					
					
				
			
		
	
			
	
	
	
	
	
# find . -type f -name core -exec ls -ld {} \;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2003 08:25 AM
05-20-2003 08:25 AM
			
				
					
						
							Re: How to find no. of core files in /home?
						
					
					
				
			
		
	
			
	
	
	
	
	
Whoops, forgot the wc
cd /home
find . -name core | wc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2003 08:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2003 09:00 AM
05-20-2003 09:00 AM
			
				
					
						
							Re: How to find no. of core files in /home?
						
					
					
				
			
		
	
			
	
	
	
	
	
I used JRF's method for core and it gave back the following when i run the script. could anyone tell me what this means??
3.82385e+06
I just substituted .profile with core in his script.
Thanks
David.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2003 09:09 AM
05-20-2003 09:09 AM
			
				
					
						
							Re: How to find no. of core files in /home?
						
					
					
				
			
		
	
			
	
	
	
	
	
That's standard scientific notation for 3.82385 multiplied by ten to the sixth power, or 3,823,850.
If you prefer, we can format your output. Change the 'awk' protion to read:
# ... awk 'END{printf "%10d\n",SZ}; {SZ=SZ+$5}'
...this will right justify a 10-digit decimal number.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2003 09:16 AM
05-20-2003 09:16 AM
			
				
					
						
							Re: How to find no. of core files in /home?
						
					
					
				
			
		
	
			
	
	
	
	
	
Try this:
find /home -type f -name core -exec ls -ld {} \; | awk '{ print $5, $9 }'
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2003 09:36 AM
05-20-2003 09:36 AM
			
				
					
						
							Re: How to find no. of core files in /home?
						
					
					
				
			
		
	
			
	
	
	
	
	
As you are curious how much space you will gain after deleting core files I have to add, that 'ls' command returns the _length_ of the file.
core files are so-called sparse files, in other words the have a lot of empty 'holes'. With i-node philosophy these holes are mostly not written and do not occupy any space on disk. It is possible that the long file does not occupy so much space on disk.
To check how much disk space is really used I would suggest 'du' command instead of 'ls -ld'. This command gives you the number of half-kB blocks occupied by the file instead of simple bytes.
Good luck
Adam
