The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Moving contents of a directory

Discussion in 'General Discussion' started by crazyaboutlinux, Apr 15, 2011.

  1. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    good, but how do i get top 10 users or how do sort from high user to lower
     
  2. ModServ

    ModServ Well-Known Member

    Joined:
    Oct 17, 2006
    Messages:
    332
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    Egypt
    cPanel Access Level:
    Root Administrator
    Re: Drive Space Warning [ /dev/root (/var/named/chroot/var/run/dbus) ]

    You can do something like that

    Code:
    du -shc * | sort -n
     
  3. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    Re: Drive Space Warning [ /dev/root (/var/named/chroot/var/run/dbus) ]

    no, its not sorting well, i want that GB should come first then MB & then KB

    below is the output for du -shc * | sort -n


    1.2M razor-agents-2.84
    2.0M rep.txt
    2.8M installalation_joomla
    4.0K cpmove
    4.0K csfbackup.sh
    4.0K dead.letter
    4.0K domainkeys_report.2011-01-08.log
    4.0K list.txt
    4.0K maildirsize.bkp
    4.0K public_ftp
    4.0K suphp.sh
    8.0K anaconda-ks.cfg
    8.0K install.log.syslog
    8.0K public_html
    8.0M installd
    8.2M pecl_http-1.6.1
    12K cpanel3-skel
    12K securenobody.rpm
    12K updatekernel-dn.sh
    15M tmp
    16K package.xml
    20K install.log
    24K package2.xml
    28K script
    32K thank-you?ext=tgz
    40M total
    176K pecl_http-1.6.1.tgz
    340K resultnew
    384K razor-agents-2.84.tar
    452K IP_aapnuamd
    584K wget-1.10.2-3.2.1.i386.rpm
    860K csfconffiles
     
  4. LinuxTechie

    LinuxTechie Well-Known Member

    Joined:
    Jan 22, 2011
    Messages:
    502
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Re: Drive Space Warning [ /dev/root (/var/named/chroot/var/run/dbus) ]

    Hey !

    You can simply execute du -sch * | grep G. This will display the dir's or files in Gb's.
     
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    I've moved these posts to a new thread with an applicable title that describes the issue. Please avoid posting to older threads unless the discussion pertains to the actual thread content. Opening a new thread will be more beneficial to ask a question in most all instances.
     
  6. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    not finding yet, i want to sort directories/ files usage wise
    e.g 12 GB should come on top, then MB & KB
     
    #6 crazyaboutlinux, Apr 20, 2011
    Last edited: Apr 20, 2011
Loading...

Share This Page