Sponsored Content
Top Forums UNIX for Dummies Questions & Answers list file's by size order in sepecfied directory and sub directories Post 12608 by doeboy on Thursday 3rd of January 2002 06:55:26 PM
Old 01-03-2002
You could try something like this if you don't care that each directories' contents alre all mixed together....

ls -lR | sort -bn +4 (smallest to largest)

or

ls -lR | sort -bnr +4 (largest to smallest)
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How one can list only the name of directories present in the directory by using ls co

How one can list only the name of directories present in the directory by using ls command. (2 Replies)
Discussion started by: amolpatil54321
2 Replies

2. UNIX for Dummies Questions & Answers

Sort by size, then list file in each directory

Hi, I have directories with name like: aaa bbb ccc ... I would like to to see which directories are the largest and then list the files within each. I have success using: du -ks * | sort -rin | head -n 20 which gives me an output like: 120 bbb 27 ccc 3 aaa ... I would like... (3 Replies)
Discussion started by: ChatPerdu
3 Replies

3. Solaris

How list all directories in a directory?

Hi How can i list all the directories inside a directory? not only the directories in the present dir. also the directories inside directories present in the dirrectory. recursive. "find . -type d" will work with other Unix flavors but not with SunOS. Please help Robin (1 Reply)
Discussion started by: robinbannis
1 Replies

4. UNIX for Dummies Questions & Answers

How can I list the file under a directory both in alphabetical and in reverse alphabetical order?

How can I list the file under current directory both in alphabetical and in reverse alphabetical order? (1 Reply)
Discussion started by: g.ashok
1 Replies

5. Shell Programming and Scripting

Finding directory and sub-directories individual size in Perl

Hi, Can anyone redirect to an existing thread or provide some info on how to find the size of a directory and it's sub-directories using a single script ? I tried finding a similar thread but in vain. I'm a newbie and any help would be greatly appreciated. Thanks in advance. (3 Replies)
Discussion started by: ryder
3 Replies

6. Shell Programming and Scripting

How to list all the directories, sub directories in a mount along with size in ascending order?

Hi , I am very new to unix as well as shell scripting. I have to write a script for the following requirement. In a particular mount, have to list all the directories and sub directories along with size of the directory and sub directory in ascending order. Please help me in this regard and many... (4 Replies)
Discussion started by: nmakkena
4 Replies

7. Shell Programming and Scripting

How to list all the files, directories and sub-directories in the current path except one directory?

Can anyone come up with a unix command that lists all the files, directories and sub-directories in the current directory except a folder called log.? Thank you in advance. (7 Replies)
Discussion started by: Manjunath B
7 Replies

8. Shell Programming and Scripting

Looping inside directories based on a file which contains file directory list

Hi All, Please help. I have got a file which contains a listing of a file and some directories after it, one by one. I am calling this file xyz.txt here file1 dir1 dir2 dir3 dir4 file2 dir5 dir6 dir7 dir8 file3 dir9 dir10 dir11 dir12 (6 Replies)
Discussion started by: Piyush Jakra
6 Replies

9. Shell Programming and Scripting

Directory listing in the order of size

I want to display directory listing in the order of size. I do not have -S option in my version of UNIX. So I wrote a simple script. But it takes "| sort -n -k5,5" part as file names. Any suggestion? #!/bin/ksh cmd='ls -l *.TXT | sort -n -k 5,5' set -x $cmd return 0 (7 Replies)
Discussion started by: Soham
7 Replies

10. Shell Programming and Scripting

How to sort list of directories in descending order in perl?

Hi, I have a problem . I have few directories like inpTDT_1, inpTDT_2, inpTDT_3 and so on inside HOME directory . In one of my perl script (which is in my HOME), the above directories like inpTDT_1, inpTDT_2, inpTDT_3 are sorting out in an order So I wanted to sort all the inpTDT_1, inpTDT_2,... (1 Reply)
Discussion started by: venkatesh
1 Replies
mkepmlist(1)						      Easy Software Products						      mkepmlist(1)

NAME
mkepmlist - make an epm list file from a directory. SYNOPSIS
mkepmlist [ -g group ] [ -u user ] [ --prefix directory ] directory [ ... directory ] DESCRIPTION
mkepmlist recursively generates file list entries for files, links, and directories. The file list is send to the standard output. The -g option overrides the group ownership of the files in the specified directories with the specified group name. The -u option overrides the user ownership of the files in the specified directories with the specified user name. The --prefix option adds the specified directory to the destination path. For example, if you installed files to "/opt/foo" and wanted to build a distribution that installed the files in "/usr/local", the following command would generate a file list that is installed in "/usr/local": mkepmlist --prefix=/usr/local /opt/foo >foo.list SEE ALSO
epm(1) - create software packages epminstall(1) - add a directory, file, or symlink to a list file epm.list(5) - epm list file format COPYRIGHT
Copyright 1999-2007 by Easy Software Products, All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 3 April 2006 ESP Package Manager mkepmlist(1)
All times are GMT -4. The time now is 01:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy