Sponsored Content
Full Discussion: Ls -al / du
Top Forums Shell Programming and Scripting Ls -al / du Post 302927720 by junior-helper on Friday 5th of December 2014 02:03:42 AM
Old 12-05-2014
Daniel,
is it the output of the find command? I ask this because the biggest file is ~10MB.

You mentioned UNIX 6.1, did you mean AIX 6.1? If so, then try:
Code:
find /opt -type f -size +100000000c -exec ls -l  {} \;

Quote:
Would it be possible to convert the size into MB and then sort them by descending order of the file size?
Yes, the above find command should print files greater than 100000000 bytes (~100MB). Then extend the find command like so
Code:
find /opt -type f -size +100000000c -exec ls -l  {} \; | sort -nrk5,5 | awk '{$5=$5/1024/1024}1'

Sample output (before sort & awk):
Code:
-rw-r-----   1 oracle   dba      104865792 Jan  1 00:00 ./example01.dbf
-rw-r-----   1 oracle   dba      513810432 Jan  1 00:00 ./system01.dbf
-rw-r-----   1 oracle   dba      272637952 Jan  1 00:00 ./sysaux01.dbf

Sample output (after sort & awk):
Code:
-rw-r----- 1 oracle dba 490.008 Jan  1 00:00 ./system01.dbf  # 490 MB
-rw-r----- 1 oracle dba 260.008 Jan  1 00:00 ./sysaux01.dbf  # 260 MB
-rw-r----- 1 oracle dba 100.008 Jan  1 00:00 ./example01.dbf # 100 MB

Hope this helps.
This User Gave Thanks to junior-helper For This Post:
 
XBase::SDBM(3)						User Contributed Perl Documentation					    XBase::SDBM(3)

NAME
XBase::SDBM - SDBM index support for dbf DESCRIPTION
When developing the XBase.pm/DBD::XBase module, I was trying to support as many existing variants of file formats as possible. The module thus accepts wide range of dbf files and their versions from various producers. But with index files, the task is much, much harder. First, there is little or no documentation of index files formats, so the development is based on reverse engineering. None if the index formats support is finalized. That made it hard to integrate them into one consistent API. That is why I decided to write my own index support, and as I wanted to avoid inventing yet another way of storing records in pages and similar things, I used SDBM. It comes with Perl, so you already have it, and it's proven and it works. Now, SDBM is a module that aims at other task than to do supporting indexes for a dbf. But equality tests are fast with it and I have creted a structure in each index file to enable "walk" though the index file. VERSION
0.200 AUTHOR
(c) 2001 Jan Pazdziora, adelton@fi.muni.cz, http://www.fi.muni.cz/~adelton/ at Faculty of Informatics, Masaryk University in Brno, Czech Republic All rights reserved. This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.1 2001-08-19 XBase::SDBM(3)
All times are GMT -4. The time now is 06:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy