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
XDU(1)							      General Commands Manual							    XDU(1)

NAME
xdu - display the output of "du" in an X window SYNOPSIS
du | xdu [options] DESCRIPTION
Xdu is a program for displaying a graphical tree of disk space utilization as reported by the UNIX utility "du". The user can navigate through the tree structure and change the order of the displayed information. The window is divided up into several columns, each of which is one level deeper in the directory hierarchy (from left to right). Boxes are drawn for each directory. The amount of vertical space occupied by each box is directly proportional to the amount of disk space consumed by it and all of its children. The name of each direc- tory and the amount of data are displayed provided that there is enough space within its box. Any space at the "bottom" of a box not cov- ered by its children to the right represents the space consumed by files in that directory (as opposed to space from its children). There are several command line options available. Equivalent resources (if any) are shown with each option. +s (.showsize: true) display sizes (the default). -s (.showsize: false) don't display sizes. -c num display num columns. -a (.order: alpha) sorts display alphabetically. -ra (.order: ralpha) sorts display reverse alphabetically. -n (.order: size) sorts display numerically (largest first). -rn (.order: rsize) sorts display reverse numerically (smallest first). -fg color (.foregound) determines the color of the text and lines. -bg color (.background) determines the color of the background. -rv reverse video (for monochrome displays) In addition to these the usual toolkit options such as -rv, -font, -display, -geometry, are supported. MOUSE ACTIONS
The user can move up or down the tree by clicking the left mouse on a directory box. If the left most box is selected, the display will move up one level (assuming you are not already at the root). If any other box is selected, it will be placed against the left edge of the window and the display will be rescaled appropriately. At any time the middle mouse will bring you back to the root. Clicking the right mouse will exit the program. KEYSTROKES
Several keystroke commands are supported. Note that all sorting happens from the current root node down, so it is possible to sort one subtree differently than another by clicking into it, doing a sort, and going back up to the parent. 1-9,0 sets the number of columns in the display (0 = 10). a alphabetical sort. n numerical sort (largest first). f first-in-first-out sort (this is the order the data was read into the program). l last-in-first-out sort. r reverse sense of sort. s toggle size display. h display a popup help window. i display information about the current root node to standard out. The first line shows the path within the tree, the total size from this node on down, and the precentage that total represents of all of the data given to xdu. Subsequent lines show the size and name information for all children of this node in the order they are currently sorted in. This allows tiny directories to be seen that otherwise could not be labled on the display, and also allows for cutting and pasting of the information. / goto the root. q (or Escape) exit the program. ACTIONS
All mouse and keyboard events trigger actions so they can all be rebound by translations to suit the individual. The action functions are: reset() goes to the root node. goto() moves down into the directory currently under the mouse (and is thus probably only useful bound to a mouse button). quit() exits the program. reorder(type) sorts the display from the current root node down according to one of: alpha, ralpha (reverse alphabetical), size (largest to small- est), rsize (smallest to largest), first (as originally read in), last (opposite of original data), reverse (reverse whatever sort mode is currently selected). size() toggles size display on/off ncol(num) sets the number of columns to num. info() displays directory information as described in the KEYBOARD section. help() displays a popup help window. As an example of rebinding these, you could put the following in your resources file: XDu*translations: #override <Key>X: reorder(reverse) <Btn3Down>: info() to make the 'x' key reverse the current sort order and the right mouse button print the directory information message. RESOURCES
The following resources are supported with some sample values. XDu*foreground: yellow XDu*background: blue4 XDu*window.width: 600 XDu*window.height: 480 XDu*help*foreground: green XDu*help*background: red4 XDu.ncol: 5 XDu.font: -*-helvetica-bold-r-normal--14-* XDu.showsize: False XDu.order: size EXAMPLE
cd /usr/src du > /tmp/du.out xdu -n /tmp/du.out BUGS
On some machines keyboard input may not be accepted by xdu until the mouse is moved out of and back into the window. I have been told that putting the following in your resources file may fix this. <window manager name>.FocusLenience: True SEE ALSO
du(1) AUTHOR
Phillip C. Dykstra <phil@arl.army.mil> X11 XDU(1)
All times are GMT -4. The time now is 01:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy