Moderators, translator
455
edits
Deeppunster (talk | contribs) |
(Applied Cmd templates to commands) |
||
Line 13: | Line 13: | ||
To generate a sorted list of contents and sizes: | To generate a sorted list of contents and sizes: | ||
{{UserCmd|command=du -sh ~/.cache/* | sort -h}} | |||
To automatically purge all {{ic|.cache}} files that have not been accessed in 100 days: | To automatically purge all {{ic|.cache}} files that have not been accessed in 100 days: | ||
{{UserCmd|command=find ~/.cache/ -type f -atime +100 -delete}} | |||
=Journal and Logs= | =Journal and Logs= | ||
Line 28: | Line 28: | ||
To report the current size: | To report the current size: | ||
{{UserCmd|command=journalctl --disk-usage}} | |||
To remove all but the most recent entries by size or time: | To remove all but the most recent entries by size or time: | ||
{{UserCmd|command=journalctl --vacuum-size=50M}} | |||
{{UserCmd|command=journalctl --vacuum-time=2weeks}} | |||
To set a maximum size for the journal you can uncomment and edit the following line in {{ic|/etc/systemd/journald.conf}}: | To set a maximum size for the journal you can uncomment and edit the following line in {{ic|/etc/systemd/journald.conf}}: | ||
Line 89: | Line 89: | ||
A .pacnew file may be created during a package upgrade to avoid overwriting a file which already exists. A .pacsave file may be created during a package removal, or by a package installation of a package that was removed. These files require manual intervention from the user and it is good practice to handle them regularly. The program {{ic|pacdiff}} can help manage this process. For example, here is what it looks like when the {{ic|/etc/default/grub}} grub file has changed: | A .pacnew file may be created during a package upgrade to avoid overwriting a file which already exists. A .pacsave file may be created during a package removal, or by a package installation of a package that was removed. These files require manual intervention from the user and it is good practice to handle them regularly. The program {{ic|pacdiff}} can help manage this process. For example, here is what it looks like when the {{ic|/etc/default/grub}} grub file has changed: | ||
sudo DIFFPROG=diff pacdiff | sudo DIFFPROG=diff pacdiff|result= | ||
==> pacnew file found for /etc/default/grub | ==> pacnew file found for /etc/default/grub | ||
:: (V)iew, (S)kip, (R)emove pacnew, (O)verwrite with pacnew, (Q)uit: [v/s/r/o/q] | :: (V)iew, (S)kip, (R)emove pacnew, (O)verwrite with pacnew, (Q)uit: [v/s/r/o/q] | ||
* {{ic|V}} shows the differences between the two files | * {{ic|V}} shows the differences between the two files | ||
Line 112: | Line 112: | ||
An alternative is to use systemd via the systemd-timesyncd service. This can be easily enabled with the command: | An alternative is to use systemd via the systemd-timesyncd service. This can be easily enabled with the command: | ||
{{UserCmd|command=timedatectl set-ntp true}} | |||
<div style="clear: both"></div> | <div style="clear: both"></div> | ||