On windows, we've Disk cleanup to clean some files. Other than that we can search for *.bak ot *.tmp files and other un-necessary files and delete them. But in case of Linux, which files are un-necessary ? And is there any utility to clean them up ?
|
feedback
|
|
This is a potentially dangerous operation. Unless you know what the files are for, you probably shouldn't be removing them. Underneath your home directory, this could be okay, but anywhere else I think you're asking for trouble. That said, the most common files are going to be editor temporary files. Check your editor's man page for information on what file name or extension it uses for these. Other files may be those which the extension's last character is a ~. For example, filename.mp~ instead of filename.mp3. Various programs and applications may put files in /tmp, but don't remove those unless you know what they're from, because you could end up removing an important file for a running process. | |||
|
feedback
|
|
Automatic erasing of "useless" files is always a shot in the dark. Linux is quite clean and tends not to throw garbage all around while it runs. If you want to be paranoid you'd better be methodical, keep your homedir in good state and carefully check your logrotate policies. Usually new rules are added automatically to your /etc/logrotate.d directory if you install services using the packet manager of your distro (if any). If you install some heavy-logging stuff from source (apache, tomcat, mysql and so on) just remember to add your custom rules to avoid uncontrolled log proliferation that will waste your disk. Once you really know what you're doing, writing your own cleaning scripts and run them with cron as you want should be trivial as well. M | |||
|
feedback
|
|
Any core dumps ('core') more than a few days old can probably go. Ditto any files called 'a.out' that are more than a few days old. If you're using an editor that leaves backups around with a '~' tilde at the end, you can probably remove those after a few days too. For 'few days', consider weekends, holiday weekends, and maybe even vacations. I'd probably not remove anything less than 7 days old, and might well go to 14 or even 21 to allow for longer vacations. Empirically, though, I don't have any automatic process doing such cleanups. | |||
|
feedback
|
|
I agree with jtimberman but you could look in /tmp and other tmp dirs around in the system. Those should be emptied automatically but you never know... (I have not seen much problem there thou) | |||
|
feedback
|
|
I work with Suse Linux and the shipped ShowPhoto produces large temporary files which can be found in the kde-cache folder. Once showPhoto produced corrupt files till my disc space was full. | |||
|
feedback
|