Sponsored Content
Top Forums UNIX for Advanced & Expert Users how to find the file size in unix Post 302268733 by cmaroju on Tuesday 16th of December 2008 07:51:15 AM
Old 12-16-2008
ls -ltrS



will display all the files based on their size in a particular directory in reverse order.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

find the file by size

Hi, Can somebody PLEASE help me. Suppose I want to find a file which has largest no of bytes in a particular directory, How do i do that. ls -s will give the size of Blocks. But I want the largest sized file and in bytes or KB OR MB. tHANKS IN advanvce. Bye Rooh :( (1 Reply)
Discussion started by: rooh
1 Replies

2. Solaris

command to find out total size of a specific file size (spread over the server)

hi all, in my server there are some specific application files which are spread through out the server... these are spread in folders..sub-folders..chid folders... please help me, how can i find the total size of these specific files in the server... (3 Replies)
Discussion started by: abhinov
3 Replies

3. Shell Programming and Scripting

find file size

My Question is ----------------- Assume you've a directory (i.e /home/test/) which contains n number of files, rename all the files which has byte count more than zero (0) with .bak extension. Write shell script to achieve this output, execute the same without using". / " in front of... (6 Replies)
Discussion started by: hgriva1
6 Replies

4. Shell Programming and Scripting

unix script to check whether particular file exists and to find its size

I want to find the size of particular file exists in a particular directory and i wnt to zip it. In the below mentioned code it should check the MQ.log in the particular directory.Please correct my code so that it will check for particular MQ.log but i could not able to check whether the... (9 Replies)
Discussion started by: Balachandar
9 Replies

5. UNIX for Advanced & Expert Users

Find file size and date

Hi in my shell script I have to do this 1. there is a file called testing.txt in /home/report directory If the file size is 0(zero) and date is today's date, then I have to print "Successful" else "Failed". 2. There is a file called number.txt which will have text only one line like this... (10 Replies)
Discussion started by: gsusarla
10 Replies

6. Shell Programming and Scripting

How to find size of a file

Hi, I have to directory /usr/inbound ------------- 10900.txt 10889.txt 109290202.txt I need to create inbound directory and i need to know size of these files one by one if file size is zero i need to print message like "empty file" Please help me how to solve this thanks krish. (4 Replies)
Discussion started by: kittusri9
4 Replies

7. Shell Programming and Scripting

Command/script to find size of Unix Box ?

Please could anyone provide me the Command/script to find the size and usage of Unix box ASAP ? (6 Replies)
Discussion started by: sakthifire
6 Replies

8. Shell Programming and Scripting

find with file size and show the size

Hi All... is the below command be modified in sucha way that i can get the file size along with the name and path of the file the below command only gives me the file location which are more than 100000k...but I want the exact size of the file also.. find / -name "*.*" -size +100000k ... (3 Replies)
Discussion started by: rpraharaj84
3 Replies

9. UNIX for Dummies Questions & Answers

Recursive Find on file size

Is there a way to use the find command to recursively scan directories for files greater than 1Gb in size and print out the directory path and file name only? Thanks in advance. (6 Replies)
Discussion started by: jimbojames
6 Replies

10. Shell Programming and Scripting

How to find size of a file in perl?

Hai guys, I am kiran. I created GUI by using Gtk2-Perl. In that GUI I was running 3 shell scripts by using system command and also passing arguments to the shell scripts from GUI script. In that arguments I can get the path like /home/kiran/pdk/sample/calibre (this is the output of shell... (2 Replies)
Discussion started by: kiran425
2 Replies
HLS(1)							      General Commands Manual							    HLS(1)

NAME
hls - list files in an HFS directory SYNOPSIS
hls [options] [hfs-path ...] DESCRIPTION
hls lists files and directories contained in an HFS volume. If one or more arguments are given, each specified file or directory is shown; otherwise, the contents of the current working directory are shown. OPTIONS
-1 Output is formatted such that each entry appears on a single line. This is the default when stdout is not a terminal. -a All files and directories are shown, including "invisible" files, as would be perceived by the Macintosh Finder. Normally invisible files are omitted from directory listings. -b Special characters are displayed in an escaped backslash notation. Normally special or non-printable characters in filenames are replaced by a question mark (?). -c Sort and display entries by their creation date, rather than their modification date. -d List directory entries themselves rather than their contents. Normally the contents are shown for named directories on the command- line. -f Do not sort directory contents; list them in the order they appear in the directory. This option effectively enables -a and -U and disables -l, -s, and -t. -i Show the catalog IDs for each entry. Every file and directory on an HFS volume has a unique catalog ID. -l Display entries in long format. This format shows the entry type ("d" for directory or "f" for file), flags ("i" for invisible), file type and creator (four-character strings for files only), size (number of directory sub-contents or file resource and data bytes, respectively), date of last modification (or creation, with -c flag), and pathname. Macintosh "locked" files are indicated by "F" in place of "f". -m Display entries in a continuous format separated by commas. -q Replace special and non-printable characters in displayed filenames with question marks (?). This is the default when stdout is con- nected to a terminal. -r Sort entries in reverse order before displaying. -s Show the file size for each entry in 1K block units. The size includes blocks used for both data and resource forks. -t Sort and display entries by time. Normally files will be sorted by name. This option uses the last modification date to sort unless -c is also specified. -x Display entries in column format like -C, but sorted horizontally into rows rather than columns. -w width Format output lines suitable for display in the given width. Normally the width will be determined from your terminal, from the environment variable COLUMNS, or from a default value of 80. -C Display entries in column format with entries sorted vertically. This is the default output format when stdout is connected to a terminal. -F Cause certain output filenames to be followed by a single-character flag indicating the nature of the entry; directories are fol- lowed by a colon (:) and executable Macintosh applications are followed by an asterisk (*). -N Cause all filenames to be output verbatim without any escaping or question-mark substitution. -Q Cause all filenames to be enclosed within double-quotes (") and special/non-printable characters to be properly escaped. -R For each directory that is encountered in a listing, recursively descend into and display its contents. -S Sort and display entries by size. For files, the combined resource and data lengths are used to compute a file's size. -U Do not sort directory contents; list them in the order they appear in the directory. On HFS volumes, this is usually an alphabetical case-insensitive ordering, although there are some idiosyncrasies to the Macintosh implementation of ordering. This option does not affect -a, -l, or -s. SEE ALSO
hfsutils(1), hcd(1), hpwd(1), hdir(1), hcopy(1) FILES
$HOME/.hcwd AUTHOR
Robert Leslie <rob@mars.org> HFSUTILS
14-Jan-1997 HLS(1)
All times are GMT -4. The time now is 06:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy