</pre>
== Size of Graphical Desktop (X Window System) ==So you think your graphical desktop is slowing things down compared to using a pure console based system. Short of logging in single user mode, how much memory does the graphical desktop consume? Since everything is a file, we can look in the folder for processes (/proc), and specifically the folder created for the process id of "X" ([http://x.org X-.org]). <code>grep</code>ping for the line starting with 'VmSize', we can see the Virtual Memory size of our graphical desktop.
<source lang="bash">grep ^VmSize /proc/$(pidof X)/status</source>
Result:
VmSize: 158212 kB
</pre>
== Delete old stuff ==
You stumble upon a directory full of backups, which is great. But you also realize that nobody setup <code>logrotate</code> or other command to prune old content. Maybe that's because these backups are produced manually, say during upgrades, and so they are also deleted manually. What's a quick one-liner to remove old files? Use the <code>mtime</code> (modification time) option to <code>find</code> combined with the <code>exec</code> option to execute <code>rm</code> (remove) said files.
<source lang="bash">
# Make sure we've got backups; look for recent files
sudo ls -al /backups
# list everything in the backups folder that's older than 30 days
sudo find /backups -mtime +30 -ls
# OK, delete those files
sudo find /backups -mtime +30 -exec rm {} \;
</source>
{{References}}