Cleaning up Harddisk
Hello,
Any tips on how to/ what to delete from my harddisk ? Any command that can list the file that has the biggest size ? Any command that can list the file that is rarely accessed ? Thanks. |
The ls command has options to sort files by size and by name. See
Code:
man ls Code:
ls -lS | head gzexe will reduce the size of an executable file, at the cost of it taking longer to start up. |
u could also delete old logs from /var
and if u use swaret then u could delete its cache |
du -h [filename]
will give you the disk usage of the file in -human readable (not super engineer/comp science numbers) size. |
If you want a gui app there's a great little app called filelight, which is a recursive pie-chart type thing so you can quickly find rogue huge files or folders you'd forgotten about (such as ISOs you'd forgotten about).
Alternatively just browse through /var/log/packages and see which you might not want |
Code:
du -S | sort -n Code:
cd / |
This will recursively travel your directory tree from wherever you enter it,
listing all the files, and sort them by size with the largest ones first find . -type f -ls | sort -n -r -k 7,7 you may want to pipe the output to a file (or more or less). 'man find' should give you hints on how to modify it for this to deal with finding files rarely accessed ( which would probably mean 'man sort' to change that part ) |
All times are GMT -5. The time now is 05:52 PM. |