Solved

Display Size of Files From Multiple Directories

Posted on 2000-03-01
1
206 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

776 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