Results 1 to 2 of 2

Thread: แสดงพื้นที่การใช้งาน HDD ด้วยคำสั่ง du

  1. #1
    Administrator asylu3's Avatar
    Join Date
    Jun 2000
    Location
    Thailand
    Posts
    3,557


    โดยปกติเมื่อเราต้องการจะ clear พื้นที่ HDD ก็จะต้องทำการหาก่อนงว่าไฟล์ใดมีขนาดใหญ่เกินไปบ้าง
    ซึ่งวิธีที่จะค้นหาส่วนใหญ่มักจะเริ่มจากดูขนาดของ Folder แต่ละอันก่อนว่ามีอันไหนใหญ่มากน้อยเท่าไหร่
    ด้วยคำสั่ง

    [hide=1]
    Code:
    $du -sh .
    หรือ

    Code:
    $du -sk .
    สำหรับ Solaris 8

    แต่ปัญหาก็คือผลลัพธ์ที่ได้จะไม่เรียงลำดับทำให้ดูลำบากมาก
    ซึ่งคำสั้งที่ใช้เรียงมีดังนี้คือ


    [code]$du --max-depth=1 /home/ | sort -n -r

    238208

  2. #2
    Junior Member
    Join Date
    Oct 2006
    Location
    KKU
    Posts
    1


    ขอบคุณสำหรับเกล็ดความรู้เพิ่มพูนสมองอีกขั้นนึง ผมเองก็เป็นคนนึงที่ติดใจใน linux และดูเหมือนว่าจะแกะไม่ออกแล้ว tip นี้เป็นประโยชน์ครับ
    [url="http://www.speedtest.net"][img]http://www.speedtest.net/result/197078644.png[/img][/url]

Similar Threads

  1. เกล็ดความรู้ System Restore, การ เรียกใช้ System Restore Windows XP ด้วยคำสั่ง DOS
    By afroman in forum ทิปหรือเคล็ดลับการคอมพิวเตอร์ต่างๆ
    Replies: 0
    Last Post: 12-10-2009, 12:30 AM
  2. Replies: 0
    Last Post: 14-07-2009, 11:15 PM
  3. Replies: 1
    Last Post: 26-11-2008, 05:50 PM
  4. บันทึกคำสั่งของ shell ด้วยคำสั่ง script
    By jakata in forum Operating System, Server and Networking
    Replies: 0
    Last Post: 16-10-2007, 09:21 AM

Members who have read this thread : 0

Actions : (View-Readers)

There are no names to display.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •