Delete unwanted files.

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
Post Reply
dotnet
Posts: 3
Joined: 2013/12/16 15:17:37

Delete unwanted files.

Post by dotnet » 2013/12/16 15:26:41

Hi All,

I'm new here and also new on CentOs. My boss ask me to do a preventive maintenance on CentOs. What is the step/command to delete unwanted files.

Thanks

User avatar
TrevorH
Forum Moderator
Posts: 26983
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Delete unwanted files.

Post by TrevorH » 2013/12/16 17:44:30

Step 1: define unwanted files

Come back when you've clarified the answer to that...
CentOS 5 died in March 2017 - migrate NOW!
CentOS 6 goes EOL sooner rather than later, get upgrading!
Full time Geek, part time moderator. Use the FAQ Luke

dotnet
Posts: 3
Joined: 2013/12/16 15:17:37

Re: Delete unwanted files.

Post by dotnet » 2013/12/17 14:19:37

Thanks for reply.. What I mean is like temp files in windows.

Thanks

User avatar
TrevorH
Forum Moderator
Posts: 26983
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Delete unwanted files.

Post by TrevorH » 2013/12/17 17:00:36

There's a package called tmpwatch that you can install with yum then configure /etc/cron.daily/tmpwatch to adjust the paths and time limits to look for. Use `yum install tmpwatch` then read the manpage for tmpwatch.
CentOS 5 died in March 2017 - migrate NOW!
CentOS 6 goes EOL sooner rather than later, get upgrading!
Full time Geek, part time moderator. Use the FAQ Luke

dotnet
Posts: 3
Joined: 2013/12/16 15:17:37

Re: Delete unwanted files.

Post by dotnet » 2013/12/23 04:14:42

FYI, our client did not install GUI, I'm only using command prompt to delete unwanted files.


Thanks

User avatar
TrevorH
Forum Moderator
Posts: 26983
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Delete unwanted files.

Post by TrevorH » 2013/12/23 08:24:32

The tmpwatch package doesn't need a GUI nor does editing the cron.daily file to adjust paths.
CentOS 5 died in March 2017 - migrate NOW!
CentOS 6 goes EOL sooner rather than later, get upgrading!
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 5 - Server Support”