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
ureadahead(8)						      System Manager's Manual						     ureadahead(8)

NAME
ureadahead - Read files in advance during boot SYNOPSIS
ureadahead [OPTIONS]... [PACK] DESCRIPTION
ureadahead (uber-readahead) is used during boot to read files in advance of when they are needed such that they are already in the page cache, improving boot performance. When started without any arguments, it checks for the existance and age of the default pack file /var/lib/ureadahead/pack, and if not present or older than a month, will discard it and retrace the boot sequence. The pack will then contain information about the files opened during boot, and the blocks that were in memory at the completion of the boot. If the file exists and is newer than a month old, or an alternate PACK path is given on the command-line, the files listed in the pack are opened and the blocks read into the page cache using the readahead(2) system call. Pack files are automatically optimised for Solid-State Disks or rotational Hard Drives, depending on which you have. OPTIONS
--verbose May be used to report on ureadahead's operation. In particular, this causes information about the size of the pack file to be out- put when reading and a complete dump of the contents of the pack file after tracing. --daemon Places ureadahead into the background once the pack file has been read, or once tracing has been enabled. This is ignored when reading on rotational hard drives, since it's important for performance reasons not to contend with other pro- cesses for I/O. --force-trace Discards all pack files and forces re-tracing. --timeout=SECONDS Normally when tracing, ureadahead will wait for a TERM or INT signal before concluding and generating the pack file. This option instead sets a timeout after which tracing is terminated. --dump Dump the contents of the pack file to standard output in a pretty format, does not trace or read the contents into memory. --sort=SORT Used with --dump to sort the output. The default is open, which is the order that the files will be opened. path sorts by path name, disk sorts by on-disk location, and size sorts by the amount of data that will be read for that file. OTHER MOUNT POINTS
PACK need not be the filename of a pack, instead it may be the name of a mount point (or indeed any non-file within the filesystem), in which case the pack for that device is read instead. This allows ureadahead to be called in the style ureadahead /usr for filesystems split across multiple devices. Pack files for these other devices are also stored under /var/lib/ureadahead and are named mountpoint.pack When tracing, these will be automatically generated. FILES
/var/lib/ureadahead/pack AUTHOR
Written by Scott James Remnant <scott@netsplit.com> BUGS
Report bugs at <https://launchpad.net/ubuntu/+source/ureadahead/+bugs> COPYRIGHT
Copyright (C) 2009 Canonical Ltd. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU- LAR PURPOSE. SEE ALSO
readahead(2) ureadahead 2009-09-29 ureadahead(8)
All times are GMT -4. The time now is 10:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy