- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- How to list files by size
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
04-06-2005 11:44 PM
04-06-2005 11:44 PM
How to list files by size
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2005 12:12 AM
04-07-2005 12:12 AM
Re: How to list files by size
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2005 12:43 AM
04-07-2005 12:43 AM
Re: How to list files by size
A commandfile doing directory and sorts it by size was posted on comp.os.vms some years ago,
it does what You want probably: see the attachemnt.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2005 01:28 AM
04-07-2005 01:28 AM
Re: How to list files by size
If you are familiar with perl, or willing to go there, then you might consider a script like below:
----- tmp.pl ----
$wildcard_spec=shift @ARGV or die "Please provide wildcarded filespec(s)";
while ($wildcard_spec) {
foreach (glob $wildcard_spec) {
$size{$_} = -s;
}
$wildcard_spec=shift @ARGV;
}
foreach (sort {$size{$b} <=> $size{$a}} keys %size) {
printf "%9dKB %s\n", $size{$_}/1024, $_;
}
---- sample usage ----
$ pipe perl tmp.pl *.txt *.obj | perl -ne "print if ($i++ < 10)"
976KB rmsstats_all.txt
58KB etrade.txt
38KB security.txt
32KB s.obj
24KB copy_lbn.obj
24KB a.txt
22KB b.txt
15KB getuai.obj
13KB intercept.txt
10KB test.txt
hth,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2005 02:29 AM
04-13-2005 02:29 AM
Re: How to list files by size
Just remove "desc" to change order.
$ pip dir/siz/wid=file=40 | sort/key=(pos:42,siz:8,desc) sys$input sys$output
Regards,
Hakan