Find the answer to your Linux question:
Results 1 to 6 of 6
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Newbie question: finding files on specific sda drive?


    I have an old server,
    has a few sda partitions
    one of these partitions (/dev/sda6 12G 12G 0 100% /var) is 100% full.

    How do I list/get to files on this (and only this) partition/drive? I want to go there and run something like du -hc --max-depth=1 to list the file sizes and see what's eating up the space.

    Thanks!!

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,762
    Try the following comand and see if that does what you want to do.
    Code:
    ls -alR
    If it is a big list you might need to pipe the output through less or into a file.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    But how do i see only the files on the "/dev/sda6" drive?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,762
    How about Change Directory? Just CD to the mount point and run the command.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  6. #5
    doesnt work

    sda6 is not a folder but mounted disk / partition , like /dev/sda1 , /dev/sda5, etc.

    server:/ # cd sda6
    -bash: cd: sda6: No such file or directory
    serve:/ # cd /dev/sda6
    -bash: cd: /dev/sda6: Not a directory
    serve:/ # cd dev/sda6
    -bash: cd: dev/sda6: Not a directory
    serve:/ #

  7. #6
    Quote Originally Posted by Being View Post
    doesnt work

    sda6 is not a folder but mounted disk / partition , like /dev/sda1 , /dev/sda5, etc.

    server:/ # cd sda6
    -bash: cd: sda6: No such file or directory
    serve:/ # cd /dev/sda6
    -bash: cd: /dev/sda6: Not a directory
    serve:/ # cd dev/sda6
    -bash: cd: dev/sda6: Not a directory
    serve:/ #

    never mind,

    looking at this

    /dev/sda6 12G 12G 0 100% /var

    simply CD into var

    the full drive is where the var folder lives.

Posting Permissions

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