Need help with listing and sorting in DGUX


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Need help with listing and sorting in DGUX
# 1  
Old 03-15-2010
Need help with listing and sorting in DGUX

Hello all, very much a Unix newbie.

My company has an old DG/UX system we use for customer data. I need to archive some data to clear some space, so I wanted to be able to list items in each directory by size, to grab some "low hanging" fruit to give me some breathing room as the system is constantly at 90% capacity.

For my examples here I will be using my /var directory, even though it's not what I am cleaning out.

So I go into the directory and do a

Code:
ls -alFRC

I get a gorgeous listing of where, why, how, etc that recursively goes into each directory and lists the contents.

Code:
/X11:
total 2
drwxrwxrwx   3 bin      bin             512 Mar 13  2001 ./
drwxr-xr-x  28 bin      bin             512 Mar 15 16:31 ../
drwxrwxrwx   2 bin      bin               0 Mar 13  2001 DGShm/

./X11/DGShm:
total 1
drwxrwxrwx   2 bin      bin               0 Mar 13  2001 ./
drwxrwxrwx   3 bin      bin             512 Mar 13  2001 ../

*BUT* I want to list it by filesize! So if I do a:

Code:
ls -alFRC | sort +4 -rn

I get not as nice of a list, but everything is sorted by size.

Code:
-rw-------   1 sadis    general   172380665 Mar 15 15:44 U1184l0r
-rw-------   1 sadis    general    26310424 Mar 15 15:30 U2761l0r
-rw-r--r--   1 root     root       15907176 Mar 15 10:31 kernel_debug_messages
-rw-r--r--   1 root     other      15164310 Mar  1 03:17 messages-1
-rw-rw-r--   1 root     other       5548380 Feb  1 23:00 wtmpx-2
-rw-------   1 gflwh    general     4848538 Mar 15 15:53 35854-1
-rw-rw-r--   1 root     other       4285440 Mar  1 23:00 wtmpx-1
-rw-r--r--   1 root     root        1892052 Jun 12  2007 spd.lyndatest
-rw-rw-r--   1 root     other       1860372 Mar 15 16:33 wtmpx
-rw-------   1 dob      general      476312 Feb 15 09:06 U11092l0r
-rw-------   1 ljris    general      402314 Mar 15 14:14 U722l0r
-rw-r--r--   1 root     other        359697 Dec 30 16:04 a006oV
-rw-------   1 run      general      332676 Jan  5 13:42 U16535l0r

The thing is, I could really use the syntax of the first one, that listed things by directory, and *then* by size. Is there a way to do both?

Before you tell me to use the -S option with ls, save your breath. DG/UX considers it an illegal option.

Thanks in advance.

Last edited by Franklin52; 03-15-2010 at 06:07 PM.. Reason: Please use code tags!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

sed with listing

Hi, I would like to get latest file with using listing tail and want to replace header's first column starting from # to nothing. I am using this to replace first header # code :-sed '1s/#//' but I want to do something like this. Code :- ls promo_random.csv | tail -1 | sed '1s/#//'... (4 Replies)
Discussion started by: himanshupant
4 Replies

2. 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

3. UNIX for Dummies Questions & Answers

listing files

how would i list all files that began witha "t" and have any number of characters after the "t"? (2 Replies)
Discussion started by: trob
2 Replies

4. IP Networking

Problem configuring NIC in DGUX

Old DG box Aviion PentiumPro running R4.20Mu06 being used to try to recreate Ingres db from backup tapes so machine has not been operational before and some of original files in /etc may have ben overwritten Unable to get NIC working Any pointers on how to go about configuring NIC :rolleyes: (0 Replies)
Discussion started by: lindab
0 Replies

5. UNIX for Dummies Questions & Answers

Sorting Directory Listing

If I do an ls -l on a directory I get this: -rw-r--r-- 1 root other 5248094 Jun 24 03:56 monitor.log.7 -rw-r--r-- 1 root other 5248303 Jul 11 11:19 ct.log.1 -rw-r--r-- 1 root other 5248907 Jun 29 06:01 ct_monitor.log.5 -rw-r--r-- 1 root other 5249042 Jun 19... (1 Reply)
Discussion started by: Sepia
1 Replies

6. UNIX for Dummies Questions & Answers

DGUX manuals

Hi Anyone know where i get DGUX manuals.... Cheers (1 Reply)
Discussion started by: Flipper_Al
1 Replies

7. Programming

Listing Files

Dear All, I want to list all the files of a Directory. I am not able to find out the code. So plz send me code in C in Unix Environmrnt so that I can Display all the file names of a Directory (3 Replies)
Discussion started by: krishna_sicsr
3 Replies

8. Shell Programming and Scripting

need help listing/sorting files

I am currently attempting to create a file which I access from an oracle form. At the minute I do a host command and run an ls -l e.g. /bin/ls -l /dir/dir/dir/ > /tmp/list.txt I then read this file within my oracle form. However I want the user to be able to restrict, sort and filter the... (2 Replies)
Discussion started by: dave_angel
2 Replies

9. Linux

Listing of files

How can I list all files in a directory and its subdirectories that have been created or changed since the system was booted. I was trying to acomplish this with "ls" and "find" commands but could not get anything usefull. Maybe some one can provide me a hint. Thank you for your time. (1 Reply)
Discussion started by: Vitalka
1 Replies

10. 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
Login or Register to Ask a Question