Find file more than 500 MB | Unix Linux Forums | HP-UX

  Go Back    


HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

Find file more than 500 MB

HP-UX


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 07-11-2013
mohtashims mohtashims is offline
Registered User
 
Join Date: Jun 2011
Last Activity: 13 August 2014, 4:25 PM EDT
Posts: 357
Thanks: 81
Thanked 0 Times in 0 Posts
Lightbulb Find file more than 500 MB

Hi,

I used to use the below command on Solaris


Code:
find /var/tmp -size +500000 -exec ls -e {} \;

but this command does not seem to work on HP-UX.

Can you help me list all files under /var/tmp and its sub-directories which are more than 500MB in size ?
Sponsored Links
    #2  
Old 07-11-2013
vidyadhar85's Avatar
vidyadhar85 vidyadhar85 is offline Forum Advisor  
The Tutor
 
Join Date: Jun 2008
Last Activity: 9 April 2014, 1:31 AM EDT
Location: INDIA, Bangalore
Posts: 2,049
Thanks: 16
Thanked 106 Times in 102 Posts
what part of the command is not working for you?
Sponsored Links
    #3  
Old 07-11-2013
mohtashims mohtashims is offline
Registered User
 
Join Date: Jun 2011
Last Activity: 13 August 2014, 4:25 PM EDT
Posts: 357
Thanks: 81
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by vidyadhar85 View Post
what part of the command is not working for you?
It does not throw any error but does not list all the files more than 500 MB
    #4  
Old 07-11-2013
vidyadhar85's Avatar
vidyadhar85 vidyadhar85 is offline Forum Advisor  
The Tutor
 
Join Date: Jun 2008
Last Activity: 9 April 2014, 1:31 AM EDT
Location: INDIA, Bangalore
Posts: 2,049
Thanks: 16
Thanked 106 Times in 102 Posts
so its listing some files which are above 500MB?

-size +500M will also do the same i am just concerned about the ownership and special files
Sponsored Links
    #5  
Old 07-11-2013
mohtashims mohtashims is offline
Registered User
 
Join Date: Jun 2011
Last Activity: 13 August 2014, 4:25 PM EDT
Posts: 357
Thanks: 81
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by vidyadhar85 View Post
so its listing some files which are above 500MB?

-size +500M will also do the same i am just concerned about the ownership and special files
==> find /tmp/var -size +500M -exec ls -ltre {} \;
find: Error in processing the argument 500M

The OP command does not list all the files more than 500 MB. Permission is not an issue. The command or parameter looks to be a inappropriate.
Sponsored Links
    #6  
Old 07-11-2013
vidyadhar85's Avatar
vidyadhar85 vidyadhar85 is offline Forum Advisor  
The Tutor
 
Join Date: Jun 2008
Last Activity: 9 April 2014, 1:31 AM EDT
Location: INDIA, Bangalore
Posts: 2,049
Thanks: 16
Thanked 106 Times in 102 Posts
I am unable to spot any issues with the command here
Sponsored Links
    #7  
Old 07-11-2013
vbe's Avatar
vbe vbe is offline Forum Staff  
Moderator
 
Join Date: Sep 2005
Last Activity: 20 August 2014, 3:34 PM EDT
Location: Switzerland - GE
Posts: 5,634
Thanks: 152
Thanked 387 Times in 366 Posts
On HP /var/tmp could very well be a link....

Code:
find /var/tmp/. -size +500000 -exec ls -el {} \;

-e option of ls is to be used with -l ...
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
wanted to find both link file and ordinary file using single find command nikhil jain Shell Programming and Scripting 2 03-20-2012 10:30 AM
Find directories that are not used for 500 days sajuatl Shell Programming and Scripting 1 01-09-2012 01:07 AM
script to constantly read the last 500 new logs in a log file Pouchie1 Shell Programming and Scripting 1 05-07-2011 07:07 PM
Fill the values between -500 to 500 -awk quincyjones Shell Programming and Scripting 6 10-07-2010 04:01 AM
HTTP Status 500 fredginting Windows & DOS: Issues & Discussions 2 08-24-2007 05:08 AM



All times are GMT -4. The time now is 06:24 PM.