Sponsored Content
Full Discussion: sort files by size
Top Forums UNIX for Dummies Questions & Answers sort files by size Post 99568 by AMD on Sunday 19th of February 2006 02:04:20 PM
Old 02-19-2006
sort files by size

Is there a way to sort files by size using the ls command?

thanks in advance
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

bash script working for small size files but not for big size files.

Hi, I have one file stat. Stat file contents are as follows: for example. H50768020040913,00260100,507680,13,0000000643,0000000643,00000,0000 H50769520040808,00260100,507695,13,0000000000,0000000000,00000,0000 H50770620040611,00260100,507706,13,0000000000,0000000000,00000,0000 Now i... (1 Reply)
Discussion started by: davidpreml
1 Replies

2. Shell Programming and Scripting

sort files by date, delete oldest, if total size bigger than

hello people i need your help please i want to achieve the following with the simplest, most efficient shell-tools: i have a directory with a lot of files from users. the script should check which partition the dir is on if the partition with the directory is more than 90% full ... (2 Replies)
Discussion started by: scarfake
2 Replies

3. UNIX for Dummies Questions & Answers

sort by size in Mb and Kb

Hi I am using the command below to list the 10 biggest directories and files in my present directory du -hs * | sort +0 | tail -10 the output is 8K disk-space 16K rish 32K WINDOWS 48K tests 104K imgvdEwLa.jpg 168K 020204_aerosmith_1024768.jdk 3.2M Acdc -... (4 Replies)
Discussion started by: the.noob
4 Replies

4. Shell Programming and Scripting

sort by size

Can some one help in sorting the attached file. I used cmd: sort -r jar1.txt -o sortedjar.txt , but it didnt work. Thanks for your help in Advance. (6 Replies)
Discussion started by: sawyer
6 Replies

5. UNIX for Advanced & Expert Users

Script to sort the files and append the extension .sort to the sorted version of the file

Hello all - I am to this forum and fairly new in learning unix and finding some difficulty in preparing a small shell script. I am trying to make script to sort all the files given by user as input (either the exact full name of the file or say the files matching the criteria like all files... (3 Replies)
Discussion started by: pankaj80
3 Replies

6. Shell Programming and Scripting

Sort by name, time, and size

How do you combine these ls commands so that I can have the outputs by name, time stamp, and size? ls -al |grep name_of_file ls -al | sort +4nr ls -l -t Please advise. (4 Replies)
Discussion started by: Daniel Gate
4 Replies

7. Shell Programming and Scripting

Sort by segment size

fuser -OdV /temp This command returns the output below; inode=132 size=10871 fd=2 5046330 inode=570 size=292 fd=1 5439528 inode=259 size=2669 fd=1 5570758 inode=759 size=255 fd=1 6226124 inode=636 size=1035 fd=1 ... (8 Replies)
Discussion started by: Daniel Gate
8 Replies

8. Shell Programming and Scripting

Script to sort by size of directories

Hello, I'm trying to find top 5(highest) directories by size. I did something like du -sh * > $file Where I can get all the size with respect to directories, but I need only top 5 directory from the file. How can I sort by size in the file and print top 5 sizes with the directory name??? ... (3 Replies)
Discussion started by: pjeedu2247
3 Replies

9. UNIX for Dummies Questions & Answers

[Solved] Size (Sort files using ...)

-rw-r--r-- 1 oracle oinstall 4 Jan 17 16:23 a -rw-r--r-- 1 oracle oinstall 212 Jan 17 17:51 amar -rw-r--r-- 1 oracle oinstall 32 Jan 17 17:30 b -rw-r--r-- 1 oracle oinstall 246 Jan 17 15:40 h1.tar.gz Hi, I want combination of linux command to sort out the line which has 32k size. ... (5 Replies)
Discussion started by: karthick nath
5 Replies

10. UNIX for Beginners Questions & Answers

How to sort the files by size and based subdirectory un UNIX?

I have the below input data in a file and need to get the output as mentioned below. Need to sort the data by size(Asc/des)/by subdirectory Below is the input which is there in a file: 120 /root/path2/part-00000-d3700305-428d-4b13-8161-42051f4ac5ed-c000.json 532 ... (3 Replies)
Discussion started by: ajarramuk
3 Replies
readahead(8)                                                  System Manager's Manual                                                 readahead(8)

NAME
readahead - file preloader for boot process optimization SYNOPSIS
readahead [options] <file-list> [another-file-list [...]] DESCRIPTION
readahead is a files preloader designed to optimize the disk I/O during the boot process. OPTIONS
-b, --build build optimised files list only, without sorting. -s, --sort build and sort list of files only (implies -b). -o, --output <file> write sorted list of files to file. -d, --dont-sort preload files described by an already sorted files list. -h, --help print the usage information. -v, --verbose enable the verbose mode. -t, --timing report time spent on each operation. -m, --maxsize <max size> maximum size in KiB a file can be in order to be preloaded, default is 10240. <file-list> [another-file-list [...]] One or more files containing the list of files to be preloaded or sorted. The files list can be generated by readahead-collector(8). FILES
/etc/default/readahead-fedora SEE ALSO
readahead-collector(8), readahead(2), AUTHORS
Arjan van de Ven <arjan@infradead.org>, Ziga Mahkovec <ziga.mahkovec@klika.si>, Karel Zak <kzak@redhat.com>, This manual page was written by Raphael Geissert <geissert@debian.org> July 2011 readahead(8)
All times are GMT -4. The time now is 10:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy