Sponsored Content
Top Forums UNIX for Beginners Questions & Answers UNIX commands to display the biggest file by size in a directory Post 303008669 by wbport on Monday 4th of December 2017 06:11:38 PM
Old 12-04-2017
You might want to give this version a try:
Code:
rev=""
if [ $# -gt 0 ]
  then
  if [ $1 = '-r' ]
  then
    rev="r"
#   echo $rev
    shift
  fi
fi
ls -l $* |grep -v "total " |sort +4n$rev -5 +8 |more -e

It lists all files (or star name convention) in increasing size or, with "-r" as the first parm, in decreasing size. Ties are alphabetical by file name.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How can I get the directory size in Unix?

Hi,everyone, Can I use UNIX command to get a directory size in UNIX ? I am developing a software using C in UNIX. How can I get the directory size? Thanks Harry (1 Reply)
Discussion started by: HarryHong
1 Replies

2. UNIX for Dummies Questions & Answers

Display Directory Size - DF?

How can I display the size of a directory and contents witin a directory df only gives me the mounts (3 Replies)
Discussion started by: t4st33@mac.com
3 Replies

3. UNIX for Advanced & Expert Users

Unix Commands to display the Filesnames

Query: In a directory there are 20 files, I have to display the Filenames which contains the content as JAVA in any line of the file. Please tell me the command or commands. (3 Replies)
Discussion started by: kish_kk84
3 Replies

4. UNIX for Dummies Questions & Answers

Disk Usage in GB and Unix command to find the biggest file/folder

Hi All, Please help me out 1) Command to find the disk usage in GB. I know that du -k will give in kilobites. 2) How to find the Biggest file/folder in a given set of files/folders. Thanks in advance Regards, Manas (8 Replies)
Discussion started by: manas6
8 Replies

5. UNIX for Dummies Questions & Answers

Display directory size

Hi all, Is there any built in function that can display the content of a directory showing the size of directories? I want to see the content of a directory without recursion. I don't want to see the content of all subdirectories. I want to see the contained files with their size and the... (6 Replies)
Discussion started by: chebarbudo
6 Replies

6. Solaris

Directory size larger than file system size?

Hi, We currently have an Oracle database running and it is creating lots of processes in the /proc directory that are 1000M in size. The size of the /proc directory is now reading 26T. How can this be if the root file system is only 13GB? I have seen this before we an Oracle temp file... (6 Replies)
Discussion started by: sparcman
6 Replies

7. Shell Programming and Scripting

How to display file name and its size ?

Suppose there are 3 files inside a directory, then i need to use display command which will display, the file name and its size. Is it possible? The output should llook like this only file1 1248 file2 3024 file3 3056 (6 Replies)
Discussion started by: sundaresanv
6 Replies

8. UNIX for Dummies Questions & Answers

directory size in unix

hi everyone my q is that i want to know what 's the reason behind the direcotry size in unix like if i do ls -ltr in my home directory it will list all the files and directory .. then the size of directory is either 512 or 1024 .. and every directory is containing files in... (2 Replies)
Discussion started by: aishsimplesweet
2 Replies

9. Shell Programming and Scripting

Display the Filename and Size of a File

Hello, all! Working in a Bourne shell. What command would list the filename and size of a file if the size of the file had to be bigger than $a and smaller than $b? Output (if $a is 10 bytes and $b is 50 bytes):test1.txt 15 test2.txt 30 test3.txt 50 Thanks, Ann :p (3 Replies)
Discussion started by: LowlyIntern
3 Replies

10. UNIX for Dummies Questions & Answers

Ls directory size reporting byte size instead of file count

I have been searching both on Unix.com and Google and have not been able to find the answer to my question. I think it is partly because I can't come up with the right search terms. Recently, my virtual server switched storage devices and I think the problem may be related to that change.... (2 Replies)
Discussion started by: jmgibby
2 Replies
CNTLIST(5)						      WordNettm File Formats							CNTLIST(5)

NAME
cntlist - file listing number of times each tagged sense occurs in a semantic concordance, sorted most to least frequently tagged cntlist.rev - file listing number of times each tagged sense occurs in a semantic concordance, sorted by sense key DESCRIPTION
A cntlist file for a semantic concordance lists the number of times each semantically tagged sense occurs in the concordance and its sense number in the WordNet database. Each line in the file corresponds to a sense in the WordNet database to which at least one semantic tag points. Only senses that are tagged in a concordance are in the concordance's cntlist file. WordNet Database cntlist File In the WordNet database, words are assigned sense numbers based on frequency of use in semantically tagged corpora. The cntlist file used by grind(1) to build the WordNet database and assign the sense numbers is a union of the cntlist files from the various semantic concor- dances that were formerly released by Princeton University. This combined cntlist file is provided with the WordNet package and is found in the WNSEARCHDIR directory. The cntlist.rev file is used at run-time by the WordNet library code and browser interfaces to print in the output display the number of times each sense has been tagged. File Format Each line in a cntlist file contains information for one sense. The file is ordered from most to least frequently tagged sense. The fields are separated by one space, and each line is terminated with a newline character. Senses having the same tag_cnt value are listed in reverse alphabetical order of the lemma field of the sense_key. Each line in cntlist is of the form: tag_cnt sense_key sense_number where tag_cnt is the decimal number of times the sense is tagged in the corresponding semantic concordance. sense_key is a WordNet sense encoding and sense_number is a WordNet sense number as described in The cntlist.rev file contains the same fields described above, in the following order: sense_key sense_number tag_cnt NOTES
Princeton no longer maintains or releases the Semantic Concordance files. The cntlist file used to order the senses in WordNet 3.0 was generated from the Semantic Concordance files at the point that they were last updated in 2001. In general, the order of senses presented usually reflects what the user would expect, however sense ordering is now less reliable than in prior releases and should not be construed as an accurate indicator of frequency of use. ENVIRONMENT VARIABLES (UNIX) WNHOME Base directory for WordNet. Default is /usr/local/WordNet-3.0. WNSEARCHDIR Directory in which the WordNet database has been installed. Default is WNHOME/dict. REGISTRY (WINDOWS) HKEY_LOCAL_MACHINESOFTWAREWordNet3.0WNHome Base directory for WordNet. Default is C:Program FilesWordNet3.0. HKEY_CURRENT_USERSOFTWAREWordNet3.0wnres User's default browser options. FILES
cntlist, cntlist.rev file of combined semantic concordance cntlist files. Used to assign sense numbers in WordNet database SEE ALSO
grind(1), wnintro(5), senseidx(5). WordNet 3.0 Dec 2006 CNTLIST(5)
All times are GMT -4. The time now is 08:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy