- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- 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
12-20-2002 05:29 AM
12-20-2002 05:29 AM
List files by size
what is the command in HP-UX that I can list a diretory by size?
I know that Linux its possible using the command:
ls -ls
How can I do this in HP-UX?
Regards,
Marcelo Muzilli
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2002 05:31 AM
12-20-2002 05:31 AM
Re: List files by size
or
# ll -d
Regards,
Armin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2002 05:35 AM
12-20-2002 05:35 AM
Re: List files by size
ll |sort -k 5
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2002 05:37 AM
12-20-2002 05:37 AM
Re: List files by size
or
# du -r
see also
# man du
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2002 05:37 AM
12-20-2002 05:37 AM
Re: List files by size
Or how about
# du -ks *|sort -rn
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2002 05:42 AM
12-20-2002 05:42 AM
Re: List files by size
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2002 05:52 AM
12-20-2002 05:52 AM
Re: List files by size
# ls -l | sort -k 5
total 90
lr-xr-xr-t 1 root sys 8 Oct 24 17:19 bin -> /usr/bin
lr-xr-xr-t 1 root sys 8 Oct 24 17:19 lib -> /usr/lib
drwxr-xr-x 2 root sys 96 Nov 1 07:35 snap
drwxr-xr-x 2 root sys 96 Oct 25 08:58 cdrom2
drwxr-xr-x 3 root sys 96 Oct 25 09:07 .sw
drwxr-xr-x 3 root sys 96 Oct 25 11:40 bmpdb
drwxrwxr-x 2 root sys 96 Oct 28 09:20 cdrom
-rw------- 1 root sys 98 Dec 20 10:32 .Xauthority
-rw------- 1 root sys 108 Dec 9 14:51 .sh_history
-rw------- 1 root sys 179 Oct 29 08:15 nohup.out
drwxr-xr-x 2 root root 96 Oct 24 16:08 lost+found
dr-xr-xr-x 2 root root 96 Oct 24 17:39 tmp_mnt
drwxr-xr-x 3 root root 96 Oct 25 11:39 home
-r--r--r-- 1 bin bin 1014 Nov 27 11:38 .profile
drwxr-xr-x 11 root sys 1024 Dec 20 10:32 .dt
drwxr-xr-x 4 root sys 1024 Nov 1 07:35 online_backup
drwxr-x--- 2 root sys 1024 Nov 25 12:06 gcc
dr-xr-xr-x 25 bin bin 1024 Nov 27 11:14 opt
dr-xr-xr-x 23 bin bin 1024 Oct 24 17:19 usr
dr-xr-xr-x 18 bin bin 1024 Oct 24 17:32 var
dr-xr-xr-x 6 bin bin 1024 Oct 25 12:39 stand
-rw-r--r-- 1 root sys 2040 Dec 20 10:34 txt.txt
-rw------- 1 root sys 2861 Dec 20 10:32 .ICEauthority
dr-xr-xr-x 12 bin bin 3072 Oct 25 12:43 sbin
dr-xr-xr-x 15 bin bin 4096 Dec 9 09:48 dev
dr-xr-xr-x 1 root root 512 Dec 9 09:48 net
-rwxr-xr-x 1 root sys 5452 Oct 25 06:43 .dtprofile
dr-xr-xr-x 23 bin bin 6144 Dec 10 15:36 etc
drwxrwxrwx 50 bin bin 7168 Dec 20 10:47 tmp
drwxr-xr-x 7 root root 1024 Dec 10 15:36 mnta2
drwxr-xr-x 15 root root 1024 Oct 31 15:37 mnta1
The question is: why the /net directory is after /dev directory (4096 is greater than 512) ?
Regards,
Muzilli
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2002 05:57 AM
12-20-2002 05:57 AM
Re: List files by size
ll | sort -nk 5
This treats field 5 (file size) as being purely numeric. Just using -k 5 will mean that it treats it as a character string, so anything starting with 4 is dispalyed before things starting with 5.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2002 07:45 AM
12-20-2002 07:45 AM
Re: List files by size
ll | sort -nk 5
Cheers,
Marcelo Muzilli
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2002 07:57 AM
12-20-2002 07:57 AM
Re: List files by size
Pete
Pete