#1
  1. Learning MySQL, PHP & CSS
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2007
    Location
    Powys/Shrops border (UK)
    Posts
    269
    Rep Power
    47

    Linux 'du' command output


    Hi, just a quickie... does anyone know how to stop the du command from displaying the directory name?

    du -mhs mike

    displays

    93M mike


    Thanks

    Mike :-)
    It said 'Insert disk #2', but only one will fit.
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,641
    Rep Power
    4247
    Pipe the output of du into cut and tell it to only print the 1st column?

    Comments on this post

    • mikeatvillage agrees : Thank you.
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo

IMN logo majestic logo threadwatch logo seochat tools logo