Update README.md

This commit is contained in:
proledatarian 2022-02-07 20:40:34 +00:00
parent 906f08628a
commit 29587f8404
1 changed files with 26 additions and 12 deletions

View File

@ -5,25 +5,31 @@
- Requires: *Do you need any particular software (provide a link)?* - Requires: *Do you need any particular software (provide a link)?*
- How-to: *Straight forward description and maybe a code example.* - How-to: *Straight forward description and maybe a code example.*
- *Detailled description if necessary.* - *Detailled description if necessary.*
- $ sudo this is the actual code lol - `sudo this is the actual code lol`
- Aditionally: *Anything else that might be important like additional ressources.* - Aditionally: *Anything else that might be important like additional ressources.*
[[_TOC_]]
### 1. Automatically clear cache. ### 1. Automatically clear cache.
- Description: Move files older than a specific amount of time from your user's ~/.cache directory to the trash. - Description: Move files older than a specific amount of time from your user's ~/.cache directory to the trash.
- Requires: [rmtrash](https://github.com/PhrozenByte/rmtrash). - Requires: [rmtrash](https://github.com/PhrozenByte/rmtrash).
- How-to: - How-to: Add the following line to your crontab using the command "crontab -e" (or EDITOR=$editor crontab -e).
- Add the following line to your crontab using the command "crontab -e" (or EDITOR=$editor crontab -e): - `0 17 * * * /usr/bin/find ~/.cache/* -mtime +7 -exec /usr/bin/rmtrash -rf {} \;`
- $ 0 17 * * * /usr/bin/find ~/.cache/* -mtime +7 -exec /usr/bin/rmtrash -rf {} \;
- This command looks at files in ~/.cache every day at 5 p.m. and moves files older than 7 days to the trash. - This command looks at files in ~/.cache every day at 5 p.m. and moves files older than 7 days to the trash.
- Additionally: This can also be done using regular "rm" instead of "rmtrash". - Additionally: This can also be done using regular `rm` instead of `rmtrash`.
### 2. Clean systemd journal. ### 2. Limit Systemd journal size.
https://wiki.archlinux.org/title/Systemd/Journal#Journal_size_limit - Description: Limit the Systemd journal to a specific size.
https://wiki.archlinux.org/title/Systemd/Journal#Clean_journal_files_manually - Requires: Specific to systems using [Systemd](https://systemd.io/).
- How-to:
- Edit `/etc/systemd/journald.conf` and change `SystemMaxUse=50M`.
- Additionally: [Arch wiki: Systemd](https://wiki.archlinux.org/title/Systemd/Journal#Journal_size_limit).
- Additionally: This can also be achieved using `journalctl` and be [limited by time](https://wiki.archlinux.org/title/Systemd/Journal#Clean_journal_files_manually).
### 3. Syntax highlight for nano ### 3. Syntax highlight for nano
- Description: Enable syntax highlighting for nano.
- Requires:
- How-to: Edit `~/.config/nano/nanorc` or to `/etc/nanorc` and add the following.
- `include "/usr/share/nano/*.nanorc"`.
https://wiki.archlinux.org/title/Nano#Syntax_highlighting https://wiki.archlinux.org/title/Nano#Syntax_highlighting
### 4. Repeat a command using watch. ### 4. Repeat a command using watch.
@ -34,5 +40,13 @@ https://wiki.archlinux.org/title/Nano#Syntax_highlighting
- Description: Use alias for *rm*, *cp* and *mv*. - Description: Use alias for *rm*, *cp* and *mv*.
- How-to: Add the following alias into your ~/.bashrc. - How-to: Add the following alias into your ~/.bashrc.
- Use *-interactive* option to get asked before overwriting files. - Use *-interactive* option to get asked before overwriting files.
- $ alias mv="mv -i" - `alias mv="mv -i"`
- Additionally: Further reading in the Arch wiki. - Additionally: Further reading in the Arch wiki.
### 7. Paccache timer
- Requires: A pacman-based distro and the pacman-contrib package.
### 8. Passwordless SSH
### 9. Automatically clean orphaned packages.
`0 20 * * * /usr/bin/pacman -Qtdq | /usr/bin/pacman -Rns -`