Unix administration - housekeeping a filesystem, but met inner filesytesms... clarify.

This is Interesting: Free IT Magazines  
Home > Archive > Unix administration > January 2004 > housekeeping a filesystem, but met inner filesytesms... clarify.





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author housekeeping a filesystem, but met inner filesytesms... clarify.
yls177

2004-01-23, 4:53 pm

df shows my /usr 97%. so i intend to do some housekeeping. however, in
/usr , there are other filesystems as well, like
/usr/sap/SID and others.

i could do a find size +10000. but these output could be in other
filesystems besides /usr. hence, the 97% of /usr will still remain.

my solution is to find files that are big and could be deleted under
/usr but are not in other filesystem and that can be done by doing a
df -kt | grep usr. so directories under /usr that are not listed by
the previous command will affect
the size of /usr?

am i right?
Andy

2004-01-23, 4:53 pm

yls177 wrote:
quote:

> df shows my /usr 97%. so i intend to do some housekeeping. however, in
> /usr , there are other filesystems as well, like
> /usr/sap/SID and others.
>
> i could do a find size +10000. but these output could be in other
> filesystems besides /usr. hence, the 97% of /usr will still remain.
>
> my solution is to find files that are big and could be deleted under
> /usr but are not in other filesystem and that can be done by doing a
> df -kt | grep usr. so directories under /usr that are not listed by
> the previous command will affect
> the size of /usr?
>
> am i right?



I'm not sure of your Unix version, but check out "man find" and look at
the -mount option.

HTH,
Andy.

Barry Margolin

2004-01-23, 4:53 pm

In article <c06e4d68.0311111914.198a148f@posting.google.com>,
yls177 <yls177@hotmail.com> wrote:
quote:

>df shows my /usr 97%. so i intend to do some housekeeping. however, in
>/usr , there are other filesystems as well, like
>/usr/sap/SID and others.
>
>i could do a find size +10000. but these output could be in other
>filesystems besides /usr. hence, the 97% of /usr will still remain.



Use the -xdev option to find to prevent it from leaving the filesystem.

--
Barry Margolin, barry.margolin@level3.com
Level(3), Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
Doug Freyburger

2004-01-23, 4:53 pm

Andy wrote:
quote:

> yls177 wrote:
>
>
> I'm not sure of your Unix version, but check out "man find" and look at
> the -mount option.



Also -xdev on several variants.
Juha Laiho

2004-01-23, 4:53 pm

yls177@hotmail.com (yls177) said:
quote:

>df shows my /usr 97%. so i intend to do some housekeeping. however, in
>/usr , there are other filesystems as well, like
>/usr/sap/SID and others.
>
>i could do a find size +10000. but these output could be in other
>filesystems besides /usr. hence, the 97% of /usr will still remain.
>
>my solution is to find files that are big and could be deleted under
>/usr but are not in other filesystem and that can be done by doing a
>df -kt | grep usr. so directories under /usr that are not listed by
>the previous command will affect
>the size of /usr?



I tend to hunt for large directories first by
du -x /usr | sort -n | tail -40
or something like that. So, first look for "big collections", only
after that go for large single files.
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
yls177

2004-01-23, 4:53 pm

Juha Laiho <Juha.Laiho@iki.fi> wrote in message news:<bou2vr$ojq$1@ichaos.ichaos-int>...
quote:

> yls177@hotmail.com (yls177) said:
>
> I tend to hunt for large directories first by
> du -x /usr | sort -n | tail -40
> or something like that. So, first look for "big collections", only
> after that go for large single files.



hi.. thanks all for helping me.. really appreciate... thanks
i did my homework... as a hardworking student and its as belows

find /usr -xdev -size +10000 > bigfiles
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com