Re: Clearing disc space on linux 5.2
[email protected] Fri, 13 Jan 2006 15:21:59 -0600
| Newsgroups | gmane.linux.redhat.release.valhalla |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Jan 13, 2006 at 04:46:42PM -0000, Harry Hambi wrote:
> Thanx Aaron....you couldn't explain a bit more.....example of how to run
> the command.
>
> Rgds.
>
> Harry
Ok lets say you want to remove all files that were last accessed more
than 2 days ago or there status was last changed more than 3 days ago
or are empty and are simple files starting at the current directory.
find ./ -name "*" -type f ( -empty -o -atime +2 -o -ctime +3) -exec rm {} \;
Do a : man find
to see other options of which there are many. You could probably do
without the -name "*" and all files that are matched and therefore
deleted will have there names printed. There are examples of use in
the man page.
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of
> [email protected]
> Sent: 13 January 2006 16:24
> To: Discussion of Red Hat Linux 7.3 (Valhalla)
> Subject: Re: Clearing disc space on linux 5.2
>
> On Fri, Jan 13, 2006 at 12:39:02PM -0000, Harry Hambi wrote:
> > Hi All,
> > Trying to clear disc space on my linux 5.2 box......is there a command
>
> > that will help me delete old files the system doesn't use?, looking
> > for a coomand which will tell me how old a file is or when it was last
>
> > used by the system, thanx.
> >
> > Rgds.
> >
> > Harry.
> The find command executing a rm based on criteria such as last
> modification time and creation time should work for you.
> -------------------------------------------
> Aaron Konstam
> Computer Science
> Trinity University
> telephone: (210)-999-7484
>
> _______________________________________________
> Valhalla-list mailing list
> [email protected]
> https://www.redhat.com/mailman/listinfo/valhalla-list
>
> http://www.bbc.co.uk/
>
> This e-mail (and any attachments) is confidential and may contain
> personal views which are not the views of the BBC unless specifically
> stated.
> If you have received it in error, please delete it from your system.
> Do not use, copy or disclose the information in any way nor act in
> reliance on it and notify the sender immediately. Please note that the
> BBC monitors e-mails sent or received.
> Further communication will signify your consent to this.
>
> _______________________________________________
> Valhalla-list mailing list
> [email protected]
> https://www.redhat.com/mailman/listinfo/valhalla-list
--
=======================================================================
Graduate life: It's not just a job. It's an indenture.
-------------------------------------------
Aaron Konstam
Computer Science
Trinity University
telephone: (210)-999-7484