LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Room

[ILUG] Room

Niall O Broin niall at linux.ie
Sat May 14 11:32:14 IST 2005


On 14 May 2005, at 11:14, Conor Wynne wrote:

>>> # find . -xdev -type f -print | du -sk `ls -A` | sort -nr | head -20
>>
>> that meant to do ? As Tiarnán said

>> Why the find command?
>
> Dunno, why not?

Because it's completely pointless - the command was

# find . -xdev -type f -print | du -sk `ls -A` | sort -nr | head -20

which does the following

1) find -  List all files under the current directory, staying on the 
same disk

and pipes the output of that into

2) du - shows the size in k of every file / directory in the current 
directory

whose output is piped into

3) sort - which sorts in reverse numerical order

whose output is piped into

4) head - which outputs the first 20 lines


which has the next result of showing the 20 files or directories IN the 
current directory which consume most space. The  find  is COMPLETELY 
pointless, because du does not do anything with its standard input.


Niall




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell