- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- searching files datewise and sizewise in a particu...
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
01-17-2006 04:13 AM
01-17-2006 04:13 AM
I am using the below commands to find the files generated after 15th jan 2006.
$ touch -amt 01150001 /tmp/jasmine
$ find /opt/bea -type f -newer /tmp/jasmine -exec ls -l {} \;
Now suppose i want to know the files having size more than 25MB or 1.5 GB then how do i include in the above command ?
Thanks,
Shiv
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2006 04:19 AM
01-17-2006 04:19 AM
Re: searching files datewise and sizewise in a particular file system
find /opt/bea -type f -newer /tmp/jasmine -size +25000c -exec ls -l {} \;
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2006 04:29 AM
01-17-2006 04:29 AM
SolutionSo 25MB would be:
find /opt/bea -type f -newer /tmp/jasmine -size +25000000c -exec ls -l {} \;
For 1.5GB:
find /opt/bea -type f -newer /tmp/jasmine -size +1500000000c -exec ls -l {} \;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2006 04:35 AM
01-17-2006 04:35 AM
Re: searching files datewise and sizewise in a particular file system
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2006 04:45 AM
01-17-2006 04:45 AM
Re: searching files datewise and sizewise in a particular file system
for size use "-size +25000000c " parameter with find command , i.e 25MB.
+25000000c = 25+6(zero) Byte = 25 Mega Byte.
Cheers,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2006 04:52 AM
01-17-2006 04:52 AM
Re: searching files datewise and sizewise in a particular file system
If you want to count in blocks (1-block = 512 characters) drop the "c" from the size specification.
See the manpages for 'find'. The specification of a numeric argument to options like '-size' can be positive (more than); negative (less than) or equal (unsigned).
You can also add boolean logic with '-a' and/or '-o'. Parentheses need to be escaped. Thus we could write:
# find /opt/bea -type f -newer /tmp/jasmine -a \( -size +25000000c -a -size -15000000000c \) -exec ls -l {} \;
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2006 03:00 PM
01-17-2006 03:00 PM
Re: searching files datewise and sizewise in a particular file system
Specifying -size with find will be helpful to you.
# find /opt/bea -type f -newer /tmp/jasmine -size 25000 -exec ls -l {} \;
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2006 03:16 PM
01-17-2006 03:16 PM
Re: searching files datewise and sizewise in a particular file system
you may also wish to redirect the output to a file for easy review after the execution of the command.
... -exec ls -l {} >> /tmp/mylog.log \;
helpful in cases where you have many files
hope this helps!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2006 03:40 PM
01-17-2006 03:40 PM
Re: searching files datewise and sizewise in a particular file system
use the switch "size" along with the find command.
ex:
$DIR=/opt/bea
find $DIR -type f -newer /tmp/jasmine -size 25000 | xargs ls -lrt