listing the whole system by filesize


 
Thread Tools Search this Thread
Operating Systems AIX listing the whole system by filesize
# 1  
Old 01-23-2009
listing the whole system by filesize

Hi,

Just wondered what command you would use to list all the files on Aix by filesize?

I've tried a few but none of which seem to do the trick!

Currently running du -m -a . | sort -rn | more as root

Thanks,

Matt.
# 2  
Old 01-23-2009
Use "find", get the filesize and sort this. Having no access to an AIX system right now i can only give you general directions, but it should be something along the lines of - :

Code:
find / -type f -ls | sed 's/[<spc><tab>][<spc><tab>]*/<spc>/g' | cut -d' ' -f7,11 | sort -n

You might have to adjust the values of the "-f" parameter to cut, these might not be the correct fields in the "ls -lisa" format "find" provides. Replace "<spc>" and "<tab>" with literal spaces and tab respectively of course.

I hope this helps.

bakunin
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

[Solved] How to remove listing of current user cmd from ps -ef listing?

Hi All, Could you please help to resolve my following issues: Problem Description: Suppose my user name is "MI90". i.e. $USER = MI90 when i run below command, i get all the processes running on the system containing name MQ. ps -ef | grep MQ But sometimes it lists... (8 Replies)
Discussion started by: KDMishra
8 Replies

2. Homework & Coursework Questions

Listing Live System Status

1. Edit a script named update.sh that generates status.html in your web directory: ~/public_html/. I need to write specific commands to show each specific item 2. The generated webpage should include information related to: UNIX : kernel version of ed-lab server USER : number of users on the... (13 Replies)
Discussion started by: devinj
13 Replies

3. Shell Programming and Scripting

getting filesize

Hello, I have a script that should store file size in a variable $filesize. I don't know what is the best way to do it. I tried ls -lt myfile.txt | sed something >$filesize but I don't know how to use sed to get filesize. I know that the owner of the file is root and then we have some... (6 Replies)
Discussion started by: pppswing
6 Replies

4. Shell Programming and Scripting

filesize

I want to know if there is any unix command to view the size of the file? eg. i have a directory letter in this i have file a,b,c,d,e. i just want to know the size of file d and not any other. (3 Replies)
Discussion started by: infyanurag
3 Replies

5. UNIX for Dummies Questions & Answers

Listing all links in a file system

How would one find and list all links in a file system? My situation is that I built several servers for disaster recovery, mirror images of several servers in our main location. Instead of doing a "ls -l" on every file system down the /usr structor to verify that I have all the necessary links... (3 Replies)
Discussion started by: ruger14
3 Replies

6. Shell Programming and Scripting

How to truncate as filesize?

Hello everybody it's me again. I have a procces that is writing in a 'file1' automatically but i want to truncate 'file1' to a filesize 'x' that mean if the 'file1' size is 'x' i want to delete the first lines while the last lines are being writed, that have sence? in the process are an... (1 Reply)
Discussion started by: Lestat
1 Replies

7. UNIX for Dummies Questions & Answers

Sorting ls by filesize

I saw some stuff in the search results on this - but nothing specific..... I have a significant number of files (c. 300) which are output from a large process that I run. These are compared with a 'baselined' set of files - so I can quickly see if there are differences based on the sizes of the... (2 Replies)
Discussion started by: peter.herlihy
2 Replies

8. Shell Programming and Scripting

FileSize ???

How do I identify if there is any content in a file? If there is nothing in a specified file, I'd like to send an email indicating that there is nothing to report. Any help appreciated. (3 Replies)
Discussion started by: Cameron
3 Replies

9. UNIX for Dummies Questions & Answers

Recursive directory listing without listing files

Does any one know how to get a recursive directory listing in long format (showing owner, group, permission etc) without listing the files contained in the directories. The following command also shows the files but I only want to see the directories. ls -lrtR * (4 Replies)
Discussion started by: psingh
4 Replies

10. Shell Programming and Scripting

filesize

I know in php if you use the function filesize it will return the size of the file in bytes, but is there an easy way to get the size in MB. Cheers (2 Replies)
Discussion started by: jmg5
2 Replies
Login or Register to Ask a Question