Solved

Display Size of Files From Multiple Directories

Posted on 2000-03-01
1
207 Views
Last Modified: 2013-12-27
I have hundreds of user directories all with one common file, namely their Mailbox.  I am trying to get a listing of the size sorted for each user's Mailbox.  I am running Solaris 2.6.

I have tried:    find . -name Mailbox -print | ls -al | sort -nr +4
but it only searches the current directory the command is run under.
0
Comment
Question by:DrRichard
1 Comment
 
LVL 20

Accepted Solution

by:
tfewster earned 50 total points
ID: 2574081
Do find . -name Mailbox -print -exec ls -l {} \; |sort -nr +4

The {} is the "found filename"

You can't pipe the output of "find" to ls like that; ls is ignoring it, so whats it's doing is just the "ls -al |sort" bit
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ftpcommand 2 67
unix example issues 18 99
mobaxterm not able to change directory 28 208
SCP a file to multiple machines using a script 4 69
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question