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 the Top 10 File atau Direktori pada Ubuntu Linux

Ubuntu Linux has a rich set of commands for manipulating and accessing files. Ubuntu Linux memiliki kekayaan seperangkat perintah untuk memanipulasi dan mengakses file. The du utility gives information on disk usage, and the sort utility can sort the results. Du utilitas memberikan informasi mengenai penggunaan disk, dan utilitas semacam dapat mengurutkan hasil. Finally, we can run those results through the head command, which gives you the top 10 lines outputted through any other command. Akhirnya, kita dapat menjalankan hasil-hasilnya melalui perintah kepala, yang memberi Anda atas 10 baris outputted melalui perintah lainnya. We'll chain the commands together to get the output that we want. Kami akan rantai perintah yang sama untuk mendapatkan output yang kita inginkan.

First we'll use the du -sm command to give the results in MB: Pertama kita akan menggunakan perintah du-sm untuk memberikan hasil dalam 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-content
1 wp-feed.php 1 wp-feed.php
—- trimmed — - Dipangkas --

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. Sekarang kita dapat melihat bahwa hasilnya tidak diurutkan, jadi kita akan menyortir mereka oleh perintah sort-nr, yang diatur menurut nilai numerik secara terbalik. Finally, we'll run the results through head -10 to get the top 10 results: Akhirnya, kami akan menjalankan hasil melalui kepala -10 untuk mendapatkan top 10 results:

This is the command we are going to run: Ini adalah perintah yang akan kita jalankan:

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

Here's an example of the output: Berikut adalah contoh output:

$ du -sm * | sort -nr | head -10 $ Du-sm * | sort-nr | head -10
14 wp-content 14 wp-content
2 wp-includes 2 wp-includes
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. Useful stuff.

This article was originally written on 11/26/06 Tagged with: Artikel ini awalnya ditulis pada 11/26/06 Tagged with: Shell Scripts Shell Script , , Ubuntu Ubuntu , , Ubuntu Tips & Tweaks Ubuntu Tips & Tweaks

Daily Email Updates Harian Email Pembaharuan

You can get our how-to articles in your inbox each day for free. Anda bisa mendapatkan kita bagaimana-untuk artikel dalam kotak masuk Anda setiap hari secara gratis. Just enter your name and email below: Cukup masukkan nama dan email Anda di bawah ini:


Name: Nama:
Email: Email:

Comments (3) Komentar (3)

  1. morganusvitus morganusvitus

    The site looks great ! Situs looks great! Thanks for all your help ( past, present and future !) Terima kasih atas semua bantuan Anda (masa lalu, sekarang dan masa depan!)

  2. alex alex

    hi nice site. hi nice site.

  3. anatol Anatol

    Nise site! Nise site!


Leave a Comment Tinggalkan Komentar




Leave your Meninggalkan friendly ramah comment here. komentar di sini.

If you have a computer help question, Jika Anda memiliki pertanyaan bantuan komputer, click here to leave it on the forums klik di sini untuk meninggalkannya di forum instead. selain.

Note: Your comment may not show up immediately on the site. Catatan: Komentar anda mungkin tidak muncul segera di situs.

Our Friends Our Friends
Getting Started Persiapan


About How-To Geek Tentang How-To Geek
What Is That Process? Apa Proses Itu?
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.