Sponsored Content
Full Discussion: Ls -al / du
Top Forums Shell Programming and Scripting Ls -al / du Post 302927720 by junior-helper on Friday 5th of December 2014 02:03:42 AM
Old 12-05-2014
Daniel,
is it the output of the find command? I ask this because the biggest file is ~10MB.

You mentioned UNIX 6.1, did you mean AIX 6.1? If so, then try:
Code:
find /opt -type f -size +100000000c -exec ls -l  {} \;

Quote:
Would it be possible to convert the size into MB and then sort them by descending order of the file size?
Yes, the above find command should print files greater than 100000000 bytes (~100MB). Then extend the find command like so
Code:
find /opt -type f -size +100000000c -exec ls -l  {} \; | sort -nrk5,5 | awk '{$5=$5/1024/1024}1'

Sample output (before sort & awk):
Code:
-rw-r-----   1 oracle   dba      104865792 Jan  1 00:00 ./example01.dbf
-rw-r-----   1 oracle   dba      513810432 Jan  1 00:00 ./system01.dbf
-rw-r-----   1 oracle   dba      272637952 Jan  1 00:00 ./sysaux01.dbf

Sample output (after sort & awk):
Code:
-rw-r----- 1 oracle dba 490.008 Jan  1 00:00 ./system01.dbf  # 490 MB
-rw-r----- 1 oracle dba 260.008 Jan  1 00:00 ./sysaux01.dbf  # 260 MB
-rw-r----- 1 oracle dba 100.008 Jan  1 00:00 ./example01.dbf # 100 MB

Hope this helps.
This User Gave Thanks to junior-helper For This Post:
 
set_color(1)							       fish							      set_color(1)

NAME
set_color - set_color - set the terminal color set_color - set the terminal color Synopsis set_color [-v --version] [-h --help] [-b --background COLOR] [COLOR] Description Change the foreground and/or background color of the terminal. COLOR is one of black, red, green, brown, yellow, blue, magenta, purple, cyan, white and normal. o -b, --background Set the background color o -c, --print-colors Prints a list of all valid color names o -h, --help Display help message and exit o -o, --bold Set bold or extra bright mode o -u, --underline Set underlined mode o -v, --version Display version and exit Calling set_color normal will set the terminal color to whatever is the default color of the terminal. Some terminals use the --bold escape sequence to switch to a brighter color set. On such terminals, set_color white will result in a grey font color, while set_color --bold white will result in a white font color. Not all terminal emulators support all these features. This is not a bug in set_color but a missing feature in the terminal emulator. set_color uses the terminfo database to look up how to change terminal colors on whatever terminal is in use. Some systems have old and incomplete terminfo databases, and may lack color information for terminals that support it. Download and install the latest version of ncurses and recompile fish against it in order to fix this issue. Version 1.23.1 Sun Jan 8 2012 set_color(1)
All times are GMT -4. The time now is 10:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy