Important! This is an automatic machine translated page. If you can read english, you should Click Here to read the original English version of the article.

Get the Top 10 Files or Directories on Ubuntu Linux Get Top 10 datoteke ali mape na Ubuntu Linux

Ubuntu Linux has a rich set of commands for manipulating and accessing files. Ubuntu Linux je bogat nabor ukazov za spreminjanje in dostop do datotek. The du utility gives information on disk usage, and the sort utility can sort the results. Uporabnost du daje informacije o uporabi diska, in razvrščanje uporabnost lahko razvrstite rezultatov. Finally, we can run those results through the head command, which gives you the top 10 lines outputted through any other command. Končno lahko te rezultate teči skozi glavo ukaz, ki vam daje top 10 vrstic outputted prek katerega koli drugega ukaza. We'll chain the commands together to get the output that we want. Mi bomo verige ukaze skupaj, da dobite rezultat, ki si želimo.

First we'll use the du -sm command to give the results in MB: Najprej bomo uporabili du-sm ukaz, da rezultate v MB:

$ du -sm * $ Du-sm *
1 wp-config-sample.php 1 wp-config-sample.php
1 wp-config.php 1 wp-config.php
14 wp-content 14 wp-vsebine
1 wp-feed.php 1 wp-feed.php
—- trimmed — - Obrezani --

Now we can see that the results aren't sorted, so we'll sort them by the sort -nr command, which sorts by numerical value in reverse. Sedaj lahko vidimo, da se rezultati niso razvrščeni, tako da bomo razvrstite jih razvrstite-nr ukaz, ki razvrsti po številčna vrednost v obratnem. Finally, we'll run the results through head -10 to get the top 10 results: Na koncu bomo teči rezultatih prek glave -10 priti top 10 rezultati:

This is the command we are going to run: To je ukaz bomo teči:

du -sm * | sort -nr | head -10 du-sm * | sort-nr | glava -10

Here's an example of the output: Tukaj je primer proizvodnje:

$ du -sm * | sort -nr | head -10 $ Du-sm * | sort-nr | glava -10
14 wp-content 14 wp-vsebine
2 wp-includes 2 wp-vključuje
1 xmlrpc.php 1 xmlrpc.php
1 xml.php 1 xml.php
1 x.php 1 x.php
1 wp-trackback.php 1 wp-trackback.php
1 wp-settings.php 1 wp-settings.php
1 wp-rss2.php 1 wp-rss2.php
1 wp-rss.php 1 wp-rss.php
1 wp-register.php 1 wp-register.php

Useful stuff. Uporabne stvari.

This article was originally written on 11/26/06 Tagged with: Ta članek je bil prvotno napisan na 11/26/06 Tagged with: Shell Scripts Shell Scripts , , Ubuntu Ubuntu , , Ubuntu Tips & Tweaks Ubuntu Nasveti in Tweaks

Daily Email Updates Dnevni Email Updates

You can get our how-to articles in your inbox each day for free. Lahko dobite našo kako do člankov v vašo mapo »Prejeto vsak dan brezplačno. Just enter your name and email below: Preprosto vpišite vaše ime in e-pošto spodaj:


Name: Ime:
Email: E-pošta:

Comments (3) Komentarji (3)

  1. morganusvitus morganusvitus

    The site looks great ! Stran izgleda super! Thanks for all your help ( past, present and future !) Hvala za vašo pomoč (preteklost, sedanjost in prihodnost!)

  2. alex alex

    hi nice site. hi nice site.

  3. anatol Anatol

    Nise site! Nise site!


Leave a Comment Pustite komentar




Leave your Pustite friendly prijazen comment here. comment here.

If you have a computer help question, Če imate računalnik pomagati vprašanje, click here to leave it on the forums kliknite tukaj, da ga pustijo na forumih instead. namesto.

Note: Your comment may not show up immediately on the site. Opomba: Tvoj komentar morda ne pokažejo takoj na mestu.

Our Friends Naši prijatelji
Getting Started Getting Started


About How-To Geek O Kako naj Geek
What Is That Process? Kaj je to proces?
svchost.exe svchost.exe
jusched.exe jusched.exe
dwm.exe dwm.exe
ctfmon.exe Ctfmon.exe
wmpnetwk.exe wmpnetwk.exe
wmpnscfg.exe wmpnscfg.exe
rundll32.exe rundll32.exe
wfcrun32.exe wfcrun32.exe
Ipoint.exe Ipoint.exe
Itype.exe Itype.exe
Wfica32.exe Wfica32.exe
Mobsync.exe Mobsync.exe
conhost.exe conhost.exe
Dpupdchk.exe Dpupdchk.exe Adobe_Updater.exe Adobe_Updater.exe

Copyright © 2006-2009 HowToGeek.com. Copyright © 2006-2009 HowToGeek.com. All Rights Reserved. All Rights Reserved.