02-13-2008
listing files in a directory in bases of size
Hi ,
I want to list all files in the order of size . Just want to know which files occupies more size and which occupies less size .
Is it possible with ls command ?
Thanks,
Arun.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Does any one know how to get a recursive directory listing in long format (showing owner, group, permission etc) without listing the files contained in the directories.
The following command also shows the files but I only want to see the directories.
ls -lrtR * (4 Replies)
Discussion started by: psingh
4 Replies
2. UNIX for Dummies Questions & Answers
Hi,
Edit: The title should really read listing files in a non-parent directory, sorry!
Im trying to get one of my Bash scripting assignments done for uni and now I'm stuck. This is probably going to be one of those kick yourself moments but, in my script I have a variable usrDir which... (2 Replies)
Discussion started by: Adzi
2 Replies
3. Shell Programming and Scripting
How can I list the files in a directory and just show the file size, date stamp, timestamp and file name..
I've been trying to ls -lrt the directory to a file and then use the cut command but I'm not having any luck with getting the proper results.. I thought i could use the -f switch and count... (4 Replies)
Discussion started by: Jazmania
4 Replies
4. Shell Programming and Scripting
for some reason my code does not give the right number of files. can omeone help me please? (2 Replies)
Discussion started by: andrew1400
2 Replies
5. Shell Programming and Scripting
hello every one,
i'm a novice in the field of Linux, so please help me out with this problem.
a text file with the following syntax is given:
file1
file2
file3
file4
file5
a script is to be written to list all d file names and tar the files with the filename... (3 Replies)
Discussion started by: Amruthesh C
3 Replies
6. UNIX for Advanced & Expert Users
I see the following in my prompt...
that is, i have only one file but i see 8 as total.
/home/asla>ls -l
total 8
-rw-r--r-- 1 oracle dba 6 Oct 17 18:59 simple
Can you please tell me why that 8? I checked different sources they say it is number of blocks but in this case... (7 Replies)
Discussion started by: shahnazurs
7 Replies
7. Shell Programming and Scripting
To find the whole size of a particular directory i use "du -sk /dirname".. but after finding the direcory's size how do i make conditions like if the size of the dir is more than 1 GB i hav to delete some of the files inside the dir (0 Replies)
Discussion started by: shaal89
0 Replies
8. UNIX for Dummies Questions & Answers
Hi Unix Gurus,
I need to list all files in a Unix Directory which either end with a
.pdf or .rtf and they should be case insensitive ie .Pdf , .pDF , .RtF etc are also possible.
How can i accomplish this with with a ls command ? If not then a find command. (6 Replies)
Discussion started by: pchegoor
6 Replies
9. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
A script that takes any number of directories as command line arguments and then lists the contents of each of... (3 Replies)
Discussion started by: Phaneendra G
3 Replies
10. Shell Programming and Scripting
I want to display directory listing in the order of size. I do not have -S option in my version of UNIX. So I wrote a simple script. But it takes "| sort -n -k5,5" part as file names. Any suggestion?
#!/bin/ksh
cmd='ls -l *.TXT | sort -n -k 5,5'
set -x
$cmd
return 0 (7 Replies)
Discussion started by: Soham
7 Replies
LEARN ABOUT OPENDARWIN
kextstat
KEXTSTAT(8) BSD System Manager's Manual KEXTSTAT(8)
NAME
kextstat -- display status of dynamically loaded kernel extensions
SYNOPSIS
kextstat [-b kext_bundle_id] [-k] [-l]
DESCRIPTION
The kextstat utility displays the status of any kernel extensions currently loaded in the kernel. The following information is shown for
each loaded kernel extension:
Index The load index of the kernel extension (used to track references). Gaps in the list indicate kernel extensions that have been
unloaded.
Refs The number of references to this extension by others. If nonzero, the extension cannot be unloaded.
Address The address in kernel space where the extension has been loaded.
Size The number of bytes of kernel memory that the extension occupies. If this is zero, the extension is actually a built-in part of
the kernel that has a record as an extension for resolving dependencies among extensions.
Wired The number of wired bytes of kernel memory that the extension occupies.
Name The CFBundleIdentifier of the kernel extension.
(Version)
The CFBundleVersion of the kernel extension.
<Linked Against>
The index numbers of all other kernel extensions that this extension has a reference to.
The following options are available:
-b kext_bundle_id
Display the status of only the kernel extension with the given bundle identifier. This option trumps the -k option; if both are
given and a kernel component is specified, its information is shown.
-k Don't show information for built-in components of the kernel.
-l Print the list of loaded kexts only and omit the header (useful for running output through text-analysis tools).
DIAGNOSTICS
The kextstat utility exits with a status of 0 on success and with a nonzero status if an error occurs.
SEE ALSO
kextcache(8), kextd(8), kextload(8), kextunload(8)
HISTORY
The kextstat command is based on the command kldstat written by Doug Rabson <dfr@FreeBSD.org>
Darwin April 17, 2002 Darwin