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
Site Admin
Posts: 33215
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...
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
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
Site Admin
Posts: 33215
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.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
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
Site Admin
Posts: 33215
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.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply