Sponsored Content
Full Discussion: DU + LS
Top Forums UNIX for Dummies Questions & Answers DU + LS Post 302515316 by furashgf on Tuesday 19th of April 2011 07:30:35 PM
Old 04-19-2011
DU + LS

Just curious if anyone had written a function that combined the "du" and "ls" command so you get a list of directories and files in the current directory, each with a file size. I googled a bit but didn't find one. I didn't want to re-invent the wheel if it had already been done.
 
list directory(1m)														list directory(1m)

NAME
list directory - Displays a list of all the directories whose names match the specified directory name SYNOPSIS
cdscp list directory directory-name [with attribute-name = attribute-value] ARGUMENTS
The full name of a specific directory. The last simple name can contain wildcard characters. The name of a particular attribute. The value of a particular attribute. DESCRIPTION
The list directory command displays a list of all the directories whose names match the specified directory name. The last simple name can contain wildcards. You can use a with attribute-name = attribute-value clause to limit output only to directories whose attributes have values equal to the specified values. A space must precede and follow the = (equals sign). Privilege Required You must have read permission to the parent directory. If you use a with attribute-name = attribute-value clause in the command, you also need read or test permission to the selected directories. NOTE
This command is replaced at Revision 1.1 by the dcecp command and may not be provided in future releases of DCE. EXAMPLE
The following command displays the names of all the directories in the /.:/sales directory: cdscp> list directory /.:/sales/* LIST DIRECTORY /.../abc.com/sales AT 1991-10-15-15:43:58 atlanta austin boston chicago ontario ny seattle RELATED INFORMATION
Commands: add directory(1m), create directory(1m), delete directory(1m), remove directory(1m), set directory(1m), set directory to skulk(1m), show directory(1m) list directory(1m)
All times are GMT -4. The time now is 07:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy