Results 1 to 3 of 3

Thread: Search/Analys for files in /, but skip /home

  1. #1
    Join Date
    Mar 2005
    Location
    Sweden, Uppsala
    Beans
    828
    Distro
    Ubuntu 12.04 Precise Pangolin

    Search/Analys for files in /, but skip /home

    Hi I wonder how I can search/ for files in the /-directory, but skip /home? My / is a partition and going to be full (20GB) and what see what's files that filled up the partition. Run 10.04LTS
    Cheers
    /Azyx

    Ubuntu 12.04LTS 64bit, 13.10 Lubuntu 32-bit on eeePCs and OSX on a G4 800MHz iMac (iLamp). I think I have an W7 on one of my Virtualbox machine under 12.04LTS?

  2. #2
    Join Date
    Apr 2012
    Beans
    4,564

    Re: Search/Analys for files in /, but skip /home

    If /home really is on a separate partition, then iirc the -xdev option should prevent 'find' from descending into it

    Code:
    find / -xdev ...
    OTOH if you need to exclude a path on the same partition, you can try prune

    Code:
    find / -path '/home' -prune -o ...
    (needs the -o before your remaining tests because the default is to AND them)

  3. #3
    Join Date
    Mar 2005
    Location
    Sweden, Uppsala
    Beans
    828
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Search/Analys for files in /, but skip /home

    Quote Originally Posted by steeldriver View Post
    If /home really is on a separate partition, then iirc the -xdev option should prevent 'find' from descending into it

    Code:
    find / -xdev ...
    OTOH if you need to exclude a path on the same partition, you can try prune

    Code:
    find / -path '/home' -prune -o ...
    (needs the -o before your remaining tests because the default is to AND them)

    I have think something more desktop oriented search or space analysing tools (Disk spaca analyzer or nautilus that only search for bigger files.or some other application there file-size or other may... How can I get rid of files, that I don't need any more, including uninstall applications....
    /Azyx

    Ubuntu 12.04LTS 64bit, 13.10 Lubuntu 32-bit on eeePCs and OSX on a G4 800MHz iMac (iLamp). I think I have an W7 on one of my Virtualbox machine under 12.04LTS?

Bookmarks

Posting Permissions

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